diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index d62a0393a9..a50e549b17 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -224,7 +224,15 @@ const saveResource = () => { ElMessage.success(t('common.save_success')) let url = window.location.href url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`) - window.history.replaceState(null, '', url) + if (!embeddedStore.baseUrl) { + window.history.replaceState( + { + path: url + }, + '', + url + ) + } if (appData.value) { initCanvasData(dvInfo.value.id, 'dashboard', () => { diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 0fa706ec73..09e18c7993 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -166,7 +166,15 @@ const saveResource = () => { ElMessage.success('保存成功') let url = window.location.href url = url.replace(/\?opt=create/, `?dvId=${dvInfo.value.id}`) - window.history.replaceState(null, '', url) + if (!embeddedStore.baseUrl) { + window.history.replaceState( + { + path: url + }, + '', + url + ) + } if (appData.value) { initCanvasData(dvInfo.value.id, 'dataV', () => { useEmitt().emitter.emit('refresh-dataset-selector')