From f07ab61eacfebe444dfd82a13488a8d298f9eacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 16:24:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=9B=E5=BE=AE=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97iframe=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index 13c0b0e..5a3b09e 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -61,12 +61,12 @@ export const exceptStr = (str) => { } }; -export const paginationFun = (tableListPageObj, sizeChange, onChange) => { +export const paginationFun = (tableListPageObj, sizeChange, onChange, i18n = {}) => { return { current: tableListPageObj.pageNum, pageSize: tableListPageObj.size, total: tableListPageObj.total, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${i18n["共"] ? i18n["共"] : "共"} ${total} ${i18n["条"] ? i18n["条"] : "条"}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -76,8 +76,8 @@ export const paginationFun = (tableListPageObj, sizeChange, onChange) => { onChange({ pageNum: page, size, - total, + total }); - }, + } }; };