禁止后退
This commit is contained in:
@@ -217,6 +217,7 @@ onBeforeMount(() => {
|
|||||||
// 页面挂载
|
// 页面挂载
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fontAdpat()
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user