mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-11 13:59:11 +08:00
f37f471373
* feat: expand rate character * fix: demo * fix: snap * Update components/rate/index.zh-CN.md Co-authored-by: 偏右 <afc163@gmail.com> * fix Co-authored-by: 偏右 <afc163@gmail.com>
30 lines
464 B
Markdown
30 lines
464 B
Markdown
---
|
|
order: 4
|
|
title:
|
|
zh-CN: 清除
|
|
en-US: Clear star
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
支持允许或者禁用清除。
|
|
|
|
## en-US
|
|
|
|
Support set allow to clear star when click again.
|
|
|
|
```jsx
|
|
import { Rate } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<>
|
|
<Rate defaultValue={3} />
|
|
<span className="ant-rate-text">allowClear: true</span>
|
|
<br />
|
|
<Rate allowClear={false} defaultValue={3} />
|
|
<span className="ant-rate-text">allowClear: false</span>
|
|
</>,
|
|
mountNode,
|
|
);
|
|
```
|