浏览代码

water dot

deepsea 1 年之前
父节点
当前提交
caf71bf18c
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/store/modules/bench/mutations.js

+ 5 - 2
src/store/modules/bench/mutations.js

@@ -10,8 +10,11 @@ export default {
       for (let key in benchInfo) {
         bench[key] = benchInfo[key]
       }
-      bench.left = Math.random() * 90 + (i * (Math.random() * 10 + 10)) + 300;
-      bench.top = Math.random() * 80 + (i * (Math.random() * 10 + 10)) + 200;
+      if (!bench.isFixed) {
+        bench.left = Math.random() * 90 + (i * (Math.random() * 10 + 10)) + 300;
+        bench.top = Math.random() * 80 + (i * (Math.random() * 10 + 10)) + 200;
+        bench.isFixed = true;
+      }
 
       bench.status = "ready";
       bench.name = "";