简介

RT,有的时候想使用保存在vuex里面的东西

link

https://laracasts.com/discuss/channels/vue/vuex-accessing-vuex-outside-of-a-vue-component

FromLink

// some JS file
import store from './../store'; // path to your Vuex store

let user = store.getters.user;
// do stuff with user
posted on 2020-07-03 13:33  HDU李少帅  阅读(1141)  评论(0编辑  收藏  举报