Heyong
Results
1
comments of
Heyong
文中说 > router中拿到了用户信息我希望把这个用户信息放到store里,因为在router中拿不到vue实例,无法直接操作vuex的方法,这个时候如果没有 event-bus 就很难操作 访问store并不需要vue实例,直接把store 实例 import 进来就可以使用了,vue实例上的$store就是这个store实例。这里有尤大的回答: [https://github.com/vuejs/vuex-router-sync/issues/26](https://github.com/vuejs/vuex-router-sync/issues/26)