fix(storefront): 价格表列等宽flex:1 1 0px——filler基宽content依赖致列边界逐行不齐(实测x=501/449交替vs表头513);表头/普通格/价格HBox三处统一

This commit is contained in:
yumoqing 2026-09-18 16:49:14 +08:00
parent d49790d126
commit 4f7029f7fe

View File

@ -173,7 +173,7 @@
"options": {"css": "tabular-header-row", "width": "100%"},
"subwidgets": [
{% for h in price_table.headers %}
{"widgettype": "Text", "options": {"otext": {{json.dumps(h, ensure_ascii=False)}}, "text": {{json.dumps(h, ensure_ascii=False)}}, "i18n": true, "halign": "left", "css": "filler", "cfontsize": 0.75}}{{ "," if not loop.last }}
{"widgettype": "Text", "options": {"otext": {{json.dumps(h, ensure_ascii=False)}}, "text": {{json.dumps(h, ensure_ascii=False)}}, "i18n": true, "halign": "left", "css": "filler", "cfontsize": 0.75, "flex": "1 1 0px"}}{{ "," if not loop.last }}
{% endfor %}
]
}{{ "," if price_table.rows }}
@ -184,12 +184,12 @@
"subwidgets": [
{% for c in row %}
{% if c.k == 'price' %}
{"widgettype": "HBox", "options": {"css": "filler", "gap": "6px", "alignItems": "center"}, "subwidgets": [
{"widgettype": "HBox", "options": {"css": "filler", "gap": "6px", "alignItems": "center", "flex": "1 1 0px"}, "subwidgets": [
{"widgettype": "Text", "options": {"otext": {{json.dumps(c.t, ensure_ascii=False)}}, "text": {{json.dumps(c.t, ensure_ascii=False)}}, "i18n": true, "halign": "left", "cfontsize": 0.75, "color": "#e74c3c"}}{% if c.orig %},
{"widgettype": "Text", "options": {"otext": {{json.dumps(c.orig, ensure_ascii=False)}}, "text": {{json.dumps(c.orig, ensure_ascii=False)}}, "i18n": true, "halign": "left", "cfontsize": 0.75, "color": "var(--ink-3)", "textDecoration": "line-through"}}{% endif %}
]}{{ "," if not loop.last }}
{% else %}
{"widgettype": "Text", "options": {"otext": {{json.dumps(c.t, ensure_ascii=False)}}, "text": {{json.dumps(c.t, ensure_ascii=False)}}, "i18n": true, "halign": "left", "css": "filler", "cfontsize": 0.75, "color": "var(--ink-2)"}}{{ "," if not loop.last }}
{"widgettype": "Text", "options": {"otext": {{json.dumps(c.t, ensure_ascii=False)}}, "text": {{json.dumps(c.t, ensure_ascii=False)}}, "i18n": true, "halign": "left", "css": "filler", "cfontsize": 0.75, "color": "var(--ink-2)", "flex": "1 1 0px"}}{{ "," if not loop.last }}
{% endif %}
{% endfor %}
]