分页修改
This commit is contained in:
parent
1147ff4168
commit
a36085c2ee
|
@ -157,13 +157,13 @@ export default {
|
||||||
result.then(r => {
|
result.then(r => {
|
||||||
this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
|
this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
|
||||||
current: r.pageNo, // 返回结果中的当前分页数
|
current: r.pageNo, // 返回结果中的当前分页数
|
||||||
total: r.entityCount, // 返回结果中的总记录数
|
total: r.total, // 返回结果中的总记录数
|
||||||
showSizeChanger: this.showSizeChanger,
|
showSizeChanger: this.showSizeChanger,
|
||||||
pageSize: (pagination && pagination.pageSize) ||
|
pageSize: (pagination && pagination.pageSize) ||
|
||||||
this.localPagination.pageSize
|
this.localPagination.pageSize
|
||||||
}) || false
|
}) || false
|
||||||
// 为防止删除数据后导致页面当前页面数据长度为 0 ,自动翻页到上一页
|
// 为防止删除数据后导致页面当前页面数据长度为 0 ,自动翻页到上一页
|
||||||
if (r.entities.length === 0 && this.showPagination && this.localPagination.current > 1) {
|
if (r.rows.length === 0 && this.showPagination && this.localPagination.current > 1) {
|
||||||
this.localPagination.current--
|
this.localPagination.current--
|
||||||
this.loadData()
|
this.loadData()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue