【新增】stable组件新增默认的每页条数(defaultPageSize)跟指定每页可以显示多少条(pageSizeOptions)配置

pull/80/MERGE
小诺 2023-01-12 22:41:07 +08:00 committed by 俞宝山
parent 9e480b08e3
commit 4dd22edc8d
1 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,14 @@
type: [String, Boolean],
default: 'auto'
},
defaultPageSize: {
type: Number,
default: 10
},
pageSizeOptions: {
type: Array,
default: () => ['10', '20', '50', '100']
},
/**
* enable page URI mode
*
@ -137,6 +145,8 @@
current: localPageNum,
size: this.size, //this.compSize, size//
showSizeChanger: this.showSizeChanger,
defaultPageSize: this.defaultPageSize,
pageSizeOptions: this.pageSizeOptions,
showTotal: (total, range) => {
return `${range[0]}-${range[1]}${total}`
}