refactor(projects): 生产环境缓存主题变更为sessionStorage

This commit is contained in:
Soybean
2023-07-05 01:41:57 +08:00
parent 43ac23f113
commit c46a5920e5
5 changed files with 14 additions and 15 deletions

View File

@ -17,7 +17,7 @@
<script setup lang="ts">
import { useAppInfo } from '@/composables';
import { localStg, getRgbOfColor } from '@/utils';
import { sessionStg, getRgbOfColor } from '@/utils';
import themeSettings from '@/settings/theme.json';
const { title } = useAppInfo();
@ -31,7 +31,7 @@ const lodingClasses = [
function addThemeColorCssVars() {
const defaultColor = themeSettings.themeColor;
const themeColor = localStg.get('themeColor') || defaultColor;
const themeColor = sessionStg.get('themeColor') || defaultColor;
const { r, g, b } = getRgbOfColor(themeColor);