Эх сурвалжийг харах

航站视图-loading修改

zhongxiaoyu 1 жил өмнө
parent
commit
45576ca229

+ 4 - 3
src/views/newQuery/components/table.vue

@@ -181,7 +181,8 @@ export default {
   watch: {
     tableTag: {
       async handler (val) {
-        this.dataContent = val
+        this.dataContent = _.cloneDeep(val)
+        delete this.dataContent.shouldReset
         this.restTable()
         if (val.shouldReset) {
           this.$emit('update:shouldReset', true)
@@ -319,12 +320,12 @@ export default {
             this.page--
             this.noMore = true
             this.loading = false
-            return
           }
           if (this.shouldReset) {
             this.tableData.push(...returnData)
           } else {
             this.tableData = [...returnData]
+            this.noMore = true
           }
           this.$emit('tableLoad', [...this.tableData])
           setTimeout(() => {
@@ -343,8 +344,8 @@ export default {
     restTable () {
       this.loading = false
       this.page = 0
+      this.noMore = false
       if (this.shouldReset) {
-        this.noMore = false
         this.tableData = []
       }
     },