Browse Source

bug 修复

lilei 4 years ago
parent
commit
a91b502f29
1 changed files with 9 additions and 2 deletions
  1. 9 2
      src/components/Table/index.js

+ 9 - 2
src/components/Table/index.js

@@ -74,7 +74,12 @@ export default {
     pageURI: {
       type: Boolean,
       default: false
-    }
+    },
+    /** 是否首次加载数据 */
+    defaultLoadData: {
+      type: Boolean,
+      default: true
+    },
   }),
   watch: {
     'localPagination.current' (val) {
@@ -112,7 +117,9 @@ export default {
     }) || false
     console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
-    this.loadData()
+    if(this.defaultLoadData){
+      this.loadData()
+    }
   },
   methods: {
     /**