From 6d022d8e573399803c6b79476e09ba67929fefd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Thu, 29 Aug 2024 16:49:10 +0800 Subject: [PATCH] feat(cascader): cascader panel support option slot (#4513) --- src/cascader/cascader-panel.tsx | 2 +- test/unit/snap/__snapshots__/csr.test.js.snap | 24 +++++-------------- test/unit/snap/__snapshots__/ssr.test.js.snap | 8 +++---- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/cascader/cascader-panel.tsx b/src/cascader/cascader-panel.tsx index ff832453f8..ea9812d9dc 100644 --- a/src/cascader/cascader-panel.tsx +++ b/src/cascader/cascader-panel.tsx @@ -17,7 +17,7 @@ export default defineComponent({ trigger={props.trigger} cascaderContext={cascaderContext.value} empty={props.empty} - v-slots={{ empty: slots.empty }} + v-slots={{ empty: slots.empty, option: slots.option, loadingText: slots.loadingText }} /> ); }, diff --git a/test/unit/snap/__snapshots__/csr.test.js.snap b/test/unit/snap/__snapshots__/csr.test.js.snap index c1509b5bde..98955119cb 100644 --- a/test/unit/snap/__snapshots__/csr.test.js.snap +++ b/test/unit/snap/__snapshots__/csr.test.js.snap @@ -44044,10 +44044,8 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/input.vue 1 width="1em" > @@ -47282,10 +47280,8 @@ exports[`csr snapshot test > csr test ./src/date-picker/_example/custom-icon.vue width="1em" > @@ -47404,10 +47400,8 @@ exports[`csr snapshot test > csr test ./src/date-picker/_example/custom-icon.vue width="1em" > @@ -65018,10 +65012,8 @@ exports[`csr snapshot test > csr test ./src/form/_example/login.vue 1`] = ` width="1em" > @@ -78511,10 +78503,8 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = ` width="1em" > @@ -78572,10 +78562,8 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = ` width="1em" > diff --git a/test/unit/snap/__snapshots__/ssr.test.js.snap b/test/unit/snap/__snapshots__/ssr.test.js.snap index e9b0e985a7..f0c576d2e1 100644 --- a/test/unit/snap/__snapshots__/ssr.test.js.snap +++ b/test/unit/snap/__snapshots__/ssr.test.js.snap @@ -297,7 +297,7 @@ exports[`ssr snapshot test > ssr test ./src/config-provider/_example/dialog.vue exports[`ssr snapshot test > ssr test ./src/config-provider/_example/global.vue 1`] = `"
使用t-config-provider包裹业务功能的最外层组件,点击下方图标查看示例代码

English: import enConfig from 'tdesign-vue-next/es/locale/en_US';

中文:import enConfig from 'tdesign-vue-next/es/locale/zh_CN';
"`; -exports[`ssr snapshot test > ssr test ./src/config-provider/_example/input.vue 1`] = `"
"`; +exports[`ssr snapshot test > ssr test ./src/config-provider/_example/input.vue 1`] = `"
"`; exports[`ssr snapshot test > ssr test ./src/config-provider/_example/others.vue 1`] = `"


0 / 20
0 / 0
Empty Data





















Feature Tag
Feature Tag
Feature Tag
Feature Tag


Tree Empty Data


Department A
Department B



First Step
You need to click the blue button
Second Step
Fill your base information into the form
Error Step
Something Wrong! Custom Error Icon!
4
Last Step
You haven't finish this step.


loading
"`; @@ -311,7 +311,7 @@ exports[`ssr snapshot test > ssr test ./src/date-picker/_example/base.vue 1`] = exports[`ssr snapshot test > ssr test ./src/date-picker/_example/cancel-range-limit.vue 1`] = `"
-
"`; -exports[`ssr snapshot test > ssr test ./src/date-picker/_example/custom-icon.vue 1`] = `"
-
"`; +exports[`ssr snapshot test > ssr test ./src/date-picker/_example/custom-icon.vue 1`] = `"
-
"`; exports[`ssr snapshot test > ssr test ./src/date-picker/_example/date-presets-alt.vue 1`] = `"
-
-
"`; @@ -439,7 +439,7 @@ exports[`ssr snapshot test > ssr test ./src/form/_example/error-message.vue 1`] exports[`ssr snapshot test > ssr test ./src/form/_example/layout.vue 1`] = `"
"`; -exports[`ssr snapshot test > ssr test ./src/form/_example/login.vue 1`] = `"
"`; +exports[`ssr snapshot test > ssr test ./src/form/_example/login.vue 1`] = `"
"`; exports[`ssr snapshot test > ssr test ./src/form/_example/reset.vue 1`] = `"
"`; @@ -559,7 +559,7 @@ exports[`ssr snapshot test > ssr test ./src/input/_example/group.vue 1`] = `" ssr test ./src/input/_example/max-length-count.vue 1`] = `"
0/5
0/10
0/5
0/5
"`; -exports[`ssr snapshot test > ssr test ./src/input/_example/password.vue 1`] = `"
"`; +exports[`ssr snapshot test > ssr test ./src/input/_example/password.vue 1`] = `"
"`; exports[`ssr snapshot test > ssr test ./src/input/_example/size.vue 1`] = `"
"`;