--- order: 6 title: zh-CN: 自定义字符 en-US: Customize character --- ## zh-CN 可以使用 `({ index }) => ReactNode` 的方式自定义每一个字符。 ## en-US Can customize each character using `({ index }) => ReactNode`. ```jsx import { Rate } from 'antd'; import { FrownOutlined, MehOutlined, SmileOutlined } from '@ant-design/icons'; const customIcons = { 1: , 2: , 3: , 4: , 5: , }; ReactDOM.render( <> { return index + 1; }} />
{ return customIcons[index + 1]; }} /> , mountNode, ); ```