我如何在快速跳转和分页中更改转到文本

  • 本文关键字:分页 文本 css reactjs antd
  • 更新时间 :
  • 英文 :


我尝试在ant设计分页中更改转到文本。文件说使用showQuickJumper={{ goButton: "Your text" }},但结果是:

antd分页转到文本

正如你所看到的";转到";文本仍然可见。如何隐藏它?

showQuickJumper参数影响快速跳转块的显示
如果组件作为goButton值传递,则它将显示为确认按钮
为了实现期望的行为并改变";转到";文本转换为另一个,则需要传递locale参数并重写jump_to属性。

<Pagination
showQuickJumper={{
goButton: <button>Your custom button to confirm</button>
}}
total={500}
locale={{ jump_to: "Your text" }}
/>

不幸的是,文档中没有任何关于这一点的指示。它与antd版本4.17.0和更早的相关

您可以使用区域设置

<Pagination
locale={{ jump_to: "Your text", page: 'Your page' }}
/>

最新更新