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 fb5d2a622e..c90af98717 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 @@ -86,7 +86,12 @@ const appStore = useAppStoreWithOut() const embeddedStore = useEmbedded() const { t } = useI18n() const route = useRoute() -const { push } = useRouter() +const { push } = useRouter() || { + push: val => { + if (embeddedStore.getToken) return + window.location.href = val as string + } +} const quotaTableHeight = ref(238) const creatDsFolder = ref() const editCalcField = ref(false) diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 921b64607f..cea4067e38 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -1051,7 +1051,7 @@ onMounted(() => { loadInit() listDs() setSupportSetKey() - const { opt } = router.currentRoute.value.query + const { opt } = router?.currentRoute?.value?.query || {} if (opt && opt === 'create') { datasourceEditor.value.init(null, null, null, isSupportSetKey.value) }