Prechádzať zdrojové kódy

Merge branch 'master' of http://git.dayaedu.com/lex/classroom-instruments

liushengqiang 1 rok pred
rodič
commit
e80d96e75e
1 zmenil súbory, kde vykonal 8 pridanie a 8 odobranie
  1. 8 8
      src/components/layout/index.tsx

+ 8 - 8
src/components/layout/index.tsx

@@ -91,22 +91,22 @@ export default defineComponent({
                 ) - RectInfo.height;
 
               if (left < 0) {
-                left = 0;
+                left = 2;
               }
               if (top < 0) {
-                top = 0;
+                top = 2;
               }
               if (right < 0) {
-                right = 0;
+                right = 2;
               }
               if (bottom < 0) {
-                bottom = 0;
+                bottom = 2;
               }
-              if (left > mainWidth) {
-                left = mainWidth;
+              if (left > mainWidth - 2) {
+                left = mainWidth - 2;
               }
-              if (top > mainHeight) {
-                top = mainHeight;
+              if (top > mainHeight - 2) {
+                top = mainHeight - 2;
               }
 
               target!.style.left = `${left}px`;