feat:更新代码

This commit is contained in:
leilei
2026-01-14 15:26:10 +08:00
parent a894367dcc
commit 15da7d589f
106 changed files with 3852 additions and 30294 deletions

View File

@@ -6,7 +6,7 @@ export const useAppStore = defineStore(
{
state: () => ({
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
opened: true,
withoutAnimation: false,
hide: false
},
@@ -14,20 +14,14 @@ export const useAppStore = defineStore(
size: Cookies.get('size') || 'default'
}),
actions: {
toggleSideBar(withoutAnimation) {
toggleSideBar(withoutAnimation) {
if (this.sidebar.hide) {
return false;
}
this.sidebar.opened = !this.sidebar.opened
this.sidebar.withoutAnimation = withoutAnimation
if (this.sidebar.opened) {
// Cookies.set('sidebarStatus', 1)
} else {
// Cookies.set('sidebarStatus', 0)
}
this.sidebar.opened = !this.sidebar.opened
this.sidebar.withoutAnimation = withoutAnimation
},
closeSideBar({ withoutAnimation }) {
// Cookies.set('sidebarStatus', 0)
closeSideBar({ withoutAnimation }) {
this.sidebar.opened = false
this.sidebar.withoutAnimation = withoutAnimation
},
@@ -38,7 +32,7 @@ export const useAppStore = defineStore(
this.size = size;
Cookies.set('size', size)
},
toggleSideBarHide(status) {
toggleSideBarHide(status) {
this.sidebar.hide = status
}
}