소스 검색

perf: 优化框选功能

奔跑的面条 2 년 전
부모
커밋
3a391665d2
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/views/chart/ContentEdit/components/EditSelect/index.vue
  2. 1 1
      src/views/chart/ContentEdit/hooks/useDrag.hook.ts

+ 2 - 2
src/views/chart/ContentEdit/components/EditSelect/index.vue

@@ -93,7 +93,7 @@ watch(
     position: absolute;
     width: 100%;
     height: 100%;
-    border-radius: 10px;
+    border-radius: 5px;
     overflow: hidden;
   }
   .select-border {
@@ -107,7 +107,7 @@ watch(
   .select-background {
     top: 2px;
     left: 2px;
-    opacity: 0.03;
+    opacity: 0.2;
     background-color: v-bind('themeColor');
   }
 }

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

@@ -152,7 +152,7 @@ export const mousedownBoxSelect = (e: MouseEvent, item?: CreateComponentType | C
         }
       }
     })
-  }, 20)
+  }, 30)
 
   // 鼠标抬起
   const mouseup = () => {