A multiple cascader component for ant-design-vue 2.x
npm install antdv-multi-cascaderant-design-vue 2.x 的级联多选组件。
bash
npm i antdv-multi-cascader -D
`
`ts
import multiCascader from 'antdv-multi-cascader'
app.use(multiCascader)
`
`html
`
Props
| 参数 | 说明 | 类型 | 默认值 | 必填 |
| -------------- | -------------- | ----------------------------------- | ------ | ------- |
| value(v-model) | 选中项 | string[] | [] | true |
| placeholder | 输入框占位文本 | string | - | false |
| data | 可选项数据源 | Option[] | [] | true |
| loadData | 动态加载选项 | (selectedOptions: Option) => void | - | true |
$3
`ts
interface Option {
value: string
label: string
isLeaf: boolean
isChecked?: boolean
isLoading?: boolean
children?: Option[]
}
``