Browse Source

epListTable 添加key

yunxing 4 years ago
parent
commit
afb62a0683
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/equipment/table/eqListTable.vue

+ 6 - 2
src/views/equipment/table/eqListTable.vue

@@ -99,7 +99,7 @@
             append-to-body
             :fullscreen='true'
         >
-            <eq-detail ref='qdDialog' :row='row' :major='major' :smsxt='smsxt' :diff='diff' :sign='sign'></eq-detail>
+            <eq-detail :key='`eqDetail${key}`' ref='qdDialog' :row='row' :major='major' :smsxt='smsxt' :diff='diff' :sign='sign'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -128,6 +128,7 @@ export default {
             type_name: '',
             floorAllSelect: [],
             sign: 1,
+            key: 1,
         }
     },
     computed: {
@@ -140,9 +141,12 @@ export default {
         },
         rowHandle(row) {
             this.type_name = row.type_name
-            this.innerVisible = true
             this.row = row
             this.sign = 1
+            this.$nextTick(() => {
+                this.key++
+                this.innerVisible = true
+            })
         },
         pageChanged(page) {
             this.currentPage = page