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.
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
import app from './modules/app'
|
|
|
|
|
import lock from './modules/lock'
|
|
|
|
|
import dict from './modules/dict'
|
|
|
|
|
import user from './modules/user'
|
|
|
|
|
import tagsView from './modules/tagsView'
|
|
|
|
|
import permission from './modules/permission'
|
|
|
|
|
import settings from './modules/settings'
|
|
|
|
|
import getters from './getters'
|
|
|
|
|
import message from './modules/message'
|
|
|
|
|
import meeting from './modules/meeting'
|
|
|
|
|
import mqtt from './modules/mqtt'
|
|
|
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
|
|
|
|
const store = new Vuex.Store({
|
|
|
|
|
state: {
|
|
|
|
|
sidebarCollapsed: false
|
|
|
|
|
},
|
|
|
|
|
getters,
|
|
|
|
|
mutations: {
|
|
|
|
|
SET_SIDEBAR_COLLAPSED(state, collapsed) {
|
|
|
|
|
state.sidebarCollapsed = collapsed
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
actions: {
|
|
|
|
|
toggleSidebar({ commit, state }) {
|
|
|
|
|
commit('SET_SIDEBAR_COLLAPSED', !state.sidebarCollapsed)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
modules: {
|
|
|
|
|
app,
|
|
|
|
|
lock,
|
|
|
|
|
dict,
|
|
|
|
|
user,
|
|
|
|
|
tagsView,
|
|
|
|
|
permission,
|
|
|
|
|
settings,
|
|
|
|
|
message,
|
|
|
|
|
meeting,
|
|
|
|
|
mqtt
|
|
|
|
|
},
|
|
|
|
|
getters
|
|
|
|
|
})
|
|
|
|
|
export default store
|