fix: replace background with bgcolor, unwrap widgettype:Page to promote subwidgets to top level

This commit is contained in:
yumoqing 2026-05-06 07:48:50 +08:00
parent f901813244
commit f860d86c00
2 changed files with 10 additions and 10 deletions

View File

@ -12,11 +12,11 @@
"widgettype": "HBox", "widgettype": "HBox",
"options": { "options": {
"height": "56px", "height": "56px",
"background": "#1a73e8",
"color": "white", "color": "white",
"alignItems": "center", "alignItems": "center",
"padding": "0 16px", "padding": "0 16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)" "boxShadow": "0 2px 4px rgba(0,0,0,0.1)",
"bgcolor": "#1a73e8"
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -63,10 +63,10 @@
"widgettype": "VBox", "widgettype": "VBox",
"options": { "options": {
"width": "220px", "width": "220px",
"background": "#f5f5f5",
"borderRight": "1px solid #e0e0e0", "borderRight": "1px solid #e0e0e0",
"overflowY": "auto", "overflowY": "auto",
"padding": "8px 0" "padding": "8px 0",
"bgcolor": "#f5f5f5"
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -121,7 +121,7 @@
"options": { "options": {
"flex": 1, "flex": 1,
"overflow": "hidden", "overflow": "hidden",
"background": "#fafafa" "bgcolor": "#fafafa"
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -151,4 +151,4 @@
} }
} }
] ]
} }

View File

@ -4,19 +4,19 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100vh", "height": "100vh",
"background": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
"alignItems": "center", "alignItems": "center",
"justifyContent": "center" "justifyContent": "center",
"bgcolor": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
}, },
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "VBox", "widgettype": "VBox",
"options": { "options": {
"width": "400px", "width": "400px",
"background": "white",
"borderRadius": "12px", "borderRadius": "12px",
"boxShadow": "0 8px 32px rgba(0,0,0,0.15)", "boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
"padding": "40px 32px" "padding": "40px 32px",
"bgcolor": "white"
}, },
"subwidgets": [ "subwidgets": [
{ {