From df0f50e4f787975d9bd39e4b5efd54491fe0e724 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 Jun 2026 13:26:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=20language.ui=20?= =?UTF-8?q?=E4=B8=BA=E5=8E=9F=E7=89=88=20Text=20widget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VBox 是布局容器不支持 click 事件,导致: - 语言代码不显示(VBox 无 otext) - 点击无反应(VBox 不触发 click bind) - 语言切换后代码不更新(缺少 app lang bind) 恢复为 Text widget + Popup click + lang event bind --- wwwroot/i18n/language.ui | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/wwwroot/i18n/language.ui b/wwwroot/i18n/language.ui index bafa59d3..e166b481 100644 --- a/wwwroot/i18n/language.ui +++ b/wwwroot/i18n/language.ui @@ -1,32 +1,13 @@ { "id":"language", - "widgettype":"VBox", + "widgettype":"Text", "options":{ - "cwidth":4, + "tip":"change UI language", + "i18n":true, + "otext":"{{params_kw._lang}}", + "cwidth": 4, "css":"clickable" }, - "subwidgets":[ - { - "widgettype":"Svg", - "options":{ - "url":"{{entire_url('language.svg')}}", - "rate":2, - "valign":"center", - "halign":"center" - } - }, - { - "widgettype":"Text", - "id":"lang_label", - "options":{ - "i18n":false, - "otext":"{{params_kw._lang}}", - "cwidth":4, - "css":"text-center", - "cfontsize":0.6 - } - } - ], "binds":[ { "wid":"self", @@ -35,7 +16,7 @@ "target":"Popup", "popup_options":{ "eventpos":true, - "cwidth":11, + "cwidth": 11, "cheight":10, "dismiss_events":["command"] }, @@ -47,7 +28,7 @@ "wid":"app", "event":"lang", "actiontype":"script", - "target":"lang_label", + "target":"self", "script":"this.set_otext(bricks.app.lang)" } ]