Preview Updated 2026-05-10

Cascader

Column-by-column expanding picker for hierarchical options — path-based selection, common for region / department / category filters.

Basic usage

options is a tree; clicking a leaf node selects the entire path. v-model / value is a string[] — the sequence of values from root to the selected node.

选中:(无)
<CfCascader v-model="value" :options="options" clearable />
<CfCascader value={value} onChange={setValue} options={options} clearable />

API

PropTypeDefaultDescription
optionsCascaderOption[]Cascading option tree
value / modelValuestring[]Controlled selected path
defaultValuestring[][]Uncontrolled initial value
placeholderstring'Please select'Placeholder when nothing is selected
separatorstring' / 'Path separator shown in the trigger
size'sm' | 'md' | 'lg''md'Trigger size
disabledbooleanfalseDisabled
clearablebooleanfalseShow a clear button

CascaderOption

FieldTypeDescription
valuestringUnique value
labelstringDisplay text
disabledbooleanDisable this option
childrenCascaderOption[]Next-level options; omit to mark as a leaf

Events: onChange(path: string[]) — fires when the selected path changes.

反馈与讨论

Cascader · Discussion

0
0 / 600
一键发送
正在加载评论...