From 9281d067234ceb24e0712901ed27984e8e6c60ba Mon Sep 17 00:00:00 2001 From: roymondchen Date: Tue, 30 May 2023 17:41:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(form):=20groupList=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=B1=95=E5=BC=80=E6=89=80=E6=9C=89=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/form/src/containers/GroupListItem.vue | 2 +- packages/form/src/schema.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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;