mirror of
https://github.com/sendevia/website.git
synced 2026-03-05 23:32:45 +08:00
fix(navState): update cookie name
This commit is contained in:
@@ -11,7 +11,7 @@ import { useScreenWidthStore } from "./screenWidth";
|
|||||||
/** 导出 */
|
/** 导出 */
|
||||||
export const useNavStateStore = defineStore("navState", () => {
|
export const useNavStateStore = defineStore("navState", () => {
|
||||||
const isNavExpanded = ref<boolean>(false);
|
const isNavExpanded = ref<boolean>(false);
|
||||||
const cookieName = "nav-expanded";
|
const cookieName = "navbar_expanded";
|
||||||
const screenWidthStore = useScreenWidthStore();
|
const screenWidthStore = useScreenWidthStore();
|
||||||
|
|
||||||
/** 初始从 Cookie 读取状态 */
|
/** 初始从 Cookie 读取状态 */
|
||||||
@@ -36,7 +36,7 @@ export const useNavStateStore = defineStore("navState", () => {
|
|||||||
isNavExpanded.value = true;
|
isNavExpanded.value = true;
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -91,7 +91,7 @@ export const useNavStateStore = defineStore("navState", () => {
|
|||||||
if (!isAbove) {
|
if (!isAbove) {
|
||||||
isNavExpanded.value = false;
|
isNavExpanded.value = false;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user