禁止后退
This commit is contained in:
parent
ad77e59004
commit
8c0fd1d4f1
@ -217,6 +217,7 @@ onBeforeMount(() => {
|
||||
// 页面挂载
|
||||
onMounted(() => {
|
||||
fontAdpat()
|
||||
stopBack()
|
||||
});
|
||||
|
||||
// 来自首页的事件
|
||||
@ -316,6 +317,16 @@ const fontAdpat = ()=>{
|
||||
|
||||
}
|
||||
|
||||
const stopBack = ()=>{
|
||||
history.pushState(null, null, document.URL);
|
||||
|
||||
window.addEventListener('popstate', function () {
|
||||
|
||||
history.pushState(null, null, document.URL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user