- 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
71 lines
1.4 KiB
XML
71 lines
1.4 KiB
XML
{
|
|
"widgettype": "Popup",
|
|
"options": {
|
|
"title": "弹出层示例",
|
|
"width": "400px",
|
|
"height": "300px",
|
|
"auto_open": true,
|
|
"modal": true,
|
|
"movable": true,
|
|
"resizable": false
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "这是一个 Popup 弹出层",
|
|
"fontSize": "18px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Form",
|
|
"options": {
|
|
"fields": [
|
|
{
|
|
"name": "message",
|
|
"label": "消息内容",
|
|
"uitype": "text"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Filler"
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"text": "确定"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "method",
|
|
"target": "-@Popup",
|
|
"method": "dismiss"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"text": "取消"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "method",
|
|
"target": "-@Popup",
|
|
"method": "dismiss"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |