All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.src.store.index.ts Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
import Vue from 'vue'
import Vuex from 'vuex'
import tagsView from './tabbar/index'
import useMenuStore from './menu/index'
import useUserStore from './user/index'
import { getToken } from "@/utils/token"

Vue.use(Vuex)

const store=new Vuex.Store({
  state: {
  },
  getters: {
    // token
    token: (state: any) => (state.useUserStore.token || getToken()),
    // 用户信息
    userInfo: (state: any) => state.useUserStore.userInfo
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    tagsView,
    useMenuStore,
    useUserStore,
  }
})

export default store




© 2015 - 2024 Weber Informatics LLC | Privacy Policy