Progress 进度条
据说进度条都是假的
基本使用
percentage 属性表示进度条对应的百分比,取值范围在 0-100 范围内。
type 属性可以配置不同的进度条样式,展示不同的颜色状态
开启
显示百分比
show-text 属性用来展示进度条百分比
outside-text 属性可配置在外部显示百分比
70%
开启
自定义高度
height 属性可配置进度条的高度
开启
自定义颜色
可以通过 color 属性设置进度条的颜色,会覆盖 type 属性对应的颜色
background 属性来设置进度条背景色
开启
条纹状态
stripe 可以配置条纹样式
开启
Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
percentage | 百分比 | number | 0 ~ 100 | 0 |
type | 类型 | FightingType | default primary success danger warning info | primary |
height | 自定义高度 | string / number | —— | —— |
show-text | 是否显示百分比文字内容 | boolean | —— | false |
outside-text | 是否在外部显示文本 | boolean | —— | false |
text-color | 百分比文字的颜色 | string | —— | —— |
color | 进度条颜色 | string | —— | —— |
background | 进度条背景色 | string | —— | —— |
stripe | 是否开启条纹效果 | boolean | —— | false |
Interface
组件导出以下类型定义:
ts
import type { ProgressInstance, ProgressProps } from 'fighting-design'