| | |
| | | import dict from './modules/dict' |
| | | import getters from './getters' |
| | | import flow from './modules/LifeFlow' |
| | | import { setStore } from "@/util/store.js"; |
| | | |
| | | Vue.use(Vuex) |
| | | const store = new Vuex.Store({ |
| | |
| | | flow |
| | | }, |
| | | getters, |
| | | state: { |
| | | icons:undefined,//图标库数据 |
| | | viewtabparams:undefined, //tab浏览 Action参数 |
| | | }, |
| | | mutations: { |
| | | // tab浏览参数 |
| | | getViewtabparams(state, obj) { |
| | | state.viewtabparams = obj; |
| | | }, |
| | | // 图标库 |
| | | getIcons(state, obj) { |
| | | state.icons = obj; |
| | | }, |
| | | }, |
| | | actions: { |
| | | setViewtabparams({ commit }, obj){ |
| | | commit("getViewtabparams", obj); |
| | | setStore({ |
| | | name:'viewtabparams', |
| | | content:obj, |
| | | type:'session' |
| | | }); |
| | | }, |
| | | //保存图标库到本地 |
| | | setIcons({commit},obj){ |
| | | commit("getIcons", obj); |
| | | setStore({ |
| | | name:'icons', |
| | | content:obj, |
| | | type:'session' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | export default store |