yumoqing 282c1780ba fix: Text widgets use 'text' not 'label', Button widgets use 'label' not 'text
Per bricks-framework specification:
- Text/Title controls: use 'text' for non-i18n text, 'otext'+'i18n:true' for i18n
- Button controls: use 'label' for button display text
2026-05-05 19:28:38 +08:00

100 lines
3.4 KiB
XML

{
"id": "login_page",
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100vh",
"style": {
"background": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
"alignItems": "center",
"justifyContent": "center"
}
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "400px",
"style": {
"background": "white",
"borderRadius": "12px",
"boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
"padding": "40px 32px"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"style": {
"fontSize": "24px",
"fontWeight": "bold",
"textAlign": "center",
"marginBottom": "24px",
"color": "#333"
},
"text": "CRM系统登录"
}
},
{
"widgettype": "Form",
"id": "login_form",
"options": {
"url": "{{entire_url('api/login.dspy')}}",
"method": "POST",
"fields": [
{
"name": "username",
"label": "用户名",
"uitype": "str",
"required": true,
"placeholder": "请输入用户名"
},
{
"name": "password",
"label": "密码",
"uitype": "password",
"required": true,
"placeholder": "请输入密码"
}
],
"submitLabel": "登录",
"submitVariant": "primary",
"submitFullWidth": true
}
},
{
"widgettype": "HBox",
"options": {
"style": {
"justifyContent": "center",
"marginTop": "16px",
"gap": "16px"
}
},
"subwidgets": [
{
"widgettype": "Button",
"id": "btn_register",
"options": {
"label": "注册账号",
"variant": "text",
"url": "{{entire_url('/rbac/user/register.ui')}}"
}
}
]
}
]
}
],
"binds": [
{
"wid": "login_form",
"event": "submit",
"actiontype": "formsubmit",
"callback": {
"success": "navigate('/index.ui')"
}
}
]
}