V1.0.0
Skip to content

WTitle 标题组件

标题组件,基于 WinDesignNext WTitle 封装,用于展示页面或区块标题。

基础用法

Props API

属性名类型默认值说明
idstring-组件唯一标识(必填)
componentstringWTitle组件类型(必填)
titlestring-标题显示的文本内容
roundbooleanfalse是否显示圆角背景样式
marginstring0 0 16px标题组件的外边距配置
sizestringdefault标题尺寸(small/default)
childrenstring[]-子组件 ID 列表

path 支持说明

该组件属性均为静态配置,不支持 path 绑定。标题文本如需动态显示,请使用子组件 Text / WText 的 path 绑定。

详见 path 数据绑定速查


使用示例

圆角样式

json
{
  "id": "title_round",
  "component": "WTitle",
  "title": "会诊信息",
  "round": true
}

小尺寸标题

json
{
  "id": "title_small",
  "component": "WTitle",
  "title": "详细信息",
  "size": "small"
}

自定义外边距

json
{
  "id": "title_custom",
  "component": "WTitle",
  "title": "检查报告",
  "margin": "20px 0 10px"
}