- Add comprehensive examples for Popup.ui and PopupWindow.ui components - Update chat.ui to use PopupWindow for better desktop-like experience - PopupWindow provides draggable, resizable application windows with title bar - Popup provides modal/non-modal popup layers with auto-dismiss support - Both components support proper event handling and lifecycle management - Examples demonstrate real-world usage patterns for hermes-web-cli module
64 lines
1.5 KiB
XML
64 lines
1.5 KiB
XML
{
|
|
"widgettype": "PopupWindow",
|
|
"options": {
|
|
"title": "应用窗口示例",
|
|
"width": "600px",
|
|
"height": "400px",
|
|
"auto_open": true,
|
|
"movable": true,
|
|
"resizable": true,
|
|
"modal": false
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "这是一个可拖拽、可调整大小的应用窗口",
|
|
"fontSize": "20px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "TabPanel",
|
|
"options": {
|
|
"tab_pos": "top",
|
|
"items": [
|
|
{
|
|
"name": "tab1",
|
|
"label": "内容1",
|
|
"content": {
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "第一个标签页的内容"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "tab2",
|
|
"label": "内容2",
|
|
"content": {
|
|
"widgettype": "Form",
|
|
"options": {
|
|
"fields": [
|
|
{
|
|
"name": "input1",
|
|
"label": "输入框",
|
|
"uitype": "str"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |