mirror of https://gitee.com/xiaonuobase/snowy
【更新】修复修改分页之后,刷新表格时传递的pageSize参数不正确的问题
parent
8e8e59ae47
commit
99d66df3dc
|
@ -6,6 +6,7 @@
|
||||||
import './index.less'
|
import './index.less'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'STable',
|
||||||
components: {
|
components: {
|
||||||
draggable,
|
draggable,
|
||||||
columnSetting
|
columnSetting
|
||||||
|
@ -42,8 +43,8 @@
|
||||||
default: 1
|
default: 1
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: Number,
|
||||||
default: '10'
|
default: 10
|
||||||
},
|
},
|
||||||
showSizeChanger: {
|
showSizeChanger: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -143,7 +144,7 @@
|
||||||
(['auto', true].includes(this.showPagination) &&
|
(['auto', true].includes(this.showPagination) &&
|
||||||
Object.assign({}, this.localPagination, {
|
Object.assign({}, this.localPagination, {
|
||||||
current: localPageNum,
|
current: localPageNum,
|
||||||
size: this.size, //this.compSize, size// 改动
|
pageSize: this.size, //this.compSize, size// 改动
|
||||||
showSizeChanger: this.showSizeChanger,
|
showSizeChanger: this.showSizeChanger,
|
||||||
defaultPageSize: this.defaultPageSize,
|
defaultPageSize: this.defaultPageSize,
|
||||||
pageSizeOptions: this.pageSizeOptions,
|
pageSizeOptions: this.pageSizeOptions,
|
||||||
|
@ -168,7 +169,7 @@
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
current: 1,
|
current: 1,
|
||||||
size: this.size
|
pageSize: this.localPagination.pageSize
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
@ -187,11 +188,12 @@
|
||||||
(pagination && pagination.current) ||
|
(pagination && pagination.current) ||
|
||||||
(this.showPagination && this.localPagination.current) ||
|
(this.showPagination && this.localPagination.current) ||
|
||||||
this.pageNum,
|
this.pageNum,
|
||||||
|
// 此处后端使用size作为分页参数
|
||||||
size:
|
size:
|
||||||
(pagination && pagination.pageSize) ||
|
(pagination && pagination.pageSize) ||
|
||||||
(this.showPagination && this.localPagination.pageSize) ||
|
(this.showPagination && this.localPagination.pageSize) ||
|
||||||
this.pageSize ||
|
this.pageSize ||
|
||||||
this.localPagination.size
|
this.localPagination.pageSize
|
||||||
},
|
},
|
||||||
(sorter &&
|
(sorter &&
|
||||||
sorter.field && {
|
sorter.field && {
|
||||||
|
@ -227,7 +229,7 @@
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return `${range[0]}-${range[1]} 共 ${total} 条 `
|
return `${range[0]}-${range[1]} 共 ${total} 条 `
|
||||||
},
|
},
|
||||||
size: (pagination && pagination.size) || this.localPagination.size
|
pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize
|
||||||
})) ||
|
})) ||
|
||||||
false
|
false
|
||||||
// 后端数据records为null保存修复
|
// 后端数据records为null保存修复
|
||||||
|
|
Loading…
Reference in New Issue