소스 검색

bug 修复

lilei 3 년 전
부모
커밋
6c1119b56a
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      src/components/Table/index.js

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

@@ -148,10 +148,9 @@ export default {
     // 重置表格为空
     clearTable () {
       this.localLoading = false
-      this.needTotalList= []
-      this.selectedRows= []
-      this.selectedRowKeys= []
       this.localDataSource = []
+      this.needTotalList = []
+      this.clearSelected()
       this.localPagination = Object.assign({}, {
         current: 1, pageSize: this.pageSize, total: 0
       })
@@ -303,8 +302,6 @@ export default {
      */
     clearSelected () {
       if (this.rowSelection) {
-        // this.rowSelection.onChange([], [])
-        // this.updateSelect([], [])
         this.selectedRows = []
         this.selectedRowKeys = []
         this.updateSelect()