mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 02:28:04 +08:00 
			
		
		
		
	feat(form): cascader支持check-strictly/emit-path配置
This commit is contained in:
		
							parent
							
								
									e4613ba053
								
							
						
					
					
						commit
						ed3c3d60ce
					
				@ -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"
 | 
			
		||||
  ></TMagicCascader>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@ -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<string, any>) => CascaderOption[];
 | 
			
		||||
  };
 | 
			
		||||
  add?: {
 | 
			
		||||
    action: {
 | 
			
		||||
      method: 'post' | 'get';
 | 
			
		||||
      body?: Record<string, any>;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface DynamicFieldConfig extends FormItem {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user