V1.0.0
Skip to content

WStatus 组件

状态组件,基于 WinDesignNext Status 封装,用于展示带颜色圆点标识的状态文字(如运行中、已停止、告警中等)。

基础用法

API

属性类型说明
componentstring固定为 WStatus
typestring | DataBindingValue状态类型:primary/success/warning/danger/info
sizestring尺寸:large/default/small
circleboolean是否显示圆形指示点,默认 true
commonboolean通用样式
iconColorstring指示点颜色
textColorstring文字颜色
childstring状态文字子组件 ID

path 支持说明

属性path 支持说明
type动态状态类型(如根据 dataModel 切换 success/danger)

动态状态类型

json
{
  "component": "WStatus",
  "type": { "path": "/statusType" },
  "child": "status_text"
}

使用场景

场景推荐配置
设备运行状态type: "success" + 文字子组件
告警/异常type: "warning""danger"
动态状态type 使用 path 绑定 dataModel

注意事项

  • 状态文字通过 child 引用 Text 等子组件,与 WTag 用法类似
  • WStatus 为纯展示组件,无 action 事件