在views/good/index.vue页面用store.state.userinfo.account
来源:7-5 获取角色列表并存放在 vuex 中

开门啦
2022-01-22
已经写了router.beforeEach,通过store.dispatch去获取userinfo了。
在good/index.js中也引入store,并且通过return导出到模板了。
为什么store.state.userinfo.account的结果是undefined?
写回答
1回答
-
然冬
2022-01-24
贴一下router钩子的代码和调用地方的代码
052022-01-26
相似问题