From b5f07701129ba4c4c7756b05ead11150eefad312 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 2 Jun 2026 10:31:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(cp=E6=8E=92=E8=A1=8C=E6=A6=9C):=20=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2margin=E7=BB=93=E5=90=88fixed=20?= =?UTF-8?q?=E9=81=AE=E7=BD=A9=E5=AF=BC=E8=87=B4=E7=9A=84=E9=81=AE=E7=BD=A9?= =?UTF-8?q?=E5=B1=82=E5=81=8F=E7=A7=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MaskLayer.vue | 8 +++++++- src/views/Ranking/Couple/index.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/MaskLayer.vue b/src/components/MaskLayer.vue index 1dab4c6..1ad78d6 100644 --- a/src/components/MaskLayer.vue +++ b/src/components/MaskLayer.vue @@ -26,6 +26,10 @@ const props = defineProps({ type: Boolean, required: true, }, + lockScroll: { + type: Boolean, + default: true, + }, }) let lockCount = 0 @@ -95,6 +99,8 @@ const unlockPageScroll = () => { watch( () => props.maskLayerShow, (newVal) => { + if (!props.lockScroll) return + if (newVal) { lockPageScroll() } else { @@ -105,7 +111,7 @@ watch( ) onUnmounted(() => { - if (props.maskLayerShow) { + if (props.lockScroll && props.maskLayerShow) { unlockPageScroll() } }) diff --git a/src/views/Ranking/Couple/index.vue b/src/views/Ranking/Couple/index.vue index 38e4872..bfafd1f 100644 --- a/src/views/Ranking/Couple/index.vue +++ b/src/views/Ranking/Couple/index.vue @@ -393,7 +393,7 @@ - +