fix: rt_card_amount简化为amt|float,去掉if/else避免jinja2运算歧义
This commit is contained in:
parent
94147b24cc
commit
135b394b2a
@ -1,2 +1,2 @@
|
||||
{% set amt = j2_realtime_amount(request) %}
|
||||
{"widgettype":"VBox","options":{"css":"card","padding":"12px","borderRadius":"8px","width":"100%"},"subwidgets":[{"widgettype":"Text","options":{"text":"今日交易金额","fontSize":"11px","color":"var(--sage-text-secondary)"}},{"widgettype":"Text","options":{"text":{{json.dumps('¥' + ('%.2f' % amt) if amt else '¥0.00',ensure_ascii=False)}},"fontWeight":"700","fontSize":"18px","marginTop":"4px"}}]}
|
||||
{"widgettype":"VBox","options":{"css":"card","padding":"12px","borderRadius":"8px","width":"100%"},"subwidgets":[{"widgettype":"Text","options":{"text":"今日交易金额","fontSize":"11px","color":"var(--sage-text-secondary)"}},{"widgettype":"Text","options":{"text":{{json.dumps('¥' + ('%.2f' % (amt|float)), ensure_ascii=False)}},"fontWeight":"700","fontSize":"18px","marginTop":"4px"}}]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user