From 089bf5d2378b3c4a61d795b2a92bede2c193b771 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 06 Jan 2026 11:22:58 +0800
Subject: [PATCH] 1
---
src/store/index.js | 43 ++++++++++++++++++++++++++++++++++++++++---
1 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/src/store/index.js b/src/store/index.js
index e5f0301..e4f4f7d 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,5 +1,42 @@
-import { createPinia } from "pinia";
+import Vue from 'vue'
+import Vuex from 'vuex'
+import cloneDeep from 'lodash/cloneDeep'
+import common from './modules/common'
+import user from './modules/user'
+import prod from './modules/prod'
-const pinia = createPinia()
-export default pinia
\ No newline at end of file
+import talks from './modules/talk'
+import notify from './modules/notify'
+import settings from './modules/settings'
+import emoticon from './modules/emoticon'
+import dialogue from './modules/dialogue'
+import note from './modules/note'
+
+Vue.use(Vuex)
+
+export default new Vuex.Store({
+ modules: {
+ common,
+ user,
+ prod,
+
+ notify,
+ talks,
+ settings,
+ emoticon,
+ dialogue,
+ note,
+ },
+ mutations: {
+ // 重置vuex本地储存状态
+ resetStore (state) {
+ if(this.common){
+ Object.keys(state).forEach((key) => {
+ state[key] = cloneDeep(process.env.VUE_APP_RESOURCES_URL['storeState'][key])
+ })
+ }
+ }
+ },
+ strict: process.env.NODE_ENV !== 'production'
+})
--
Gitblit v1.9.3