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