2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 6
|
|
|
|
title: 自定义文字格式
|
|
|
|
---
|
2016-01-20 19:50:45 +08:00
|
|
|
|
|
|
|
`format` 属性指定格式。
|
|
|
|
|
|
|
|
````jsx
|
2016-01-20 20:20:24 +08:00
|
|
|
import { Progress } from 'antd';
|
2016-01-20 19:50:45 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
2016-04-29 12:13:27 +08:00
|
|
|
<Progress type="circle" percent={75} format={percent => `${percent / 10.0}折`} />
|
2016-04-05 16:51:26 +08:00
|
|
|
<Progress type="circle" percent={100} format={() => '成功'} />
|
2016-01-20 19:50:45 +08:00
|
|
|
</div>
|
2016-04-29 12:13:27 +08:00
|
|
|
, mountNode);
|
2016-01-20 19:50:45 +08:00
|
|
|
````
|
|
|
|
|
|
|
|
<style>
|
2016-04-05 16:51:26 +08:00
|
|
|
.ant-progress-circle,
|
|
|
|
.ant-progress-line {
|
2016-01-20 19:50:45 +08:00
|
|
|
margin-right: 8px;
|
2016-04-05 16:51:26 +08:00
|
|
|
margin-bottom: 8px;
|
2016-01-20 19:50:45 +08:00
|
|
|
}
|
|
|
|
</style>
|