Skip to content

Progress 进度条

展示任务当前进度, 也不知道保不保真。

基础用法

Progress 组件必须设置 percentage属性,表示进度条对应的百分比。请保证限制在[0, 100]

显示当前百分比

使用 test-status 设置当前进度百分比

自定义颜色&图标

使用 icon指定进度条图标

使用 color指定进度条颜色, 此属性接受十六进制颜色值,函数和数组。

Progress API

Progress Props

属性名说明可选值默认值
percentage进度条当前进度Number---
variant进度条表现形式'line'---
type进度条的类型'success | 'info' | 'warning' | 'danger'---
textStatus进度条当前进度百分比显示的位置'inside' | 'outside'---
color进度条的颜色,会覆盖type的颜色'String' | '(percentage:number) => string' | 'Array<string>'---
icon进度条的图标String---

源代码

组件

贡献者

Released under the MIT License.