From 687cc79635e3f044c1d27cffd1f3ee916501105a Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 14 Oct 2024 17:49:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E6=9B=B4=E6=8D=A2=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=84=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/DvToolbar.vue | 2 +- .../src/views/data-visualization/index.vue | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 39920bb4c4..27ea637cc2 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -346,7 +346,7 @@ const fullScreenPreview = () => { diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue index ee32ec1983..aa25045d6e 100644 --- a/core/core-frontend/src/views/data-visualization/index.vue +++ b/core/core-frontend/src/views/data-visualization/index.vue @@ -11,7 +11,7 @@ import { storeToRefs } from 'pinia' import DvToolbar from '../../components/data-visualization/DvToolbar.vue' import ComponentToolBar from '../../components/data-visualization/ComponentToolBar.vue' import eventBus from '../../utils/eventBus' -import findComponent from '../../utils/components' +import { findComponentAttr } from '../../utils/components' import DvSidebar from '../../components/visualization/DvSidebar.vue' import router from '@/router' import Editor from '@/views/chart/components/editor/index.vue' @@ -375,17 +375,26 @@ onUnmounted(() => { const previewStatus = computed(() => editMode.value === 'preview') -const commonPropertiesShow = computed( - () => +const otherEditorShow = computed(() => { + return Boolean( curComponent.value && - !['UserView', 'GroupArea', 'VQuery'].includes(curComponent.value.component) -) + (!['UserView', 'GroupArea', 'VQuery'].includes(curComponent.value?.component) || + (curComponent.value?.component === 'UserView' && + curComponent.value?.innerType === 'picture-group')) && + !batchOptStatus.value + ) +}) const canvasPropertiesShow = computed( () => !curComponent.value || ['GroupArea'].includes(curComponent.value.component) ) -const viewsPropertiesShow = computed( - () => !!(curComponent.value && ['UserView', 'VQuery'].includes(curComponent.value.component)) -) +const viewsPropertiesShow = computed(() => { + return Boolean( + curComponent.value && + ['UserView', 'VQuery'].includes(curComponent.value.component) && + curComponent.value.innerType !== 'picture-group' && + !batchOptStatus.value + ) +}) const scrollCanvas = e => { deWRulerRef.value.rulerScroll(e) @@ -475,7 +484,7 @@ eventBus.on('handleNew', handleNew)