From 668ce3e9b36c047efc68f418e782bad74f189651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sat, 8 Apr 2023 22:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG:=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE,=E5=80=BC=E4=B8=BAfalse=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/config/components/formContent.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/views/system/config/components/formContent.vue b/web/src/views/system/config/components/formContent.vue index b1f6eb1..c4ce14c 100644 --- a/web/src/views/system/config/components/formContent.vue +++ b/web/src/views/system/config/components/formContent.vue @@ -84,6 +84,7 @@ :key="index" v-else-if="item.form_item_type_label === 'switch'" v-model="form[item.key]" + :inactive-value="false" active-color="#13ce66" inactive-color="#ff4949"> @@ -310,7 +311,7 @@ export default { if ([5, 12, 14].indexOf(item.form_item_type) !== -1) { form[key] = [] } else { - form[key] = undefined + form[key] = item.value } } if (item.form_item_type_label === 'array') { @@ -321,7 +322,7 @@ export default { }) } } - this.form = JSON.parse(JSON.stringify(form)) + this.form = Object.assign({}, form) }) }, // 提交数据