mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 12:19:08 +01:00
fix: dialog scroll lock 2 (#156)
This commit is contained in:
parent
076b55ca42
commit
3e26326a31
1 changed files with 14 additions and 1 deletions
|
@ -98,11 +98,15 @@ function onTransitionEnd() {
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="isVisible"
|
v-if="isVisible"
|
||||||
fixed top-0 bottom-0 left-0 right-0 z-20000
|
class="scrollbar-hide"
|
||||||
|
fixed top-0 bottom-0 left-0 right-0 z-20000 overscroll-none overflow-y-scroll
|
||||||
:class="modelValue ? '' : 'pointer-events-none'"
|
:class="modelValue ? '' : 'pointer-events-none'"
|
||||||
>
|
>
|
||||||
|
<!-- The style `scrollbar-hide overscroll-none overflow-y-scroll` and `h="[calc(100%+0.5px)]"` is used to implement scroll locking, -->
|
||||||
|
<!-- corresponding to issue: #106, so please don't remove it. -->
|
||||||
<div
|
<div
|
||||||
bg-base bottom-0 left-0 right-0 top-0 absolute transition-opacity duration-500 ease-out
|
bg-base bottom-0 left-0 right-0 top-0 absolute transition-opacity duration-500 ease-out
|
||||||
|
h="[calc(100%+0.5px)]"
|
||||||
:class="isOut ? 'opacity-0' : 'opacity-85'"
|
:class="isOut ? 'opacity-0' : 'opacity-85'"
|
||||||
@click="close"
|
@click="close"
|
||||||
/>
|
/>
|
||||||
|
@ -116,3 +120,12 @@ function onTransitionEnd() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style socped>
|
||||||
|
.scrollbar-hide {
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
.scrollbar-hide::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue