From ca677519b92317bf7c9be29daef5a0ba158146b0 Mon Sep 17 00:00:00 2001
From: btea <2356281422@qq.com>
Date: Fri, 13 Sep 2024 09:34:40 +0800
Subject: [PATCH] feat(components): [cascader-panel] add `empty` slot (#16274)
* feat(components): [cascader] add `empty-panel` slot
* chore: update version tag
* chore: update
* feat: rename empty-panel to empty
* chore: format
* test: add test case
* test: update
* Update docs/en-US/component/cascader.md
---
docs/en-US/component/cascader.md | 7 ++--
.../components/cascader-panel/src/index.vue | 6 +++-
.../components/cascader-panel/src/menu.vue | 2 +-
.../cascader/__tests__/cascader.test.tsx | 35 +++++++++++++++++++
packages/components/cascader/src/cascader.vue | 6 +++-
5 files changed, 50 insertions(+), 6 deletions(-)
diff --git a/docs/en-US/component/cascader.md b/docs/en-US/component/cascader.md
index c40a7bd935..e86dfe99e9 100644
--- a/docs/en-US/component/cascader.md
+++ b/docs/en-US/component/cascader.md
@@ -209,9 +209,10 @@ cascader/panel
### CascaderPanel Slots
-| Name | Description | Scope |
-| ------- | ---------------------------------------------------------------------------------------------- | ----------------------------------- |
-| default | the custom content of cascader node, which are current Node object and node data respectively. | ^[object]`{ node: any, data: any }` |
+| Name | Description | Scope |
+| -------------- | ---------------------------------------------------------------------------------------------- | ----------------------------------- |
+| default | the custom content of cascader node, which are current Node object and node data respectively. | ^[object]`{ node: any, data: any }` |
+| empty ^(2.8.3) | the content of the panel when there is no data. | — |
### CascaderPanel Exposes
diff --git a/packages/components/cascader-panel/src/index.vue b/packages/components/cascader-panel/src/index.vue
index 74a8484125..7b852cd647 100644
--- a/packages/components/cascader-panel/src/index.vue
+++ b/packages/components/cascader-panel/src/index.vue
@@ -9,7 +9,11 @@
:ref="(item) => (menuList[index] = item)"
:index="index"
:nodes="[...menu]"
- />
+ >
+
+