3

列表滚动穿透问题

⛩️书白·49分钟前
vue
<Teleport to="body"> <div v-if="show" class="fixed inset-0 z-50" style="pointer-events:none"> <!-- touch-action:none 彻底阻止背景页面滚动 --> <div class="absolute inset-0 bg-black/40" style="pointer-events:auto;touch-action:none" @click="show = false"></div> <!-- pointer-events:auto 恢复卡片内交互 --> <div class="absolute right-3 top-20 w-72" style="pointer-events:auto"> <div class="overflow-y-auto">评论内容</div> </div> </div> </Teleport>

错过了不该错过的人,那就是遗憾!

回复讨论
0

登录后可参与回复讨论。

当前还没有回复,欢迎成为第一个参与讨论的人。

文明发言,理性讨论