diff --git a/docs/en-US/component/cascader.md b/docs/en-US/component/cascader.md index 8bef29a49c..ebe365b066 100644 --- a/docs/en-US/component/cascader.md +++ b/docs/en-US/component/cascader.md @@ -49,7 +49,36 @@ cascader/last-level ## Multiple Selection -Set `props.multiple = true` to use multiple selection. +Add `:props="props"` in tag and set data `props = { multiple: true }` to use multiple selection. + +Do: + +```html + + +``` + +Don't do: + +```html + +``` :::demo When using multiple selection, all selected tags will display by default, You can set `collapse-tags = true` to fold selected tags. diff --git a/docs/examples/cascader/any-level.vue b/docs/examples/cascader/any-level.vue index 890bed900e..f6153986d3 100644 --- a/docs/examples/cascader/any-level.vue +++ b/docs/examples/cascader/any-level.vue @@ -3,21 +3,13 @@ Select any level of options (Single selection) - +
Select any level of options (Multiple selection) - +
@@ -27,6 +19,13 @@ import { defineComponent, reactive, toRefs } from 'vue' export default defineComponent({ setup() { const state = reactive({ + props1: { + checkStrictly: true, + }, + props2: { + multiple: true, + checkStrictly: true, + }, options: [ { value: 'guide', diff --git a/docs/examples/cascader/basic.vue b/docs/examples/cascader/basic.vue index 6d384acb05..1433ad80c8 100644 --- a/docs/examples/cascader/basic.vue +++ b/docs/examples/cascader/basic.vue @@ -14,7 +14,7 @@ @@ -27,6 +27,9 @@ export default defineComponent({ setup() { const state = reactive({ value: [], + props: { + expandTrigger: 'hover', + }, options: [ { value: 'guide', diff --git a/docs/examples/cascader/filterable.vue b/docs/examples/cascader/filterable.vue index d9a8bb989d..b2f80801e8 100644 --- a/docs/examples/cascader/filterable.vue +++ b/docs/examples/cascader/filterable.vue @@ -12,7 +12,7 @@ @@ -24,6 +24,9 @@ import { defineComponent, reactive, toRefs } from 'vue' export default defineComponent({ setup() { const state = reactive({ + props: { + multiple: true, + }, options: [ { value: 'guide',