123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import Vue from "vue";
- import Vuex from "vuex";
- import user from "@/store/modules/user";
- Vue.use(Vuex);
- const myPlugin = (store) => {
-
- let vuexStorage = uni.getStorageSync("vuexStorage");
- if (vuexStorage) {
- console.log(vuexStorage)
- store.replaceState(vuexStorage);
- }
- store.subscribe((mutation, state) => {
- uni.setStorageSync("vuexStorage", state);
- });
- };
- export default new Vuex.Store({
- state: {
- isShowSeiminModel: false
- },
- mutations: {
-
- changeSeiminModel(state, args) {
- state.isShowSeiminModel = args;
- }
- },
- modules: {
- user,
- },
- plugins: [myPlugin],
- });
|