fix: fix abnormal display of scroll bar on lock screen page (#4546)

*  fix abnormal display of scroll bar on lock screen page
This commit is contained in:
Squall2017
2024-09-29 21:45:56 +08:00
committed by GitHub
parent 2d1519eca7
commit b7776c5148
4 changed files with 9 additions and 2 deletions

View File

@@ -2,8 +2,8 @@ import { getScrollbarWidth, needsScrollbar } from '@vben-core/shared/utils';
import {
useScrollLock as _useScrollLock,
tryOnBeforeMount,
tryOnBeforeUnmount,
tryOnMounted,
} from '@vueuse/core';
export const SCROLL_FIXED_CLASS = `_scroll__fixed_`;
@@ -12,7 +12,7 @@ export function useScrollLock() {
const isLocked = _useScrollLock(document.body);
const scrollbarWidth = getScrollbarWidth();
tryOnBeforeMount(() => {
tryOnMounted(() => {
if (!needsScrollbar()) {
return;
}