You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
559 B
29 lines
559 B
8 years ago
|
---
|
||
|
order: 4
|
||
|
title:
|
||
|
zh-CN: 其他字符
|
||
8 years ago
|
en-US: Other Character
|
||
8 years ago
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
可以将星星替换为其他字符,比如字母,数字,字体图标甚至中文。
|
||
|
|
||
|
## en-US
|
||
|
|
||
8 years ago
|
Replace the default star to other character like alphabet, digit, iconfont or even Chinese word.
|
||
8 years ago
|
|
||
|
````jsx
|
||
|
import { Rate, Icon } from 'antd';
|
||
|
|
||
|
ReactDOM.render(
|
||
|
<div>
|
||
8 years ago
|
<Rate character={<Icon type="heart" />} allowHalf />
|
||
8 years ago
|
<br />
|
||
8 years ago
|
<Rate character="A" allowHalf style={{ fontSize: 36 }} />
|
||
8 years ago
|
<br />
|
||
8 years ago
|
<Rate character="好" allowHalf />
|
||
8 years ago
|
</div>
|
||
|
, mountNode);
|
||
|
````
|