llmage/wwwroot/show_llms.ui
yumoqing 2f75784ea6 fix: 模型广场左侧导航点击右侧不更新 — target加app.前缀+mode:replace
根因:左侧按钮与右侧面板是HBox下的兄弟关系,非父子关系。
bricks框架要求兄弟间引用需加app.前缀才能正确寻址。
同时添加mode:replace确保每次点击替换旧内容。
2026-06-01 13:20:16 +08:00

75 lines
1.3 KiB
XML

{% set catelogs = get_llmcatelogs() %}
{
"widgettype":"HBox",
"options":{
"width":"100%",
"height":"100%"
},
"subwidgets":[
{
"widgettype":"VScrollPanel",
"options":{
"cwidth":18,
"height":"100%",
"css":"plaza-sidebar"
},
"subwidgets":[
{
"widgettype":"Button",
"options":{
"label":"全部",
"css":"plaza-nav-btn",
"width":"100%"
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"urlwidget",
"target":"app.plaza_cards_panel",
"mode":"replace",
"options":{
"url":"{{entire_url('show_llms_cards.ui')}}"
}
}
]
},
{% for cat in catelogs %}
{
"widgettype":"Button",
"options":{
"label":"{{cat.name}}",
"css":"plaza-nav-btn",
"width":"100%"
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"urlwidget",
"target":"app.plaza_cards_panel",
"mode":"replace",
"options":{
"url":"{{entire_url('show_llms_cards.ui')}}",
"params":{
"catelogid":"{{cat.id}}"
}
}
}
]
}{% if not loop.last %},{% endif %}
{% endfor %}
]
},
{
"widgettype":"urlwidget",
"id":"plaza_cards_panel",
"options":{
"cwidth":82,
"height":"100%",
"url":"{{entire_url('show_llms_cards.ui')}}"
}
}
]
}