页面退出时,清空Vuex中的数据

点击退出时,需要做的操作有:
1.清空sessionStorage里面的值
2.删除vuex中的值,让当前的页面刷新
3.跳转回登录页

sessionStorage.clear();
this.$router.push('/login')
//想清空vuex中的数据,让页面重新加载就行了
window.location.reload()

猜你喜欢

转载自blog.csdn.net/sea9528/article/details/108053928
今日推荐