From 4b21e598db7645b5681140310acfb8d53716e932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Wed, 17 Aug 2022 17:56:20 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E4=B8=AD=E5=88=86=E7=BB=84=E7=9A=84=E5=8F=B3=E9=94=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/LayersGroupListItem/index.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue b/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue index 73dabbff..26bd65c3 100644 --- a/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue +++ b/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue @@ -34,7 +34,7 @@ @mousedown="mousedownHandle($event, element, componentGroupData.id)" @mouseenter="mouseenterHandle(element)" @mouseleave="mouseleaveHandle(element)" - @contextmenu="handleContextMenu($event, componentGroupData, undefined, undefined, pickOptionsList)" + @contextmenu="handleContextMenu($event, componentGroupData, optionsHandle)" > @@ -144,21 +144,21 @@ const groupMousedownHandle = (e: MouseEvent) => { } // 公共点击事件 -const mousedownHandle = (e: MouseEvent, item: CreateComponentType | CreateComponentGroupType, id?: string) => { +const mousedownHandle = (e: MouseEvent, componentInstance: CreateComponentType | CreateComponentGroupType, id?: string) => { e.preventDefault() e.stopPropagation() onClickOutSide() - chartEditStore.setTargetSelectChart(id || item.id) + chartEditStore.setTargetSelectChart(id || componentInstance.id) } // 公共进入事件 -const mouseenterHandle = (item: CreateComponentType | CreateComponentGroupType) => { - chartEditStore.setTargetHoverChart(item.id) +const mouseenterHandle = (componentInstance: CreateComponentType | CreateComponentGroupType) => { + chartEditStore.setTargetHoverChart(componentInstance.id) } // 公共移出事件 -const mouseleaveHandle = (item: CreateComponentType | CreateComponentGroupType) => { +const mouseleaveHandle = (componentInstance: CreateComponentType | CreateComponentGroupType) => { chartEditStore.setTargetHoverChart(undefined) }