refactor(projects): new storage system [新的本地数据存储系统]

This commit is contained in:
Soybean
2022-11-17 01:47:06 +08:00
parent 7a58035514
commit 971915948b
23 changed files with 166 additions and 191 deletions

View File

@ -16,9 +16,8 @@
</template>
<script setup lang="ts">
import { EnumStorageKey } from '@/enum';
import { useAppInfo } from '@/composables';
import { getLocal } from '@/utils';
import { localStg } from '@/utils';
const { title } = useAppInfo();
@ -31,7 +30,7 @@ const lodingClasses = [
function addThemeColorCssVars() {
const defaultColor = '#1890ff';
const themeColor = getLocal(EnumStorageKey['theme-color']) || defaultColor;
const themeColor = localStg.get('themeColor') || defaultColor;
const cssVars = `--primary-color: ${themeColor}`;
document.documentElement.style.cssText = cssVars;
}