fix(modal): 修复模态框滚动和点击事件处理

为多个模态框组件添加滚动和点击事件处理,防止背景滚动时内容滚动
当点击模态框背景时关闭模态框,同时阻止事件冒泡到内容区域
This commit is contained in:
2026-04-12 21:34:51 +08:00
parent ba10f90dde
commit ca7520cb2e
5 changed files with 27 additions and 2 deletions
+4 -1
View File
@@ -49,7 +49,10 @@
leave-from-class="opacity-100 translate-y-0"
leave-to-class="opacity-0 -translate-y-2"
>
<div v-show="isExpanded" class="max-h-96 overflow-y-auto overscroll-contain px-3 pb-4">
<div
v-show="isExpanded"
class="max-h-96 overflow-y-auto overscroll-contain px-3 pb-4"
>
<div
v-if="downloads.length === 0"
class="flex flex-col items-center justify-center rounded-2xl border border-dashed border-slate-200/80 px-4 py-12 text-slate-500 dark:border-slate-800/80 dark:text-slate-400"