Skip to content

级联选择器(Cascader)

组件标识

component: 'Cascader'

componentProps

参数名类型说明
mode'static' | 'remote'数据模式:静态选项/远程请求
optionsArray<{ label: string; value: any; disabled?: boolean; children?: any[] }>选项树
apiSchemaApi远程模式配置
api.urlstring远程请求地址
api.method'GET' | 'POST' | 'PUT' | 'DELETE'请求方式
api.paramsRecord<string, any> | string请求参数
api.dataPathstring响应数据路径,默认 data
api.labelKeystring标签字段名,默认 label
api.valueKeystring值字段名,默认 value
api.disabledKeystring禁用字段名,默认 disabled
namestring字段名(用于写入 selectData)
placeholderstring占位符
disabledboolean禁用
multipleboolean多选
showAllLevelsboolean是否显示完整路径
clearableboolean可清空
onChange(value: any) => void值变化
onClear() => void清空
onBlur(e: Event) => void失焦
onFocus(e: Event) => void聚焦
styleRecord<string, any>自定义样式