update
This commit is contained in:
parent
d456880c91
commit
5648683c86
@ -218,6 +218,7 @@ onBeforeMount(() => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fontAdpat()
|
fontAdpat()
|
||||||
// stopBack()
|
// stopBack()
|
||||||
|
goBackEvent()
|
||||||
});
|
});
|
||||||
|
|
||||||
// 来自首页的事件
|
// 来自首页的事件
|
||||||
@ -326,6 +327,18 @@ const stopBack = ()=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 监听后退事件
|
||||||
|
const goBackEvent = ()=>{
|
||||||
|
if (window.history && window.history.pushState) {
|
||||||
|
window.onpopstate = function() {
|
||||||
|
//后退按钮触发事件
|
||||||
|
console.log("后退");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user