export const state = {
  appTitle: process.env.VUE_APP_TITLE,
  // 是否使用多页签模式
  multiTabs: true,
  // 用户基本信息
  userInfo: {},
  // 用户权限列表
  userPerms: {},
}

export const mutations = {
  setUserInfo(state, newValue) {
    state.userInfo = { ...state.userInfo, ...newValue }
  },
  setUserPerms(state, newValue) {
    state.userPerms = { ...state.userPerms, ...newValue }
  },
  clearUserInfo(state) {
    state.userInfo = {}
  },
  clearUserPerms(state) {
    state.userPerms = {}
  },
}
