WTitle 标题组件
标题组件,基于 WinDesignNext WTitle 封装,用于展示页面或区块标题。
基础用法
Props API
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
id | string | - | 组件唯一标识(必填) |
component | string | WTitle | 组件类型(必填) |
title | string | - | 标题显示的文本内容 |
round | boolean | false | 是否显示圆角背景样式 |
margin | string | 0 0 16px | 标题组件的外边距配置 |
size | string | default | 标题尺寸(small/default) |
children | string[] | - | 子组件 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"
}