diff --git a/components.d.ts b/components.d.ts index 43ffe278..8e599c1e 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,6 +10,7 @@ declare module 'vue' { export interface GlobalComponents { ConfirmDialog: typeof import('./src/@core/components/ConfirmDialog.vue')['default'] DialogCloseBtn: typeof import('./src/@core/components/DialogCloseBtn.vue')['default'] + DialogWrapper: typeof import('./src/@core/components/DialogWrapper.vue')['default'] ErrorHeader: typeof import('./src/@core/components/ErrorHeader.vue')['default'] ExistIcon: typeof import('./src/@core/components/ExistIcon.vue')['default'] LoadingBanner: typeof import('./src/@core/components/LoadingBanner.vue')['default'] diff --git a/src/@core/components/ConfirmDialog.vue b/src/@core/components/ConfirmDialog.vue index fdb6af90..c33299d3 100644 --- a/src/@core/components/ConfirmDialog.vue +++ b/src/@core/components/ConfirmDialog.vue @@ -59,7 +59,7 @@ function handleCancel() { diff --git a/src/@core/components/DialogWrapper.vue b/src/@core/components/DialogWrapper.vue new file mode 100644 index 00000000..5c70c83d --- /dev/null +++ b/src/@core/components/DialogWrapper.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/@core/scss/template/_default-layout-w-vertical-nav.scss b/src/@core/scss/template/_default-layout-w-vertical-nav.scss index 92ba9ed9..cc5bf2ab 100644 --- a/src/@core/scss/template/_default-layout-w-vertical-nav.scss +++ b/src/@core/scss/template/_default-layout-w-vertical-nav.scss @@ -46,7 +46,8 @@ $header: ".layout-navbar"; /* ℹ️ Ensure header styles are preserved when dialog is opened, regardless of scroll state */ - html.v-overlay-scroll-blocked &.window-scrolled.layout-navbar-fixed { + html.v-overlay-scroll-blocked &.window-scrolled.layout-navbar-fixed, + html.dialog-scroll-locked &.layout-navbar-fixed { #{$header} { @extend %default-layout-vertical-nav-scrolled-sticky-elevated-nav; diff --git a/src/@layouts/components/VerticalNavLayout.vue b/src/@layouts/components/VerticalNavLayout.vue index a4f552fd..5bc9baa1 100644 --- a/src/@layouts/components/VerticalNavLayout.vue +++ b/src/@layouts/components/VerticalNavLayout.vue @@ -88,6 +88,9 @@ export default defineComponent({ }, }) + // 检查是否有弹窗打开(通过CSS类名判断) + const isDialogOpen = document.documentElement.classList.contains('dialog-scroll-locked') + return h( 'div', { @@ -96,7 +99,7 @@ export default defineComponent({ 'layout-navbar-fixed', mdAndDown.value && 'layout-overlay-nav', route.meta.layoutWrapperClasses, - scrollDistance.value && 'window-scrolled', + (scrollDistance.value || isDialogOpen) && 'window-scrolled', ], }, [verticalNav, h('div', { class: 'layout-content-wrapper' }, [navbar, main, footer]), layoutOverlay], diff --git a/src/components/PWAInstallPrompt.vue b/src/components/PWAInstallPrompt.vue index c8baa163..2d6db2e8 100644 --- a/src/components/PWAInstallPrompt.vue +++ b/src/components/PWAInstallPrompt.vue @@ -133,7 +133,7 @@ const instructions = computed(() => { - + @@ -170,7 +170,7 @@ const instructions = computed(() => { - +