From 627d74896dd09e9f75e08a482e7960901a4c5d17 Mon Sep 17 00:00:00 2001 From: ulleo Date: Mon, 23 Dec 2024 16:23:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E4=B8=8B=E9=92=BB=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E6=94=BE?= =?UTF-8?q?=E5=A4=A7=E6=8C=89=E9=92=AE=E5=8F=AF=E4=BB=A5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8B=E9=92=BB=E5=90=8E=E7=9A=84=E7=8A=B6=E6=80=81=20#11208?= =?UTF-8?q?=20(#14235)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/canvas/ComponentWrapper.vue | 5 +++++ .../src/components/visualization/UserViewEnlarge.vue | 1 + .../src/custom-component/user-view/Component.vue | 5 +++++ .../chart/components/views/components/DrillPath.vue | 9 +++++++++ .../src/views/chart/components/views/index.vue | 11 ++++++++++- 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index a370d94ec7..245f5ef3de 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -115,6 +115,10 @@ const props = defineProps({ type: String, required: false, default: 'inherit' + }, + optType: { + type: String, + required: false } }) const { @@ -418,6 +422,7 @@ const showActive = computed(() => props.popActive || (dvMainStore.mobileInPc && ref="component" class="component" :canvas-style-data="canvasStyleData" + :opt-type="optType" :dv-info="dvInfo" :dv-type="dvInfo.type" :canvas-view-info="canvasViewInfo" diff --git a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue index 0f47f210b8..bf4ef09f28 100644 --- a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue +++ b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue @@ -98,6 +98,7 @@ { :suffixId="suffixId" :font-family="fontFamily" @onPointClick="onPointClick" + :opt-type="optType" > diff --git a/core/core-frontend/src/views/chart/components/views/components/DrillPath.vue b/core/core-frontend/src/views/chart/components/views/components/DrillPath.vue index 3e9e3a7dbb..9bb9e7fb39 100644 --- a/core/core-frontend/src/views/chart/components/views/components/DrillPath.vue +++ b/core/core-frontend/src/views/chart/components/views/components/DrillPath.vue @@ -17,6 +17,11 @@ const props = defineProps({ type: Object, required: false, default: null + }, + disabled: { + type: Boolean, + required: false, + default: false } }) @@ -75,6 +80,7 @@ const drillPathVar = computed(() => [{ '--drill-color': textColor.value }]) v-if="props.drillFilters && props.drillFilters.length > 0" class="drill" :style="drillPathVar" + :class="{ noClick: disabled }" > @@ -119,4 +125,7 @@ const drillPathVar = computed(() => [{ '--drill-color': textColor.value }]) color: var(--drill-color) !important; } } +.noClick { + pointer-events: none; /* 禁止鼠标点击 */ +} diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index a5ee63e857..ba6d201d76 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -136,6 +136,10 @@ const props = defineProps({ type: String, required: false, default: 'inherit' + }, + optType: { + type: String, + required: false } }) const dynamicAreaId = ref('') @@ -714,6 +718,7 @@ const changeDataset = () => { } onMounted(() => { if (!view.value.isPlugin) { + state.drillClickDimensionList = view.value?.chartExtRequest?.drill ?? [] queryData(!showPosition.value.includes('viewDialog')) } if (!listenerEnable.value) { @@ -1223,7 +1228,11 @@ const titleTooltipWidth = computed(() => { :themes="canvasStyleData.dashboard.themeColor" :view-icon="view.type" > - +