From 07ee15ea32c1de6732a3cc64494120db312077f3 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 14 Oct 2024 15:37:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE=E5=A4=8Ddiv?= =?UTF-8?q?=20=E5=B5=8C=E5=85=A5=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=EF=BC=8C=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E7=B3=BB=E7=BB=9F=E7=9A=84=E8=B7=AF=E7=94=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/components/dashboard/DbToolbar.vue | 5 ++++- .../src/components/data-visualization/DvToolbar.vue | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index a07689c3e0..cc4e1a459b 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -219,7 +219,10 @@ const saveResource = () => { canvasSave(() => { snapshotStore.resetStyleChangeTimes() ElMessage.success('保存成功') - window.history.pushState({}, '', `#/dashboard?resourceId=${dvInfo.value.id}`) + let url = window.location.href + url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`) + window.history.replaceState(null, '', url) + if (appData.value) { initCanvasData(dvInfo.value.id, 'dashboard', () => { useEmitt().emitter.emit('refresh-dataset-selector') diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 163a03f1a8..39920bb4c4 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -161,7 +161,9 @@ const saveResource = () => { snapshotStore.resetStyleChangeTimes() wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id) ElMessage.success('保存成功') - window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`) + let url = window.location.href + url = url.replace(/\?opt=create/, `?dvId=${dvInfo.value.id}`) + window.history.replaceState(null, '', url) if (appData.value) { initCanvasData(dvInfo.value.id, 'dataV', () => { useEmitt().emitter.emit('refresh-dataset-selector')