diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index 13068f522a..90a8e4ad5b 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -2,8 +2,9 @@ import { ElMessage, ElMessageBox } from 'element-plus-secondary' import eventBus from '@/utils/eventBus' import { deepCopy } from '@/utils/utils' -import { nextTick, reactive, ref, computed, onMounted } from 'vue' +import { nextTick, reactive, ref, computed } from 'vue' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' +import { useAppStoreWithOut } from '@/store/modules/app' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { storeToRefs } from 'pinia' import Icon from '../icon-custom/src/Icon.vue' @@ -307,10 +308,8 @@ const saveLinkageSetting = () => { const onDvNameChange = () => { snapshotStore.recordSnapshotCache() } -const isDataEaseBi = ref(false) -onMounted(() => { - isDataEaseBi.value = !!window.DataEaseBi -}) +const appStore = useAppStoreWithOut() +const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)