diff --git a/frontend/src/views/chart/view/CalcChartFieldEdit.vue b/frontend/src/views/chart/view/CalcChartFieldEdit.vue index a212dcdd1b..ce6e3a49fb 100644 --- a/frontend/src/views/chart/view/CalcChartFieldEdit.vue +++ b/frontend/src/views/chart/view/CalcChartFieldEdit.vue @@ -420,9 +420,10 @@ export default { pre[next[from]] = next[to] return pre }, {}) - const on = originName.match(/(?<=\[).+?(?=\])/g) + const on = originName.match(/\[(.+?)\]/g) if (on) { - on.forEach(ele => { + on.forEach(itm => { + const ele = itm.slice(1, -1) if (name2Auto) { name2Auto.push(nameIdMap[ele]) } diff --git a/frontend/src/views/dataset/data/CalcFieldEdit.vue b/frontend/src/views/dataset/data/CalcFieldEdit.vue index 2776a86ef0..58c12bfdb3 100644 --- a/frontend/src/views/dataset/data/CalcFieldEdit.vue +++ b/frontend/src/views/dataset/data/CalcFieldEdit.vue @@ -371,9 +371,10 @@ export default { pre[next[from]] = next[to] return pre }, {}) - const on = originName.match(/(?<=\[).+?(?=\])/g) + const on = originName.match(/\[(.+?)\]/g) if (on) { - on.forEach(ele => { + on.forEach(itm => { + const ele = itm.slice(1, -1) if (name2Auto) { name2Auto.push(nameIdMap[ele]) }