标签:执行 his window code vue event http comm javascrip
//此方法刷新页面时也会执行
window.addEventListener(‘beforeunload‘,()=>{
this.$store.commit("setToken", "");
});
在APP.vue中加上这段代码即可

标签:执行 his window code vue event http comm javascrip
原文地址:https://www.cnblogs.com/cyqdeshenluo/p/13181871.html