From 3f20faf5be938584c747ac9d5eebd0f6cc7de6f3 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 18 Dec 2023 20:23:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=83=BD=E6=98=AF=E5=8F=AF=E9=80=89=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/configManage/configParamTreeTable/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/configManage/configParamTreeTable/index.vue b/src/views/configManage/configParamTreeTable/index.vue index 39b69e24..d06b0902 100644 --- a/src/views/configManage/configParamTreeTable/index.vue +++ b/src/views/configManage/configParamTreeTable/index.vue @@ -837,6 +837,8 @@ function arrayEditInit(data: Record, dataRule: any) { if (!item) { continue; } + // 可选的 + row.optional = 'true'; // 根据规则类型转值 if (['enum', 'int'].includes(row.type)) { row.value = Number(item.value); @@ -870,6 +872,8 @@ function arrayAddInit(data: any[], dataRule: any) { row.value = []; continue; } + // 可选的 + row.optional = 'true'; // index值 if (row.name === 'index') { let newIndex = dataLastIndex !== 0 ? dataLastIndex : parseInt(row.value); @@ -904,7 +908,7 @@ function ruleVerification(row: Record): (string | boolean)[] { if (row.array) { return result; } - + // 可选的同时没有值不检查 if (row.optional === 'true' && !value) { return result;