浏览代码

bug 修复

lilei 4 年之前
父节点
当前提交
a91b502f29
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      src/components/Table/index.js

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

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