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