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)//实际造成隐藏效果 }