feat: fixed the defects the scrollbar disapear when modal close
parent
79707a2ebd
commit
cc60ca9592
|
|
@ -5,7 +5,6 @@ import type { ClassType } from '@vben-core/typings';
|
|||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { useScrollLock } from '@vben-core/composables';
|
||||
import { cn } from '@vben-core/shared/utils';
|
||||
|
||||
import { X } from '@lucide/vue';
|
||||
|
|
@ -64,8 +63,6 @@ const position = computed(() => {
|
|||
return isAppendToBody() ? 'fixed' : 'absolute';
|
||||
});
|
||||
|
||||
useScrollLock();
|
||||
|
||||
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
||||
|
||||
const contentRef = ref<InstanceType<typeof DialogContent> | null>(null);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import type { DialogOverlayProps } from 'reka-ui';
|
|||
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
|
||||
import { useScrollLock } from '@vben-core/composables';
|
||||
import { cn } from '@vben-core/shared/utils';
|
||||
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
|
|
@ -13,6 +14,8 @@ const props = defineProps<
|
|||
>();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class');
|
||||
|
||||
useScrollLock();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue