this is the programme. Problem: Even when widgets: {disable: ['aaa1']}
, the button remains enabled. Can you help identify why the ui-control
component does not respect the disabled
binding?
[
{
"id": "b25a83a1347510a1",
"type": "tab",
"label": "流程 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "adb3f9612e23595d",
"type": "ui-button",
"z": "b25a83a1347510a1",
"group": "1ff4c0fc452da5ae",
"name": "aaa1",
"label": "button",
"order": 1,
"width": 0,
"height": 0,
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"buttonColor": "",
"textColor": "",
"iconColor": "",
"enableClick": true,
"enablePointerdown": false,
"pointerdownPayload": "",
"pointerdownPayloadType": "str",
"enablePointerup": false,
"pointerupPayload": "",
"pointerupPayloadType": "str",
"x": 510,
"y": 200,
"wires": [
[]
]
},
{
"id": "e9fc72bea92f8026",
"type": "ui-button-group",
"z": "b25a83a1347510a1",
"name": "",
"group": "1ff4c0fc452da5ae",
"order": 2,
"width": 6,
"height": 1,
"label": "",
"className": "",
"rounded": false,
"useThemeColors": true,
"passthru": false,
"options": [
{
"label": "更新",
"icon": "",
"value": "true",
"valueType": "bool",
"color": "#009933"
},
{
"label": "新增",
"icon": "",
"value": "false",
"valueType": "bool",
"color": "#999999"
}
],
"topic": "topic",
"topicType": "msg",
"x": 150,
"y": 320,
"wires": [
[
"83d1ad0abab59021"
]
]
},
{
"id": "36641f428257d81d",
"type": "function",
"z": "b25a83a1347510a1",
"name": "function 19",
"func": "msg.payload = {\n widgets: {\n disable: ['aaa1']\n }\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 300,
"wires": [
[
"5a2b9b2220bcb8cc"
]
]
},
{
"id": "0db2b4e3bbad45c5",
"type": "function",
"z": "b25a83a1347510a1",
"name": "function 20",
"func": "msg.payload = {\n widgets: {\n enable: ['aaa1']\n },\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 360,
"wires": [
[
"61ab509ad7bd1265"
]
]
},
{
"id": "5a2b9b2220bcb8cc",
"type": "ui-control",
"z": "b25a83a1347510a1",
"name": "",
"ui": "164dd866f6ea63b8",
"events": "all",
"x": 660,
"y": 300,
"wires": [
[]
]
},
{
"id": "61ab509ad7bd1265",
"type": "ui-control",
"z": "b25a83a1347510a1",
"name": "",
"ui": "164dd866f6ea63b8",
"events": "all",
"x": 660,
"y": 360,
"wires": [
[]
]
},
{
"id": "aedea6e30e492c9f",
"type": "function",
"z": "b25a83a1347510a1",
"name": "手自动使能",
"func": "msg.enabled = msg.payload;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 200,
"wires": [
[
"adb3f9612e23595d"
]
]
},
{
"id": "0f5c7250cc6a1334",
"type": "ui-button-group",
"z": "b25a83a1347510a1",
"name": "",
"group": "1ff4c0fc452da5ae",
"order": 3,
"width": 6,
"height": 1,
"label": "",
"className": "",
"rounded": false,
"useThemeColors": true,
"passthru": false,
"options": [
{
"label": "更新",
"icon": "",
"value": "true",
"valueType": "bool",
"color": "#009933"
},
{
"label": "新增",
"icon": "",
"value": "false",
"valueType": "bool",
"color": "#999999"
}
],
"topic": "topic",
"topicType": "msg",
"x": 150,
"y": 200,
"wires": [
[
"aedea6e30e492c9f"
]
]
},
{
"id": "83d1ad0abab59021",
"type": "switch",
"z": "b25a83a1347510a1",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 310,
"y": 320,
"wires": [
[
"36641f428257d81d"
],
[
"0db2b4e3bbad45c5"
]
]
},
{
"id": "1ff4c0fc452da5ae",
"type": "ui-group",
"name": "test1",
"page": "622748032a4d55f4",
"width": "12",
"height": 1,
"order": 1,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "164dd866f6ea63b8",
"type": "ui-base",
"name": "myDashboard",
"path": "/dashboard",
"appIcon": "",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"headerContent": "page",
"navigationStyle": "default",
"titleBarStyle": "default",
"showReconnectNotification": true,
"notificationDisplayTime": 1,
"showDisconnectNotification": true,
"allowInstall": true
},
{
"id": "622748032a4d55f4",
"type": "ui-page",
"name": "test",
"ui": "164dd866f6ea63b8",
"path": "/page4",
"icon": "home",
"layout": "grid",
"theme": "14bbe2c6e50ccbaf",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 1,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "14bbe2c6e50ccbaf",
"type": "ui-theme",
"name": "defaultTheme",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"density": "default",
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
}
]