public onShowChange(value: boolean) {
if (value) {
document.documentElement.style.position = 'fixed'
document.body.style.overflow = 'hidden'
document.body.addEventListener(
'touchmove',
event => {
event.preventDefault()
},
false
)
} else {
document.documentElement.style.position = 'static'
document.body.style.overflow = 'auto'
document.body.removeEventListener(
'touchmove',
event => {
event.preventDefault()
},
false
)
}
网友评论