From 156436721c4057fcbf8a5b4c80642367e4103cf4 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Wed, 24 Jul 2024 10:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9A=E6=89=93=E5=BC=80?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=97=B6,=E5=85=B3=E8=81=94=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E8=AE=BE=E7=BD=AE=E6=B2=A1=E6=9C=89=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=9A=84bug,=E5=8C=85=E6=8B=AC=E5=BC=80?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/public/form/form.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue index 59b9e9f..6b5a156 100644 --- a/src/components/DesignForm/public/form/form.vue +++ b/src/components/DesignForm/public/form/form.vue @@ -165,15 +165,18 @@ const forEachGetFormModel = (list: FormList[], obj: any) => { }) } else if (['card', 'div'].includes(item.type)) { forEachGetFormModel(item.list, obj) - } /* else if(['switch'].includes(item.type)){ - console.log(item) - } */else { + }else { const excludeType = ['title', 'divider', 'txt', 'button'] if (excludeType.indexOf(item.type) === -1) { obj[item.name] = jsonParseStringify(item.control.modelValue) + if(['switch'].includes(item.type)){ + model.value[item.name] = jsonParseStringify(item.control.inactiveValue) + console.log(model.value) + } } } }) + showOrHide() } function arrayEqual(a: string[], b: any[]) { @@ -401,7 +404,7 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st //编辑表单页不隐藏任何字段。 if(formProps.value.type!=5){ - console.log(hideFieldArr) + //console.log(hideFieldArr) props.formData.config.hideField?.push(...hideFieldArr)//实际造成隐藏效果 }