diff --git a/src/views/configManage/configParamTreeTable/index.vue b/src/views/configManage/configParamTreeTable/index.vue index 7b398024..7297d1e1 100644 --- a/src/views/configManage/configParamTreeTable/index.vue +++ b/src/views/configManage/configParamTreeTable/index.vue @@ -828,8 +828,10 @@ function arrayAddInit(data: any[], dataRule: any) { for (const row of from.record) { const value = row.value; if (row.name === 'index') { - if (value !== '') { + if (len !== 0 && value !== '') { newIndex = parseInt(value) + 1; + } else { + newIndex = parseInt(value); } if (isNaN(newIndex)) { newIndex = 0; @@ -1366,7 +1368,7 @@ onMounted(() => { - ({{ text.value.map((s: any) => s.dnn).join() }}) + ({{ text.value?.map((s: any) => s.dnn).join() }})