文本 展示/交互
组件 ID: text
这是一个标准的 SunForm 展示/交互组件,支持可视化配置与低代码生成。
JSON 配置示例
直接复制以下 JSON 到配置文件中即可使用。
{
"type": "text",
"props": {
"value": "文本内容",
"fontSize": "28",
"color": "",
"darkColor": "",
"lineHeight": "1.5",
"lines": 0,
"selectable": false,
"heightLight": [],
"heightLightReg": [],
"heightLightColor": "primary",
"remark": "",
"hide": false,
"style": "{}",
"onCreated": null,
"onMounted": null,
"onClick": null
}
}
属性配置 (Props)
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
value |
string | 文本内容 | 表单值 / 绑定值 |
fontSize |
string | 28 | 暂无描述 |
color |
string | - | 组件主色调 |
darkColor |
string | - | 颜色值 |
lineHeight |
string | 1.5 | 暂无描述 |
lines |
number | 0 | 暂无描述 |
selectable |
boolean | false | 暂无描述 |
heightLight |
object | [] | 暂无描述 |
heightLightReg |
object | [] | 暂无描述 |
heightLightColor |
string | primary | 颜色值 |
remark |
string | - | 组件备注/说明 |
hide |
boolean | false | 是否隐藏该组件 |
style |
object | {} | 自定义内联样式 CSS |
onCreated |
any | null | 组件创建时触发的事件 |
onMounted |
any | null | 组件挂载后触发的事件 |
onClick |
any | null | 点击组件触发的事件 |