在ant设计的免费版本中使用transfer组件,并尝试更改表格的标题文本
怎么做呢?
这是非常糟糕的AntDesign文档没有提到它,我不想相信它不存在,
发布于 2020-04-17 03:15:43
您可以使用title和selectAllLabels prop编辑headers.Both props accept数组。(如果你仍然不能使用这些道具,请检查你的antd版本)
titles={[<Tag color="geekblue">I am on Left</Tag>, <Tag color="geekblue">I am on right</Tag>]}
selectAllLabels={[
({ selectedCount, totalCount }) => (
<span>
{selectedCount} of {totalCount}
<Tag color="geekblue">left</Tag>
</span>
), ({ selectedCount, totalCount }) => (
<span>
{selectedCount} of {totalCount}
<Tag color="geekblue">right</Tag>
</span>
)
]}
示例Codebox
https://codesandbox.io/s/table-transfer-ant-design-demo-v4wxj?file=/index.js:2936-3517
https://stackoverflow.com/questions/61232765
复制相似问题