Skip to content

Commit 8c3fd48

Browse files
lfzmsendya
authored andcommitted
fix: Error when totalCount is empty
Error when totalCount is empty
1 parent 4259cf2 commit 8c3fd48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Table/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default {
154154
// 这里用于判断接口是否有返回 r.totalCount 或 this.showPagination = false
155155
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
156156

157-
(!this.showPagination || !r.totalCount && this.showPagination === 'auto') && (this.localPagination = false)
157+
(!this.showPagination || !r.totalCount && this.showPagination === 'auto') && (this.localPagination.hideOnSinglePage = true)
158158
this.localDataSource = r.data // 返回结果中的数组数据
159159
this.localLoading = false
160160
})

0 commit comments

Comments
 (0)