# Progress
进度条,用于显示内容加载或操作处理进度。
## 支持设备
手机
|
平板
|
车机
|
智慧屏
|
智能穿戴
|
支持
|
支持
|
支持
|
不支持
|
不支持
|
## 子组件
无
## 接口说明
Progress\(value: \{value: number, total?: number, style?: ProgressStyle\}\)
创建有明确进度的进度条。
- 参数
参数名
|
参数类型
|
必填
|
默认值
|
参数描述
|
value
|
number
|
是
|
-
|
指定当前进度值。
|
total
|
number
|
否
|
100
|
指定进度总长。
|
style
|
ProgressStyle
|
否
|
Linear
|
指定进度条样式。
|
- ProgressStyle枚举说明
## 属性
名称
|
参数类型
|
默认值
|
描述
|
value
|
number
|
-
|
设置当前进度值。
|
color
|
Color
|
-
|
设置进度条前景色。
|
## 示例
```
@Entry
@Component
struct ProgressExample {
build() {
Column({ space: 5 }) {
Text('Linear Progress').fontSize(9).fontColor(0xCCCCCC).width('90%')
Progress({ value: 10, style: ProgressStyle.Linear }).width(200)
Text('Linear Progress Color').fontSize(9).fontColor(0xCCCCCC).width('90%')
Progress({ value: 20, total: 150, style: ProgressStyle.Linear }).color(Color.Red).value(50).width(200)
}.width('100%').margin({ top: 5 })
}
}
```
