master
This commit is contained in:
parent
4ac19f78fd
commit
1799d404bf
|
|
@ -71,6 +71,7 @@ export const exceptStr = (str) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {}) => {
|
export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {}) => {
|
||||||
|
const pageSizeOptions= tableListPageObj?.pageSizeOptions || ["10", "20", "50", "100"];
|
||||||
return {
|
return {
|
||||||
current: tableListPageObj.pageNum || tableListPageObj.current,
|
current: tableListPageObj.pageNum || tableListPageObj.current,
|
||||||
pageSize: tableListPageObj.size || tableListPageObj.pageSize,
|
pageSize: tableListPageObj.size || tableListPageObj.pageSize,
|
||||||
|
|
@ -78,7 +79,7 @@ export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {})
|
||||||
showTotal: total => `${i18n["共"] ? i18n["共"] : "共"} ${total} ${i18n["条"] ? i18n["条"] : "条"}`,
|
showTotal: total => `${i18n["共"] ? i18n["共"] : "共"} ${total} ${i18n["条"] ? i18n["条"] : "条"}`,
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
pageSizeOptions,
|
||||||
onShowSizeChange: (page, size) => {
|
onShowSizeChange: (page, size) => {
|
||||||
const { total } = tableListPageObj;
|
const { total } = tableListPageObj;
|
||||||
sizeChange({
|
sizeChange({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue