//此方法刷新页面时也会执行 window.addEventListener(‘beforeunload‘,()=>{ this.$store.commit("setToken", ""); });
在APP.vue中加上这段代码即可
vue 关闭浏览器清缓存等的操作
原文:https://www.cnblogs.com/cyqdeshenluo/p/13181871.html