format.md 468 字节
Newer Older
A
afc163 已提交
1 2 3 4 5 6 7 8 9
# 自定义文字格式

- order: 6

`format` 属性指定格式。

---

````jsx
A
afc163 已提交
10
import { Progress } from 'antd';
A
afc163 已提交
11 12 13 14
const ProgressCircle = Progress.Circle;

ReactDOM.render(
  <div>
15
    <ProgressCircle percent={75} format={percent => `${percent / 10.0}折` } />
A
afc163 已提交
16 17 18 19 20 21 22 23 24 25 26 27
    <ProgressCircle percent={100} format={() => '成功'} />
  </div>
  , mountNode);
````

<style>
.ant-progress-circle-wrap,
.ant-progress-line-wrap {
  margin-right: 8px;
  margin-bottom: 5px;
}
</style>