From 36bcc92508d98161b60f619663dbfcfda5dd09b2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 13 Jun 2025 09:26:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8C=85=E5=90=AB=E8=AE=A1=E7=AE=97=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E8=8A=82=E7=82=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/visualization/JumpSetOuterContentEditor.vue | 2 +- .../src/custom-component/rich-text/DeRichTextView.vue | 2 +- core/core-frontend/src/utils/canvasUtils.ts | 2 +- .../editor/editor-style/components/table/CustomAggrEdit.vue | 2 +- .../views/visualized/data/dataset/form/CalcFieldEdit.vue | 2 +- .../src/views/visualized/data/dataset/form/DatasetUnion.vue | 4 ++-- .../src/views/visualized/data/dataset/form/index.vue | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/core-frontend/src/components/visualization/JumpSetOuterContentEditor.vue b/core/core-frontend/src/components/visualization/JumpSetOuterContentEditor.vue index ec6619416a..777c00b28a 100644 --- a/core/core-frontend/src/components/visualization/JumpSetOuterContentEditor.vue +++ b/core/core-frontend/src/components/visualization/JumpSetOuterContentEditor.vue @@ -40,7 +40,7 @@ const setNameIdTrans = (from, to, originName, name2Auto?: string[]) => { pre[next[from]] = next[to] return pre }, {}) - const on = originName.match(/\[(.+?)\]/g) + const on = originName.match(/\[(.+?)\]/g) || [] if (on) { on.forEach(itm => { const ele = itm.slice(1, -1) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index 06d92941ef..bc82c27638 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -370,7 +370,7 @@ const jumpTargetAdaptor = () => { const assignment = content => { if (content) { - const on = content?.match(/\[(.+?)\]/g) + const on = content?.match(/\[(.+?)\]/g) || [] if (on) { const thresholdStyleInfo = conditionAdaptor(state.viewDataInfo) on.forEach(itm => { diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index c8ab977360..36c009f8c4 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -660,7 +660,7 @@ export function setIdValueTrans(from, to, content, colList) { pre[next[from]] = next[to] return pre }, {}) - const on = content?.match(/\[(.+?)\]/g) + const on = content?.match(/\[(.+?)\]/g) || [] if (on) { on.forEach(itm => { const ele = itm.slice(1, -1) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/CustomAggrEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/CustomAggrEdit.vue index 753d8f8871..a5ae29cb86 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/CustomAggrEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/CustomAggrEdit.vue @@ -81,7 +81,7 @@ const setNameIdTrans = (from, to, originName, name2Auto?: string[]) => { pre[next[from]] = next[to] return pre }, {}) - const on = originName.match(/\[(.+?)\]/g) + const on = originName.match(/\[(.+?)\]/g) || [] if (on) { on.forEach(itm => { const ele = itm.slice(1, -1) diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue b/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue index 62a203f93f..78105361a7 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/CalcFieldEdit.vue @@ -140,7 +140,7 @@ const setNameIdTrans = (from, to, originName, name2Auto?: string[]) => { pre[next[from]] = next[to] return pre }, {}) - const on = originName.match(/\[(.+?)\]/g) + const on = originName.match(/\[(.+?)\]/g) || [] if (on) { on.forEach(itm => { const ele = itm.slice(1, -1) diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue index 6d95dd7cdf..311cae568e 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue @@ -374,7 +374,7 @@ const confirmEditUnion = () => { if (!!ids.length) { const idArr = allfields.value.reduce((pre, next) => { if (next.extField === 2) { - let idMap = next.originName.match(/\[(.+?)\]/g) + let idMap = next.originName.match(/\[(.+?)\]/g) || [] idMap = idMap.filter( itx => !next.params?.map(element => element.id).includes(itx.slice(1, -1)) ) @@ -462,7 +462,7 @@ const handleCommand = (ele, command) => { if (!!fakeDelId.length) { const idArr = allfields.value.reduce((pre, next) => { if (next.extField === 2) { - const idMap = next.originName.match(/\[(.+?)\]/g) + const idMap = next.originName.match(/\[(.+?)\]/g) || [] const result = idMap.map(itm => { return itm.slice(1, -1) }) diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue index 6396a37d37..8fb508cf1f 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue @@ -493,7 +493,7 @@ const delFieldById = arr => { const allfieldsId = allfields.value.map(ele => ele.id).concat(paramsId) allfields.value = allfields.value.filter(ele => { if (![2, 3].includes(ele.extField)) return true - const idMap = ele.originName.match(/\[(.+?)\]/g) + const idMap = ele.originName.match(/\[(.+?)\]/g) || [] if (!idMap) return true const result = idMap.every(itm => { const id = itm.slice(1, -1) @@ -518,7 +518,7 @@ const delFieldByIdFake = (arr, fakeAllfields) => { const allfieldsId = fakeAllfields.map(ele => ele.id) fakeAllfields = fakeAllfields.filter(ele => { if (![2, 3].includes(ele.extField)) return true - const idMap = ele.originName.match(/\[(.+?)\]/g) + const idMap = ele.originName.match(/\[(.+?)\]/g) || [] if ( !idMap || idMap.every(itx => ele.params?.map(element => element.id).includes(itx.slice(1, -1))) @@ -971,7 +971,7 @@ const confirmEditUnion = () => { if (!!idList.length) { const idArr = allfields.value.reduce((pre, next) => { if (idList.includes(next.id)) { - const idMap = next.originName.match(/\[(.+?)\]/g) + const idMap = next.originName.match(/\[(.+?)\]/g) || [] const result = idMap.map(itm => { return itm.slice(1, -1) })