access store outside of component vuejs

前端 未结 1 403
无人共我
无人共我 2020-12-29 04:11

I have a file for configuring my OpenID Connect authentication

export const authMgr = new Oidc.UserManager({
  userStore: new Oidc.WebStorageStateStore(),
          


        
相关标签:
1条回答
  • 2020-12-29 04:56

    Try to import 'store' with curly brackets

    import {store} from '../store/index'
    
    store.getters.appSettings
    

    Another option is to access from the vue property

    import Vue from 'vue'
    
    Vue.store.getters.appSettings
    
    0 讨论(0)
提交回复
热议问题