Files
my-v0-server/app/resources/materials/text.json
T
2026-10-15 03:38:20 -07:00

174 lines
4.0 KiB
JSON

{
"order": 16,
"key": "text",
"type": "text",
"name": "文本",
"description": "显示文字,用作大屏标题、小标题或标签",
"tags": [
"info",
"文本",
"text"
],
"renderer": "text",
"group": "info",
"icon": "solar:text-bold",
"usage_notes": [
"events 中代码只作为资料保存,不由后端执行"
],
"field_groups": [
"node-base",
{
"key": "text-content",
"label": "内容",
"description": "文本组件显示的文字",
"fields": [
{
"path": "props.content",
"label": "内容",
"description": "文本组件显示的文字;可以写 {{变量ID}} 引用大屏变量,例如“{{model}} 调用明细”,变量变化时文字跟着变",
"value_type": "string",
"aliases": [
"文字",
"文本内容",
"标题文字",
"名字"
],
"example": "label",
"identifies": true,
"template": true
}
]
},
{
"key": "text-style",
"label": "文字样式",
"description": "文字的颜色、大小、粗细和对齐",
"fields": [
{
"path": "style.color",
"label": "颜色",
"description": "文字的颜色",
"value_type": "color",
"aliases": [
"文字颜色",
"字体颜色"
],
"themed": true
},
{
"path": "style.fontSize",
"label": "字号",
"description": "文字的大小",
"value_type": "number",
"minimum": 8,
"maximum": 200,
"unit": "px",
"aliases": [
"字体大小",
"文字大小"
]
},
{
"path": "style.textAlign",
"label": "水平对齐",
"description": "文字在组件内的水平位置",
"value_type": "enum",
"options": [
{
"value": "left",
"label": "左对齐"
},
{
"value": "center",
"label": "居中"
},
{
"value": "right",
"label": "右对齐"
}
],
"aliases": [
"对齐"
]
},
{
"path": "style.alignItems",
"label": "垂直对齐",
"description": "文字在组件内的垂直位置",
"value_type": "enum",
"options": [
{
"value": "flex-start",
"label": "顶部"
},
{
"value": "center",
"label": "居中"
},
{
"value": "flex-end",
"label": "底部"
}
]
},
{
"path": "style.fontWeight",
"label": "字重",
"description": "文字粗细",
"value_type": "enum",
"default": "normal",
"options": [
{
"value": "normal",
"label": "常规"
},
{
"value": "bold",
"label": "加粗"
}
],
"aliases": [
"加粗",
"粗细"
],
"panel": false
},
{
"path": "style.backgroundColor",
"label": "背景色",
"description": "文本组件的背景颜色,默认透明",
"value_type": "color",
"default": "transparent",
"aliases": [
"背景颜色",
"底色"
],
"panel": false
}
]
}
],
"event_groups": [
"dom-events"
],
"schema": {
"type": "text",
"name": "文本",
"layout": {
"x": 0,
"y": 0,
"width": 200,
"height": 50
},
"props": {
"content": "电商运营数据看板"
},
"style": {
"fontSize": 16,
"textAlign": "center",
"alignItems": "center"
},
"events": []
}
}