Skip to content

Cascader 级联选择 ​

按层级展开选项。默认点到叶子才确认;change-on-select 时点父级也会写出当前路径。

vue
<CkCascader v-model="path" allow-clear :options="areas" placeholder="选择区域" />

API ​

属性说明类型默认
modelValue选中路径Array<string | number>[]
options树形选项CascaderOption[][]
placeholder未选时的文字string—
allowClear可清空booleanfalse
changeOnSelect点父级也确认当前路径booleanfalse
disabled禁用booleanfalse
size尺寸'small' | 'default' | 'large'—

CascaderOption:value、label、disabled、children。

事件说明
update:modelValue路径变化
change路径和对应选项节点