CTL/res/cfg.json

218 lines
7.5 KiB
JSON
Raw Normal View History

2024-06-21 09:05:50 +00:00
{
"type": "page",
"title": "Hello world",
2024-06-28 00:33:59 +00:00
"regions": [
"body"
],
2024-06-21 09:05:50 +00:00
"body": [
{
"type": "tpl",
2024-06-28 00:33:59 +00:00
"id": "u:f439a8330e02",
2024-06-21 09:05:50 +00:00
"tpl": "初始页面",
"wrapperComponent": "",
2024-06-28 00:33:59 +00:00
"inline": false
2024-06-21 09:05:50 +00:00
},
{
"type": "grid",
"columns": [
{
"body": [],
"id": "u:39c97acec8cc"
},
{
"body": [
{
"type": "collapse-group",
"activeKey": [
"1"
],
"body": [
{
"type": "collapse",
"key": "1",
"active": true,
"header": "通用",
"body": [
{
"type": "button-toolbar",
"label": "按钮工具栏",
2024-06-28 00:33:59 +00:00
"data": {
"x": "yy"
},
2024-06-21 09:05:50 +00:00
"buttons": [
{
"type": "button",
"label": "按钮1",
"onEvent": {
"click": {
"actions": [
2024-06-28 00:33:59 +00:00
{
"ignoreError": false,
"script": "const buttonText = context.props.label;\ndoAction({\n actionType: 'ajax',\n args: {\n api: {\n url: '/sendData',\n method: 'post',\n data: {\n buttonLabel: buttonText\n }\n }\n }\n});\n",
"actionType": "custom"
}
]
2024-06-21 09:05:50 +00:00
}
},
2024-06-28 00:33:59 +00:00
"id": "u:sendButtonText"
2024-06-21 09:05:50 +00:00
},
{
"type": "button",
"label": "按钮2",
"onEvent": {
"click": {
"actions": [
2024-06-28 00:33:59 +00:00
{
"ignoreError": false,
"actionType": "custom",
"script": "const buttonText = context.props.label;\ndoAction({\n actionType: 'ajax',\n args: {\n api: {\n url: '/sendData',\n method: 'post',\n data: {\n buttonLabel: buttonText\n },\n successMessage: '请求成功',\n errorMessage: '请求失败'\n }\n }\n});\n"
}
2024-06-21 09:05:50 +00:00
]
}
},
"id": "u:8eae2c306cc5"
},
{
"type": "button",
"label": "按钮",
"id": "u:c440483f217b"
},
{
"type": "button",
"label": "按钮",
"id": "u:5eb80129858e"
},
{
"type": "button",
"label": "按钮",
"id": "u:92b3fbb4a8e5"
},
{
"type": "button",
"label": "按钮",
"id": "u:fcec0c70c54c"
},
{
"type": "button",
"label": "按钮",
"id": "u:68b551bbf8cb"
},
{
"type": "button",
"label": "按钮",
"id": "u:5bb6c2e1889e"
}
],
"id": "u:b6649c1b1585"
},
{
"type": "input-number",
"label": "数字输入",
"name": "number",
"keyboard": true,
"id": "u:d10a773ce8ee",
2024-06-28 00:33:59 +00:00
"step": 12,
2024-06-21 09:05:50 +00:00
"displayMode": "base",
"size": "full",
"mode": "inline",
2024-06-28 00:33:59 +00:00
"hint": "比如输入 a-xxxx-xxx",
"required": true,
"min": 225000,
"max": 500000,
"value": 225000,
"kilobitSeparator": true,
"suffix": "",
"unitOptions": [
{
"label": "kHz",
"value": "k"
}
]
2024-06-21 09:05:50 +00:00
},
{
"type": "button",
2024-06-28 00:33:59 +00:00
"label": "按钮10",
2024-06-21 09:05:50 +00:00
"onEvent": {
"click": {
2024-06-28 00:33:59 +00:00
"actions": [
{
"ignoreError": false,
"actionType": "ajax",
"outputVar": "responseResult",
"options": {},
"api": {
"url": "/sendData",
"method": "post",
"requestAdaptor": "",
"adaptor": "",
"messages": {},
"data": {
"aa": "${number}"
}
},
"expression": "${number!=\"\"}"
}
]
2024-06-21 09:05:50 +00:00
}
},
"id": "u:c72878bb1458",
"size": "md",
2024-06-28 00:33:59 +00:00
"block": false,
"disabledOn": "${number!=\"\"}"
2024-06-21 09:05:50 +00:00
},
{
"type": "button-group-select",
"name": "buttonGroupSelect",
"label": "单选",
"inline": false,
"options": [
{
"label": "选项1",
"value": "a"
},
{
"label": "选项2",
"value": "b"
}
],
"id": "u:5112d83e3943",
"multiple": false,
"value": "a"
}
],
"id": "u:53511e674086"
},
{
"type": "collapse",
2024-06-28 00:33:59 +00:00
"header": "调试",
2024-06-21 09:05:50 +00:00
"body": [
{
"type": "tpl",
"tpl": "内容",
"wrapperComponent": "",
"inline": false,
"id": "u:6f92531bd161"
}
],
"key": "6",
"id": "u:4ad528b09137"
}
],
"id": "u:8035637b2ce6"
}
],
"id": "u:63b382ec7d2f"
}
],
"id": "u:a9f37a6134a4"
}
],
"id": "u:ddf6e6d384e7",
"pullRefresh": {
"disabled": true
},
2024-06-28 00:33:59 +00:00
"data": {
"x": "xx"
},
"asideResizor": false
2024-06-21 09:05:50 +00:00
}