fix: 模型广场左侧导航点击右侧不更新 — target加app.前缀+mode:replace

根因:左侧按钮与右侧面板是HBox下的兄弟关系,非父子关系。
bricks框架要求兄弟间引用需加app.前缀才能正确寻址。
同时添加mode:replace确保每次点击替换旧内容。
This commit is contained in:
yumoqing 2026-06-01 13:20:16 +08:00
parent 2b30a3f0dc
commit 2f75784ea6
2 changed files with 48 additions and 44 deletions

View File

@ -21,17 +21,18 @@
"css":"plaza-nav-btn", "css":"plaza-nav-btn",
"width":"100%" "width":"100%"
}, },
"binds":[ "binds":[
{ {
"wid":"self", "wid":"self",
"event":"click", "event":"click",
"actiontype":"urlwidget", "actiontype":"urlwidget",
"target":"plaza_cards_panel", "target":"app.plaza_cards_panel",
"options":{ "mode":"replace",
"url":"{{entire_url('show_llms_cards.ui')}}" "options":{
} "url":"{{entire_url('show_llms_cards.ui')}}"
} }
] }
]
}, },
{% for cat in catelogs %} {% for cat in catelogs %}
{ {
@ -41,20 +42,21 @@
"css":"plaza-nav-btn", "css":"plaza-nav-btn",
"width":"100%" "width":"100%"
}, },
"binds":[ "binds":[
{ {
"wid":"self", "wid":"self",
"event":"click", "event":"click",
"actiontype":"urlwidget", "actiontype":"urlwidget",
"target":"plaza_cards_panel", "target":"app.plaza_cards_panel",
"options":{ "mode":"replace",
"url":"{{entire_url('show_llms_cards.ui')}}", "options":{
"params":{ "url":"{{entire_url('show_llms_cards.ui')}}",
"catelogid":"{{cat.id}}" "params":{
} "catelogid":"{{cat.id}}"
} }
} }
] }
]
}{% if not loop.last %},{% endif %} }{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ]

View File

@ -21,17 +21,18 @@
"css":"plaza-nav-btn", "css":"plaza-nav-btn",
"width":"100%" "width":"100%"
}, },
"binds":[ "binds":[
{ {
"wid":"self", "wid":"self",
"event":"click", "event":"click",
"actiontype":"urlwidget", "actiontype":"urlwidget",
"target":"plaza_provider_panel", "target":"app.plaza_provider_panel",
"options":{ "mode":"replace",
"url":"{{entire_url('show_llms_cards_by_provider.ui')}}" "options":{
} "url":"{{entire_url('show_llms_cards_by_provider.ui')}}"
} }
] }
]
}, },
{% for p in providers %} {% for p in providers %}
{ {
@ -41,20 +42,21 @@
"css":"plaza-nav-btn", "css":"plaza-nav-btn",
"width":"100%" "width":"100%"
}, },
"binds":[ "binds":[
{ {
"wid":"self", "wid":"self",
"event":"click", "event":"click",
"actiontype":"urlwidget", "actiontype":"urlwidget",
"target":"plaza_provider_panel", "target":"app.plaza_provider_panel",
"options":{ "mode":"replace",
"url":"{{entire_url('show_llms_cards_by_provider.ui')}}", "options":{
"params":{ "url":"{{entire_url('show_llms_cards_by_provider.ui')}}",
"providerid":"{{p.id}}" "params":{
} "providerid":"{{p.id}}"
} }
} }
] }
]
}{% if not loop.last %},{% endif %} }{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ]