mounted()
history.pushState(null, null, document.URL)
window.addEventListener(
'popstate',
() => {
// 在这个可以添加条件判断
history.pushState(null, null, document.URL)
},
false
)
}
vue阻止页面回退
最新推荐文章于 2024-04-01 15:51:27 发布