feat: fixed the defects the scrollbar disapear when modal close

pull/355/head^2
Harold Zhang 2026-06-03 16:10:17 +08:00
parent 79707a2ebd
commit cc60ca9592
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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>