From 819a083bae09c6e0af11991903e51f4e22b5c597 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 21 Feb 2022 12:42:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B0=94=E6=B3=A1=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserView.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index a17634a791..a0243333f4 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -164,9 +164,7 @@ export default { sourceCustomStyleStr: null } }, - mounted() { - this.bindPluginEvent() - }, + computed: { scaleCoefficient() { if (this.terminal === 'pc' && !this.mobileLayoutStatus) { @@ -351,6 +349,9 @@ export default { deep: true } }, + mounted() { + this.bindPluginEvent() + }, created() { this.refId = uuid.v1 @@ -362,10 +363,17 @@ export default { }, methods: { bindPluginEvent() { - bus.$on('plugin-chart-click', this.chartClick) - bus.$on('plugin-jump-click', this.jumpClick) - bus.$on('plugin-add-view-track-filter', this.addViewTrackFilter) + bus.$on('plugin-chart-click', param => { + param.viewId && param.viewId === this.element.propValue.viewId && this.chartClick(param) + }) + bus.$on('plugin-jump-click', param => { + param.viewId && param.viewId === this.element.propValue.viewId && this.jumpClick(param) + }) + bus.$on('plugin-add-view-track-filter', param => { + param.viewId && param.viewId === this.element.propValue.viewId && this.addViewTrackFilter(param) + }) }, + addViewTrackFilter(linkageParam) { this.$store.commit('addViewTrackFilter', linkageParam) },