傅豪杰 1 سال پیش
والد
کامیت
8fc9a237d3
1فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 8 4
      ruoyi-ui/src/views/template/addTemplate/blocks/detailDialog.vue

+ 8 - 4
ruoyi-ui/src/views/template/addTemplate/blocks/detailDialog.vue

@@ -35,6 +35,7 @@
         <div class="box-canvs">
           <div class="box-canvs-main" :style="{ backgroundImage: `url(${fromData.backgroundPictureUrl?baseUrl+fromData.backgroundPictureUrl:''})` }">
             <grid-layout 
+              :key="pageArray.length"
               :layout.sync="pageArray"
               :col-num="6"
               :row-height="30"
@@ -44,12 +45,12 @@
               :vertical-compact="false"
               :prevent-collision="true"
               :margin="[10, 10]"
-              :use-css-transforms="true"
+              :use-css-transforms="false"
               class="box-canvs-main-screen"
             >
               <grid-item 
                 v-for="(item, index) in pageArray"
-                :key="index"
+                :key="index+'_'+item.h+'_'+item.w"
                 :x="Number(item.x)"
                 :y="Number(item.y)"
                 :w="Number(item.w)"
@@ -355,9 +356,12 @@ export default {
       this.initBtnFormData(this.pageArray.length-1);
     },
     removeBtn(index) {
-      const tmpList = this.pageArray
+      const tmpList = this.pageArray.concat();
       tmpList.splice(index, 1)
-      this.pageArray = [...tmpList]
+      this.isShowSeting = false
+      this.currentCpn = '';
+      this.pageArray = tmpList
+
     },
     showSeting(index) {
       this.activeName = 'second'