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