Procházet zdrojové kódy

fix: 优化排序更新逻辑

johnsen před 7 měsíci
rodič
revize
0ad32f430a

+ 6 - 2
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -422,7 +422,8 @@ export default {
       oldList: [], // 子表旧数据
       importList: [],
       importValue: null,
-      actionButton: null
+      actionButton: null,
+      sortFlag: false
     }
   },
   computed: {
@@ -653,6 +654,7 @@ export default {
       tem.forEach((t, index) => {
         t.tenantId = index
       })
+      this.sortFlag = true
       this.$emit('update:value', tem)
     },
     handleRefreshTable() {
@@ -674,8 +676,10 @@ export default {
       this.$emit('change-data', key, val)
     },
     handlePagination(val) {
-      if (this.canSortable) {
+      if (this.canSortable && this.sortFlag) {
+        console.log('我tmd的来了')
         this.copDataModel = []
+        this.sortFlag = false
       }
       this.$nextTick(() => {
         this.totalCount = val.length