Blame view

frontend/mobile/src/store/modules/tabActive.js 375 Bytes
8d73e917   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25


const state = {
  tabActiveMap: new Map(),
}


const actions = {
  setTabActive({ commit }, {tabName, activeIndex}) {
    commit('setTabActive', {tabName, activeIndex})
  }
}

const mutations = {
  setTabActive(state, {tabName, activeIndex}) {
    state.tabActiveMap.set(tabName, activeIndex)
  },
}

export default {
  namespaced: true,
  state,
  actions,
  mutations,
}