Commit e28c39f9 authored by 前端-许佳敏's avatar 前端-许佳敏

fix: 修复table分页国际化问题

parent a38480d1
......@@ -15,6 +15,7 @@ import {
clearCurrentState,
} from './keepAlive';
import { createAsyncFormActions } from '@formily/antd';
import { getIntl } from 'umi'
export type tableTypes = 'small' | 'normal';
......@@ -28,6 +29,8 @@ export interface ITablePagination {
pageSize?: number;
}
const intl = getIntl()
export interface IStandardTableProps<RecordType>
extends TableProps<RecordType>,
FormilyCustomProps {
......@@ -326,7 +329,7 @@ class StandardTable<RecordType extends object = any> extends PureComponent<
pageSize: pageSize,
pageSizeOptions: ['10', '20', '50', '100'],
total: totalPage,
showTotal: () => `共 ${totalPage} 条`,
showTotal: () => intl.formatMessage({ id: 'componnets.standardTablePages'}, { totalPage }),
...pagination,
};
......
......@@ -55,7 +55,7 @@ export const getSelectedMenuKeys = (
const defaultFooterDom = (
<DefaultFooter
copyright={`瓴犀-${new Date().getFullYear()} 前端组体验出品`}
// copyright={`瓴犀-${new Date().getFullYear()} 前端组体验出品`}
links={[]}
/>
);
......
......@@ -272,4 +272,5 @@ export default {
'components.tableResetTip': 'Reset',
'components.tableFilterTip': 'Filter',
'components.xuanzezhidinghetong': 'Select the designated contract',
'componnets.standardTablePages': 'A total of {totalPage}'
}
......@@ -272,4 +272,5 @@ export default {
'components.tableResetTip': '초기화',
'components.tableFilterTip': '고급 심사',
'components.xuanzezhidinghetong': '선택지정계약',
'componnets.standardTablePages': '총 {totalPage}'
}
......@@ -272,4 +272,5 @@ export default {
'components.tableResetTip': '重置',
'components.tableFilterTip': '高级筛选',
'components.xuanzezhidinghetong': '选择指定合同',
'componnets.standardTablePages': '共 {totalPage} 条'
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment