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.
30 lines
1.1 KiB
30 lines
1.1 KiB
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 进度条
|
||
9 years ago
|
type: Views
|
||
9 years ago
|
english: Progress
|
||
|
---
|
||
10 years ago
|
|
||
10 years ago
|
展示操作的当前进度。
|
||
10 years ago
|
|
||
10 years ago
|
## 何时使用
|
||
10 years ago
|
|
||
10 years ago
|
在操作需要较长时间才能完成时,为用户显示该操作的当前进度和状态。
|
||
10 years ago
|
|
||
8 years ago
|
- 当一个操作会打断当前界面,或者需要在后台运行,且耗时可能超过2秒时;
|
||
|
- 当需要显示一个操作完成的百分比时。
|
||
10 years ago
|
|
||
9 years ago
|
|
||
9 years ago
|
## API
|
||
9 years ago
|
|
||
9 years ago
|
| 属性 | 说明 | 类型 | 默认值 |
|
||
|
|----------|---------------|----------|---------------|
|
||
8 years ago
|
| type | 类型,可选 `line` `circle` | String | line |
|
||
|
| percent | 百分比 | Number | 0 |
|
||
9 years ago
|
| format | 内容的模板函数 | function(percent) | `percent => percent + '%'` |
|
||
8 years ago
|
| status | 状态,可选:`success` `exception` `active` | String | - |
|
||
|
| showInfo | 是否显示进度数值或状态图标 | Boolean | true |
|
||
|
| strokeWidth `(type=line)` | 进度条线的宽度,单位 px | Number | 10 |
|
||
|
| strokeWidth `(type=circle)` | 圆形进度条线的宽度,单位是进度条画布宽度的百分比 | Number | 6 |
|
||
|
| width `(type=circle)` | 圆形进度条画布宽度,单位 px | Number | 132 |
|