vue2移动端 router-view 弹出后, 滑动页面 有时候会有时会触发上一层滑动,缩放时候也会看见下一层页面,请问怎么解决?谢谢
1 回答

一只斗牛犬
TA贡献1784条经验 获得超2个赞
,router-view 层设置如下
data () {
return {
y:0
}
},
created(){
this.y = document.body.scrollTop
document.body.setAttribute("class","hid");
},
destroyed(){
document.body.removeAttribute("class","hid");
document.body.scrollTop = this.y
},
//样式中
.hid{
position: fixed;
}
添加回答
举报
0/150
提交
取消