2018-04-03 14:14:38 +08:00
|
|
|
## API
|
|
|
|
|
|
|
|
| Property | Description | Type | Default |
|
|
|
|
| -------- | ----------- | ---- | ------- |
|
2018-09-05 21:28:54 +08:00
|
|
|
| format | template function of the content | function(percent, successPercent) | `percent => percent + '%'` |
|
2018-04-03 14:14:38 +08:00
|
|
|
| gapDegree `(type=circle)` | the gap degree of half circle, 0 ~ 360 | number | 0 |
|
|
|
|
| gapPosition `(type=circle)` | the gap position, options: `top` `bottom` `left` `right` | string | `top` |
|
|
|
|
| percent | to set the completion percentage | number | 0 |
|
|
|
|
| showInfo | whether to display the progress value and the status icon | boolean | true |
|
2018-11-10 22:27:12 +08:00
|
|
|
| status | to set the status of the Progress, options: `normal` `success` `exception` `active` | string | `normal` |
|
2018-04-03 14:14:38 +08:00
|
|
|
| strokeWidth `(type=line)` | to set the width of the progress bar, unit: `px` | number | 10 |
|
|
|
|
| strokeWidth `(type=circle)` | to set the width of the circular progress bar, unit: percentage of the canvas width | number | 6 |
|
2018-09-05 21:28:54 +08:00
|
|
|
| strokeLinecap | to set the style of the progress linecap | Enum{ 'round', 'square' } | `round` |
|
|
|
|
| strokeColor | color of progress bar | string | - |
|
|
|
|
| successPercent | segmented success percent, works when `type="line"` | number | 0 |
|
2018-04-03 14:14:38 +08:00
|
|
|
| type | to set the type, options: `line` `circle` `dashboard` | string | `line` |
|
|
|
|
| width `(type=circle)` | to set the canvas width of the circular progress bar, unit: `px` | number | 120 |
|