//此方法刷新页面时也会执行
window.addEventListener('beforeunload',()=>{
this.$store.commit("setToken", "");
});
在APP.vue中加上这段代码即可
//此方法刷新页面时也会执行
window.addEventListener('beforeunload',()=>{
this.$store.commit("setToken", "");
});
在APP.vue中加上这段代码即可
相关文章: