a-cascader多选状态下,设置多个默认值没有效果
liu3594211 opened this issue · 0 comments
liu3594211 commented
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.1.0
Environment
vue
Reproduction link
https://next.antdv.com/components/cascader-cn
Steps to reproduce
{{ selectedItems }} <script setup> import { ref } from 'vue'; import { Cascader } from 'ant-design-vue'; const options = ref([ { value: '1', label: 'Option 1', children: [ { value: '1-1', label: 'Option 1-1', children: [ { value: '1-1-1', label: 'Option 1-1-1', }, { value: '1-1-2', label: 'Option 1-1-2', }, ], }, { value: '1-2', label: 'Option 1-2', }, ], }, { value: '2', label: 'Option 2', children: [ { value: '2-1', label: 'Option 2-1', }, { value: '2-2', label: 'Option 2-2', }, ], }, { value: '3', label: 'Option 3', children: [ { value: '3-1', label: 'Option 3-1', }, { value: '3-2', label: 'Option 3-2', }, ], }, ]); const selectedItems = ref(['1', '1-1', '1-1-1', '2', '2-1']); const handCascader = (value) => { console.log('value', value); }; </script>const selectedItems = ref(['1', '1-1', '1-1-1', '2', '2-1']);设置这种多选的默认值,不会回显勾选
What is expected?
能够设置多个默认值
What is actually happening?
a-cascader多选状态的bug