File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export default {
59
59
default : false
60
60
} ,
61
61
showPagination : {
62
- type : String ,
62
+ type : String | Boolean ,
63
63
default : 'auto'
64
64
}
65
65
} ) ,
@@ -119,9 +119,9 @@ export default {
119
119
this . localLoading = true
120
120
const parameter = Object . assign ( {
121
121
pageNo : ( pagination && pagination . current ) ||
122
- this . localPagination . current ,
122
+ this . localPagination . current || this . pageNum ,
123
123
pageSize : ( pagination && pagination . pageSize ) ||
124
- this . localPagination . pageSize
124
+ this . localPagination . pageSize || this . pageSize
125
125
} ,
126
126
( sorter && sorter . field && {
127
127
sortField : sorter . field
@@ -153,7 +153,8 @@ export default {
153
153
154
154
// 这里用于判断接口是否有返回 r.totalCount 或 this.showPagination = false
155
155
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
156
- ! r . totalCount && [ 'auto' , false ] . includes ( this . showPagination ) && ( this . localPagination = false )
156
+
157
+ ( ! this . showPagination || ! r . totalCount && this . showPagination === 'auto' ) && ( this . localPagination = false )
157
158
this . localDataSource = r . data // 返回结果中的数组数据
158
159
this . localLoading = false
159
160
} )
You can’t perform that action at this time.
0 commit comments