From 35743f996ade9e2993fb15a274bf3dbb6a3df9d7 Mon Sep 17 00:00:00 2001
From: pyt <626651354@qq.com>
Date: 星期一, 28 四月 2025 16:48:28 +0800
Subject: [PATCH] feat

---
 laboratory/src/store/index.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/laboratory/src/store/index.js b/laboratory/src/store/index.js
index 1089d31..3f526af 100644
--- a/laboratory/src/store/index.js
+++ b/laboratory/src/store/index.js
@@ -4,9 +4,9 @@
 
 const store = new Vuex.Store({
   state: {
-    menus: localStorage.getItem('menuList') ? JSON.parse(localStorage.getItem('menuList')) : [],
-    keepAliveList: localStorage.getItem('keepAliveList') ? JSON.parse(localStorage.getItem('keepAliveList')) : [],//缓存页面
-    tagList: localStorage.getItem('tagList') ? JSON.parse(localStorage.getItem('tagList')) : [],//标签列表
+    menus: sessionStorage.getItem('menuList') ? JSON.parse(sessionStorage.getItem('menuList')) : [],
+    keepAliveList: sessionStorage.getItem('keepAliveList') ? JSON.parse(sessionStorage.getItem('keepAliveList')) : [],//缓存页面
+    tagList: sessionStorage.getItem('tagList') ? JSON.parse(sessionStorage.getItem('tagList')) : [],//标签列表
     isFold: false,//是否折叠
     assay: [
       '检验方法正确',
@@ -39,11 +39,11 @@
     },
     SET_KEEPALIVELIST(state, data) {
       state.keepAliveList = data;
-      localStorage.setItem('keepAliveList', JSON.stringify(data));
+      sessionStorage.setItem('keepAliveList', JSON.stringify(data));
     },
     SET_TAGLIST(state, data) {
       state.tagList = data;
-      localStorage.setItem('tagList', JSON.stringify(data));
+      sessionStorage.setItem('tagList', JSON.stringify(data));
     },
     SET_ISFOLD(state, data) {
       state.isFold = data;

--
Gitblit v1.7.1