V1.0.0
Skip to content

WProgress 组件

进度条组件,基于 WinDesignNext Progress 封装,用于展示任务进度、上传进度或加载状态,支持线形、环形、仪表盘三种形态。

基础用法

API

属性类型默认值说明
componentstringWProgress组件类型(必填)
percentagenumber | DataBindingValue0进度百分比 (0-100)
typestringline类型:line / circle / dashboard
statusstring状态:success / exception / warning
indeterminatebooleanfalse不确定进度动画
strokeWidthnumber | DataBindingValue8进度条宽度
widthnumber | DataBindingValue126环形/仪表盘尺寸
showTextbooleantrue显示进度文字
stripedbooleanfalse条纹效果
stripedFlowbooleanfalse条纹流动
titlestring | DataBindingValue标题(dashboard 类型)

path 支持说明

属性path 支持说明
percentage进度值,Agent 可通过 updateDataModel 动态更新
type进度条形态
status进度状态
strokeWidth / width尺寸配置
title标题文字

percentage 动态绑定

json
{
  "component": "WProgress",
  "percentage": { "path": "/uploadProgress" },
  "status": "success"
}

Agent 更新进度:

json
{
  "version": "v0.9",
  "updateDataModel": {
    "surfaceId": "main",
    "path": "/uploadProgress",
    "value": 85
  }
}

注意事项

  • percentage 取值范围 0-100
  • 不支持 formatcolor 函数形式,自定义颜色请使用静态 color 字符串或数组
  • 不确定进度场景使用 indeterminate: true