diff --git a/packages/form/src/containers/GroupListItem.vue b/packages/form/src/containers/GroupListItem.vue index e637e044..58a85602 100644 --- a/packages/form/src/containers/GroupListItem.vue +++ b/packages/form/src/containers/GroupListItem.vue @@ -76,7 +76,7 @@ const mForm = inject('mForm'); const expand = ref(false); watchEffect(() => { - expand.value = !props.index; + expand.value = props.config.expandAll || !props.index; }); const rowConfig = computed(() => ({ diff --git a/packages/form/src/schema.ts b/packages/form/src/schema.ts index d36f2e23..c408c9f0 100644 --- a/packages/form/src/schema.ts +++ b/packages/form/src/schema.ts @@ -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;