分组标题 展示/交互
组件 ID: title
这是一个标准的 SunForm 展示/交互组件,支持可视化配置与低代码生成。
JSON 配置示例
直接复制以下 JSON 到配置文件中即可使用。
{
"type": "title",
"props": {
"text": "标题内容",
"subText": "",
"showLeftLine": true,
"leftLineColor": "#007AFF",
"showLeftIcon": false,
"leftIcon": "",
"leftIconColor": "#007AFF",
"fontSize": "32",
"color": "#333333",
"backgroundColor": "transparent",
"showBackground": false,
"clickable": false,
"remark": "",
"hide": false,
"style": "`return {",
"padding": "10px 5px"
}
}
属性配置 (Props)
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
text |
string | 标题内容 | 暂无描述 |
subText |
string | - | 暂无描述 |
showLeftLine |
boolean | true | 暂无描述 |
leftLineColor |
string | #007AFF | 颜色值 |
showLeftIcon |
boolean | false | 图标 |
leftIcon |
string | - | 图标 |
leftIconColor |
string | #007AFF | 颜色值 |
fontSize |
string | 32 | 暂无描述 |
color |
string | #333333 | 组件主色调 |
backgroundColor |
string | transparent | 颜色值 |
showBackground |
boolean | false | 暂无描述 |
clickable |
boolean | false | 暂无描述 |
remark |
string | - | 组件备注/说明 |
hide |
boolean | false | 是否隐藏该组件 |
style |
string | `return { | 自定义内联样式 CSS |
padding |
string | 10px 5px | 暂无描述 |
background |
string | #ffffff | 暂无描述 |
borderBottom |
string | 1upx solid #e5e5e5 | 暂无描述 |
onCreated |
any | null | 组件创建时触发的事件 |
onMounted |
any | null | 组件挂载后触发的事件 |
onClick |
any | null | 点击组件触发的事件 |