feat(form): groupList新增默认展开所有的配置

This commit is contained in:
roymondchen 2023-05-30 17:41:30 +08:00
parent 05dfd9d936
commit 9281d06723
2 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,7 @@ const mForm = inject<FormState | undefined>('mForm');
const expand = ref(false);
watchEffect(() => {
expand.value = !props.index;
expand.value = props.config.expandAll || !props.index;
});
const rowConfig = computed(() => ({

View File

@ -662,6 +662,7 @@ export interface GroupListConfig extends FormItem {
tableItems?: FormConfig;
titleKey?: string;
itemExtra?: string | FilterFunction;
expandAll?: boolean;
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
defaultAdd?: (mForm: FormState | undefined, data: any) => any;
delete?: (model: any, index: number | string | symbol, values: any) => boolean | boolean;