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;