您可以使用 "container" 输入类型对多个输入字段进行分组。这可以通过分离可配置的不同方面来使配置面板具有一定的视觉清晰度。
例如,一个组可以包含 UI 配置选项(例如,标题、按钮、图像),而另一个组包含组件实际功能的配置。
同时,分组功能允许用户复制一组元素,从而创建配置动态数量的可配置元素的选项。
一些特定属性包括:
“base_sensor”: {
“title”: “传感器 1”,
“inputType”: “容器”,
“containerGroup”: “传感器”,
“repeatable”: true,“
可折叠”: true,“
可删除”: false,“
editable”: true,“
值”: {
“sensor_shown”: {
“title”: “显示值”,
“inputType”: “checkbox-input”,
“value”: false,“
showIfComputed”: true
},
“sensor_type”: {
“inputType”: “文件上传”,
“title”: “图标”,“
接受”: “image/png”,
“multiple”: false,
“value”: “”,
“showIfComputed”: true
},
“sensor_unit”: {
“title”: “Unit”,
“inputType”: “textinput”,
“value”: “rpm”,
“showIfComputed”: true
},
“sensor_json_path”: {
“title”: “JSON 路径”,
“inputType”: “textinput”,
“value”: “rpm”,
“showIfComputed”: true
}
},
“showIfComputed”: true,“
container_editing”: false,“
container_opened”: true
}