将 useDialogScrollLock 替换为 useScrollLock

This commit is contained in:
jxxghp
2025-07-10 12:56:51 +08:00
parent ad857b0810
commit b3d3561111
3 changed files with 10 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
<script setup lang="ts">
import { computed, watch, onBeforeUnmount } from 'vue'
import { useDialogScrollLockWithWatch } from '@/composables/useDialogScrollLock'
import { useScrollLockWithWatch } from '@/composables/useScrollLock'
// Props
interface Props {
@@ -35,7 +35,7 @@ const dialogModel = computed({
})
// 使用滚动锁定
const { isLocked, lockScroll, restoreScroll } = useDialogScrollLockWithWatch(dialogModel, {
const { isLocked, lockScroll, restoreScroll } = useScrollLockWithWatch(dialogModel, {
autoRestore: true,
preserveScrollPosition: props.preserveScrollPosition,
preventTouchScroll: props.preventTouchScroll,