Pārlūkot izejas kodu

fix:优化框选组件有时选不上的问题

liu.shiyi 1 gadu atpakaļ
vecāks
revīzija
1d7429f541

+ 3 - 3
data-room-ui/packages/BigScreenDesign/MouseSelect/index.vue

@@ -143,9 +143,9 @@ export default {
       if (event.button === 0 && this.isSelecting) {
         this.isSelecting = false
         if (newTime - time < 300) {
-          newTime = 0
-          time = 0
-          return
+          // newTime = 0
+          // time = 0
+          // return
         }
         newTime = 0
         time = 0

+ 1 - 1
data-room-ui/packages/BigScreenDesign/index.vue

@@ -513,7 +513,7 @@ export default {
       const activeCodes = this.chartList
         ?.filter((chart) => {
           const { x, y, w, h } = chart
-          return startX <= x && x + w <= endX && startY <= y && y + h <= endY
+          return startX - 50 <= x && x + w <= endX && startY - 50 <= y && y + h <= endY
         })
         ?.map((chart) => chart.code)
       this.changeActiveCodes(activeCodes)