实验室运维app端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
571 B

1 year ago
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
dynamicTabbar: [], // 动态tabbar
tabBarList: [],
},
getters: {},
actions: {
changeTabbar({ commit }, payload) {
commit('updateTabbar', payload)
}
},
mutations: {
updateTabbar(state, payload) {
uni.setStorageSync('tabBarList', payload) // 根据登录时传过来的值,存储对应的tabbarlist
state.dynamicTabbar = payload
},
}
})
export default store