feat: 拖拽中无需计算hover

This commit is contained in:
Ming 2023-05-04 17:07:35 +08:00
parent 2a35d9a9e5
commit 4f0b57b2af

View File

@ -23,6 +23,8 @@
<script setup lang="ts">
import { computed, PropType } from 'vue'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
import { useDesignStore } from '@/store/modules/designStore/designStore'
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
import { useSizeStyle, usePointStyle } from '../../hooks/useStyle.hook'
@ -55,6 +57,9 @@ const themeColor = computed(() => {
//
const hover = computed(() => {
const isDrag = chartEditStore.getEditCanvas[EditCanvasTypeEnum.IS_DRAG]
if (isDrag) return false
if (props.item.status.lock) return false
return props.item.id === chartEditStore.getTargetChart.hoverId
})