Fix Form控件结构: ensure all Form controls use options.fields instead of subwidgets

This commit is contained in:
yumoqing 2026-04-22 16:39:31 +08:00
parent eee254da60
commit 30eae89807

View File

@ -53,42 +53,36 @@
"subwidgets": [
{
"widgettype": "Form",
"id": "general-settings-form",
"options": {
"width": "100%",
"maxWidth": "600px"
},
"subwidgets": [
"maxWidth": "600px",
"fields": [
{
"widgettype": "UiCode",
"id": "default-model",
"options": {
"name": "default-model",
"label": "Default AI Model",
"placeholder": "Select default model...",
"width": "100%",
"marginBottom": "16px"
}
},
{
"widgettype": "UiInt",
"id": "session-timeout",
"options": {
"name": "session-timeout",
"label": "Session Timeout (minutes)",
"placeholder": "Enter timeout in minutes...",
"width": "100%",
"marginBottom": "16px"
}
},
{
"widgettype": "UiCheck",
"id": "auto-save",
"options": {
"name": "auto-save",
"label": "Auto-save sessions",
"checked": true,
"marginBottom": "24px"
}
]
}
},
{
"widgettype": "Button",
@ -106,19 +100,15 @@
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"target": "app.general-tab",
"rfname": "save_general_settings",
"params": {
"default_model": "{{default-model.value}}",
"session_timeout": "{{session-timeout.value}}",
"auto_save": "{{auto-save.checked}}"
"form_data": "{{general-settings-form.data}}"
}
}
]
}
]
}
]
},
{
"widgettype": "VBox",
@ -166,7 +156,7 @@
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"target": "app.models-tab",
"rfname": "add_model",
"params": {}
}
@ -193,7 +183,6 @@
"marginBottom": "16px"
}
},
{
{
"widgettype": "UiCheck",
"options": {
@ -210,7 +199,6 @@
"label": "Encrypt local storage",
"checked": "{{security.encrypt_storage}}",
"marginBottom": "24px"
"marginBottom": "24px"
}
},
{
@ -229,7 +217,7 @@
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"target": "app.security-tab",
"rfname": "save_security_settings",
"params": {
"require_auth": "{{require-auth.checked}}",
@ -290,7 +278,7 @@
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"target": "app.appearance-tab",
"rfname": "save_appearance_settings",
"params": {
"theme": "{{theme-select.value}}"