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 = {}) => {
|
||||
const pageSizeOptions= tableListPageObj?.pageSizeOptions || ["10", "20", "50", "100"];
|
||||
return {
|
||||
current: tableListPageObj.pageNum || tableListPageObj.current,
|
||||
pageSize: tableListPageObj.size || tableListPageObj.pageSize,
|
||||
|
|
@ -78,7 +79,7 @@ export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {})
|
|||
showTotal: total => `${i18n["共"] ? i18n["共"] : "共"} ${total} ${i18n["条"] ? i18n["条"] : "条"}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
pageSizeOptions,
|
||||
onShowSizeChange: (page, size) => {
|
||||
const { total } = tableListPageObj;
|
||||
sizeChange({
|
||||
|
|
@ -122,4 +123,4 @@ export const toDecimal_n = (num, decimalPlaces) => {
|
|||
const multiplier = Math.pow(10, decimalPlaces);
|
||||
const roundedNum = Math.round(num * multiplier) / multiplier;
|
||||
return roundedNum.toFixed(decimalPlaces);
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue