mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-12 02:21:06 +08:00
Prevent scroll when QuickAccess overlay is open (#381)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jxxghp <jxxghp@live.cn>
This commit is contained in:
@@ -212,6 +212,11 @@ watch(
|
||||
if (visible) {
|
||||
fetchPluginsWithPage()
|
||||
loadRecentPlugins()
|
||||
// 添加v-overlay-scroll-blocked类到html元素
|
||||
document.documentElement.classList.add('v-overlay-scroll-blocked')
|
||||
} else {
|
||||
// 移除v-overlay-scroll-blocked类
|
||||
document.documentElement.classList.remove('v-overlay-scroll-blocked')
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
@@ -224,6 +229,11 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
|
||||
// 组件卸载时确保移除v-overlay-scroll-blocked类
|
||||
onUnmounted(() => {
|
||||
document.documentElement.classList.remove('v-overlay-scroll-blocked')
|
||||
})
|
||||
|
||||
// 处理触摸开始
|
||||
function handleTouchStart(event: TouchEvent) {
|
||||
if (!props.visible) return
|
||||
|
||||
Reference in New Issue
Block a user