Files
gzth/k_ry_mobile_form/status_bar_buttons.xml
T
2026-03-20 12:54:57 +08:00

25 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<!-- 覆盖 web.StatusBarButtons 模板,实现移动端底部悬浮栏 -->
<t t-name="k_ry_mobile_form.StatusBarButtons">
<t t-set="slots" t-value="visibleSlotNames" />
<!-- 移动端:底部悬浮栏(始终渲染,通过CSS控制显示) -->
<!-- 挂载后由 JS 移到 .o_form_view 下,与 .o_form_view_container 同级,避免被中间层 overflow 裁剪 -->
<div class="o_statusbar_buttons_mobile_fixed" t-ref="mobileBarRoot" t-att-style="env.isSmall ? '' : 'display: none;'">
<div class="o_statusbar_buttons d-flex align-items-center justify-content-center gap-2">
<t t-foreach="slots" t-as="slot" t-key="slot">
<t t-slot="{{ slot }}" />
</t>
</div>
</div>
<!-- 桌面端:正常显示 -->
<div class="o_statusbar_buttons d-flex align-items-center align-content-around flex-wrap gap-1" t-att-style="env.isSmall ? 'display: none;' : ''">
<t t-foreach="slots" t-as="slot" t-key="slot">
<t t-slot="{{ slot }}" />
</t>
</div>
</t>
</templates>