瀏覽代碼

图层更改

qianlishi 4 年之前
父節點
當前提交
00052fd175
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      report-ui/src/views/report/bigscreen/designer/index.vue

+ 5 - 5
report-ui/src/views/report/bigscreen/designer/index.vue

@@ -705,15 +705,15 @@ export default {
     },
     // 置顶
     istopLayer() {
-      if (this.rightClickIndex != 0) {
-        this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]);
+      if (this.rightClickIndex + 1 < this.widgets.length) {
+        const temp = this.widgets.splice(this.rightClickIndex, 1)[0];
+        this.widgets.push(temp);
       }
     },
     // 置底
     setlowLayer() {
-      if (this.rightClickIndex + 1 < this.widgets.length) {
-        const temp = this.widgets.splice(this.rightClickIndex, 1)[0];
-        this.widgets.push(temp);
+      if (this.rightClickIndex != 0) {
+        this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]);
       }
     },
     // 上移一层