lianghongjie 1 anno fa
parent
commit
d83762325c

+ 15 - 15
src/controllers/wxController.ts

@@ -8,21 +8,21 @@ function isWeixinBrowser() {
   return /micromessenger/.test(ua) ? true : false;
 }
 
-function isIos() {
-  if (/(iphone|ipad|ipod|ios)/i.test(ua)) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-function isAndroid() {
-  if (/(android)/i.test(ua)) {
-    return true;
-  } else {
-    return false;
-  }
-}
+// function isIos() {
+//   if (/(iphone|ipad|ipod|ios)/i.test(ua)) {
+//     return true;
+//   } else {
+//     return false;
+//   }
+// }
+
+// function isAndroid() {
+//   if (/(android)/i.test(ua)) {
+//     return true;
+//   } else {
+//     return false;
+//   }
+// }
 
 export class wxController {
   signSuccess = false;

+ 1 - 1
src/modules/editor/controllers/TransferCtrl/transforms/resize.ts

@@ -2,7 +2,7 @@ import { TransCreateFn, TransferCtrl } from "..";
 
 function getResize(this: TransferCtrl, direction: string) {
   const { transEvent, currComp } = this;
-  const size = currComp.layout.size ? [...currComp.layout.size] : [0, 0];
+  const size = [...(currComp.layout.size || [])];
   if (direction.indexOf("x") != -1) {
     size[0] = transEvent.width + transEvent.offsetX * 2;
   }