From cb2a01ee7dea28a2661720060b03c41dc372acb5 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 01 八月 2025 11:53:16 +0800
Subject: [PATCH] 完善串口处理数据,数据选择
---
src/store/modules/app.js | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/store/modules/app.js b/src/store/modules/app.js
index 3e22d1c..c93f1f8 100644
--- a/src/store/modules/app.js
+++ b/src/store/modules/app.js
@@ -1,13 +1,11 @@
-import Cookies from 'js-cookie'
-
const state = {
sidebar: {
- opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
+ opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false,
hide: false
},
device: 'desktop',
- size: Cookies.get('size') || 'medium'
+ size: localStorage.getItem('size') || 'medium'
}
const mutations = {
@@ -18,13 +16,13 @@
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
- Cookies.set('sidebarStatus', 1)
+ localStorage.setItem('sidebarStatus', 1)
} else {
- Cookies.set('sidebarStatus', 0)
+ localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
- Cookies.set('sidebarStatus', 0)
+ localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
},
@@ -33,7 +31,7 @@
},
SET_SIZE: (state, size) => {
state.size = size
- Cookies.set('size', size)
+ localStorage.setItem('size', size)
},
SET_SIDEBAR_HIDE: (state, status) => {
state.sidebar.hide = status
--
Gitblit v1.9.3