diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index 938f1baa45..9f44ec5270 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -549,7 +549,7 @@ const initOpenHandler = newWindow => { is-label :base-width="115" :icon-name="dvMoreCom" - :title="'visualization.more'" + :title="t('visualization.more')" > diff --git a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue index 277c5c1bd7..a0e0ecd2a5 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue @@ -2,7 +2,7 @@ import { getCanvasStyle, getShapeItemStyle } from '@/utils/style' import ComponentWrapper from './ComponentWrapper.vue' import { changeStyleWithScale } from '@/utils/translate' -import { computed, nextTick, ref, toRefs, watch, onBeforeUnmount, onMounted } from 'vue' +import { computed, nextTick, ref, toRefs, watch, onBeforeUnmount, onMounted, reactive } from 'vue' import { changeRefComponentsSizeWithScalePoint } from '@/utils/changeComponentsSizeWithScale' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' @@ -105,6 +105,9 @@ const renderReady = ref(false) const dashboardActive = computed(() => { return dvInfo.value.type === 'dashboard' }) +const state = reactive({ + initState: true +}) const curSearchCount = computed(() => { return outerSearchCount.value + searchCount.value @@ -304,9 +307,9 @@ const winMsgHandle = event => { isMainCanvas(canvasId.value) ) { const attachParams = msgInfo.params - if (attachParams) { - dvMainStore.addOuterParamsFilter(attachParams, baseComponentData.value, 'outer') - } + state.initState = false + dvMainStore.addOuterParamsFilter(attachParams, baseComponentData.value, 'outer') + state.initState = true } } @@ -402,6 +405,7 @@ defineExpose({ :class="{ 'de-download-custom': downloadStatus, 'datav-preview': dataVPreview }" ref="previewCanvas" @mousedown="handleMouseDown" + v-if="state.initState" > diff --git a/core/core-frontend/src/pages/panel/DashboardPreview.vue b/core/core-frontend/src/pages/panel/DashboardPreview.vue index ed92398eef..8411f11390 100644 --- a/core/core-frontend/src/pages/panel/DashboardPreview.vue +++ b/core/core-frontend/src/pages/panel/DashboardPreview.vue @@ -11,8 +11,6 @@ import { getOuterParamsInfo } from '@/api/visualization/outerParams' import { ElMessage } from 'element-plus-secondary' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { useI18n } from '@/hooks/web/useI18n' -import VanSticky from 'vant/es/sticky' -import VanNavBar from 'vant/es/nav-bar' import request from '@/config/axios' import 'vant/es/nav-bar/style' import 'vant/es/sticky/style' @@ -29,7 +27,8 @@ const state = reactive({ canvasStylePreview: null, canvasViewInfoPreview: null, dvInfo: null, - curPreviewGap: 0 + curPreviewGap: 0, + initState: true }) const dvMainStore = dvMainStoreWithOut() @@ -106,9 +105,9 @@ onBeforeMount(async () => { nextTick(() => { dashboardPreview.value.restore() }) - if (attachParams) { - dvMainStore.addOuterParamsFilter(attachParams, canvasDataResult, 'outer') - } + state.initState = false + dvMainStore.addOuterParamsFilter(attachParams, canvasDataResult, 'outer') + state.initState = true } ) }) @@ -117,7 +116,7 @@ onBeforeMount(async () => {