要更改Ant Design的分页选择框中的文本,可以按照以下步骤进行操作:
npm install antd react-dom
import React from 'react';
import { Pagination } from 'antd';
class MyPagination extends React.Component {
render() {
return (
);
}
}
const locale = {
items_per_page: '/ 页',
jump_to: '跳转至'
};
class MyPagination extends React.Component {
render() {
return (
);
}
}
完整的示例代码如下:
import React from 'react';
import { Pagination } from 'antd';
const locale = {
items_per_page: '/ 页',
jump_to: '跳转至'
};
class MyPagination extends React.Component {
render() {
return (
);
}
}
export default MyPagination;
通过以上步骤,你可以成功更改Ant Design分页选择框中的文本。