diff --git a/packages/form/src/fields/Cascader.vue b/packages/form/src/fields/Cascader.vue index 06869bcad..46cefc5eb 100644 --- a/packages/form/src/fields/Cascader.vue +++ b/packages/form/src/fields/Cascader.vue @@ -9,7 +9,11 @@ :placeholder="config.placeholder" :disabled="disabled" :options="options" - :props="{ multiple: config.multiple }" + :props="{ + multiple: config.multiple ?? false, + emitPath: config.emitPath ?? true, + checkStrictly: config.checkStrictly ?? false, + }" @change="changeHandler" > diff --git a/packages/form/src/schema.ts b/packages/form/src/schema.ts index 1bd5d5142..2215cab13 100644 --- a/packages/form/src/schema.ts +++ b/packages/form/src/schema.ts @@ -527,7 +527,12 @@ export interface LinkConfig extends FormItem { export interface CascaderConfig extends FormItem, Input { type: 'cascader'; remote?: boolean; + /** 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值,默认 true */ + emitPath?: boolean; + /** 是否多选,默认 false */ multiple?: boolean; + /** 是否严格的遵守父子节点不互相关联,默认 false */ + checkStrictly?: boolean; options?: | (( mForm: FormState | undefined, @@ -545,12 +550,6 @@ export interface CascaderConfig extends FormItem, Input { root: 'string'; item: (optionsData: Record) => CascaderOption[]; }; - add?: { - action: { - method: 'post' | 'get'; - body?: Record; - }; - }; } export interface DynamicFieldConfig extends FormItem {