Files
SupplierSystem/miniprogram/components/ble-printer-sheet/index.wxml
T
雨天 4f7d4330a4
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
修复小程序打印机选择弹窗被遮挡
分拣/备货/采购面板嵌在 pages/home 的 .home-purchase-embed.anim-rise 里,\n该容器因 animation-fill-mode: both 永久保留 transform ⇒ 弹层以它为包含块、\n不按视口居中,且困在其层叠上下文内,被底部 tab 栏(z-index 100,\nvan-popup 默认也是 100)盖住。\n\n弹层外包 root-portal + z-index=10000:与面板内其它弹层(batch-mask /\nmodal-mask)同款做法。只修这个漏网的共享弹层,未动 .anim-rise;\nstock-inbound-panel 的同类隐患仅在设计文档登记,不动。
2026-10-14 14:03:00 +08:00

31 lines
1.6 KiB
Plaintext

<!-- 必须 root-portal:三个面板(分拣/备货/采购)都嵌在 pages/home 的
`.home-purchase-embed.anim-rise` 工作区里,该容器因 `animation-fill-mode: both`
永久保留 `transform: translateY(0)` ⇒ 成为 `position: fixed` 的包含块,
弹层既不按视口居中,又困在它的层叠上下文内,被底部 tab 栏(`.tab-bar` z-index:100)盖住。
z-index 取 10000,与面板内其它弹层(batch-mask / modal-mask)一致。 -->
<root-portal enable="{{true}}">
<van-popup show="{{show}}" position="center" z-index="10000" bind:close="onClose">
<view class="sheet">
<view class="sheet-title">选择蓝牙热敏机</view>
<view class="sheet-hint">只连 BLE 小票机。得力 M1022W 等 A4 激光机请用「A4 文档」打印,不要在这里搜索。</view>
<view wx:if="{{error}}" class="sheet-error">{{error}}</view>
<view wx:if="{{scanning}}" class="sheet-muted">正在搜索附近设备…</view>
<view wx:elif="{{!devices.length && !error}}" class="sheet-muted">未发现带名称的 BLE 设备,请打开打印机并靠近手机</view>
<view
wx:for="{{devices}}"
wx:key="deviceId"
class="device-row"
data-id="{{item.deviceId}}"
bindtap="onPick"
>
<view class="device-name">{{item.name}}</view>
<view class="device-rssi">信号 {{item.RSSI}}</view>
</view>
<view class="sheet-actions">
<view class="sheet-btn" bindtap="scan">重新搜索</view>
<view class="sheet-btn sheet-btn--ghost" bindtap="onClose">取消</view>
</view>
</view>
</van-popup>
</root-portal>