Explorar el Código

feat: 锁定和隐藏组件不能被框选

tnt group hace 3 años
padre
commit
cc97672fcc
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/views/chart/ContentEdit/hooks/useDrag.hook.ts

+ 3 - 1
src/views/chart/ContentEdit/hooks/useDrag.hook.ts

@@ -140,7 +140,9 @@ export const mousedownBoxSelect = (e: MouseEvent, item?: CreateComponentType | C
           targetAttr.x1 - selectAttr.x1 >= 0 &&
           targetAttr.y1 - selectAttr.y1 >= 0 &&
           targetAttr.x2 - selectAttr.x2 <= 0 &&
-          targetAttr.y2 - selectAttr.y2 <= 0
+          targetAttr.y2 - selectAttr.y2 <= 0 &&
+          !item.status.lock &&
+          !item.status.hide
         ) {
           isSelect = true
           chartEditStore.setTargetSelectChart(item.id, true)