refactor: 模型上线检查UI改为VScrollPanel+HBox按钮布局
- UI: 检查结果区域改为VScrollPanel(filler),两个按钮用HBox并排 - check_pricing_program.dspy: 优先显示display_text字段,回退到name字段
This commit is contained in:
parent
5ab8171552
commit
2efb1268b7
@ -19,7 +19,11 @@ else:
|
||||
pregs = await psor.sqlExe(
|
||||
"select * from pricing_program where id=${ppid}$", {'ppid': ppid})
|
||||
if pregs:
|
||||
text = f"✅ 定价项目(pricing_program): {pregs[0].name} (id={ppid})"
|
||||
p = pregs[0]
|
||||
display_name = getattr(p, 'display_text', '') or getattr(p, 'name', '')
|
||||
text = f"✅ 定价项目(pricing_program): {display_name}"
|
||||
if hasattr(p, 'id'):
|
||||
text += f" (id={p.id})"
|
||||
else:
|
||||
text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到"
|
||||
|
||||
|
||||
@ -15,6 +15,13 @@
|
||||
"level": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "VScrollPanel",
|
||||
"options": {
|
||||
"css": "filler",
|
||||
"width": "100%"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
@ -80,14 +87,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": {
|
||||
"name": "test_btn",
|
||||
"label": "体验一次",
|
||||
"i18n": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
@ -96,14 +95,6 @@
|
||||
"i18n": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": {
|
||||
"name": "charge_btn",
|
||||
"label": "检查计费",
|
||||
"i18n": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
@ -112,6 +103,33 @@
|
||||
"i18n": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"spacing": 10,
|
||||
"alignItems": "center"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": {
|
||||
"name": "test_btn",
|
||||
"label": "体验一次",
|
||||
"i18n": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": {
|
||||
"name": "charge_btn",
|
||||
"label": "检查计费",
|
||||
"i18n": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"binds": [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user