diff --git a/package.json b/package.json index b4ae570..68538ea 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@faker-js/faker": "^8.3.1", "@iconify/iconify": "^3.1.1", "@iconify/vue": "^4.1.1", - "@vueuse/core": "^10.7.1", + "@vueuse/core": "^10.7.2", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.4", @@ -40,7 +40,7 @@ "driver.js": "^1.3.1", "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", - "element-plus": "^2.4.4", + "element-plus": "^2.5.1", "lodash-es": "^4.17.21", "mitt": "^3.0.1", "nprogress": "^0.2.0", @@ -49,8 +49,8 @@ "qrcode": "^1.5.3", "qs": "^6.11.2", "url": "^0.11.3", - "vue": "3.4.6", - "vue-draggable-plus": "^0.3.4", + "vue": "3.4.14", + "vue-draggable-plus": "^0.3.5", "vue-i18n": "9.9.0", "vue-json-pretty": "^2.3.0", "vue-router": "^4.2.5", @@ -60,21 +60,21 @@ "devDependencies": { "@commitlint/cli": "^18.4.4", "@commitlint/config-conventional": "^18.4.4", - "@iconify/json": "^2.2.166", + "@iconify/json": "^2.2.169", "@intlify/unplugin-vue-i18n": "^2.0.0", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.7", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.10.7", + "@types/node": "^20.11.3", "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.11", "@types/sortablejs": "^1.15.7", - "@typescript-eslint/eslint-plugin": "^6.18.1", - "@typescript-eslint/parser": "^6.18.1", + "@typescript-eslint/eslint-plugin": "^6.19.0", + "@typescript-eslint/parser": "^6.19.0", "@unocss/transformer-variant-group": "^0.58.3", "@vitejs/plugin-legacy": "^5.2.0", - "@vitejs/plugin-vue": "^5.0.2", + "@vitejs/plugin-vue": "^5.0.3", "@vitejs/plugin-vue-jsx": "^3.1.0", "autoprefixer": "^10.4.16", "chalk": "^5.3.0", @@ -82,8 +82,8 @@ "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^2.1.0", - "eslint-plugin-prettier": "^5.1.2", - "eslint-plugin-vue": "^9.19.2", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-vue": "^9.20.1", "esno": "^4.0.0", "fs-extra": "^11.2.0", "husky": "^8.0.3", @@ -92,11 +92,11 @@ "lint-staged": "^15.2.0", "plop": "^4.0.1", "postcss": "^8.4.33", - "postcss-html": "^1.5.0", + "postcss-html": "^1.6.0", "postcss-less": "^6.0.0", - "prettier": "^3.1.1", + "prettier": "^3.2.2", "rimraf": "^5.0.5", - "rollup": "^4.9.4", + "rollup": "^4.9.5", "rollup-plugin-visualizer": "^5.12.0", "stylelint": "^16.1.0", "stylelint-config-html": "^1.1.0", @@ -109,7 +109,7 @@ "vite": "5.0.11", "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", - "vite-plugin-mock": "^2.9.6", + "vite-plugin-mock": "2.9.6", "vite-plugin-progress": "^0.0.7", "vite-plugin-purge-icons": "^0.10.0", "vite-plugin-style-import": "2.0.0", diff --git a/src/App.vue b/src/App.vue index c097654..ca26ae2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,9 +2,7 @@ import { computed } from 'vue' import { useAppStore } from '@/store/modules/app' import { ConfigGlobal } from '@/components/ConfigGlobal' -import { isDark } from '@/utils/is' import { useDesign } from '@/hooks/web/useDesign' -import { useStorage } from '@/hooks/web/useStorage' const { getPrefixCls } = useDesign() @@ -16,19 +14,7 @@ const currentSize = computed(() => appStore.getCurrentSize) const greyMode = computed(() => appStore.getGreyMode) -const { getStorage } = useStorage() - -// 根据浏览器当前主题设置系统主题色 -const setDefaultTheme = () => { - if (getStorage('isDark') !== null) { - appStore.setIsDark(getStorage('isDark')) - return - } - const isDarkTheme = isDark() - appStore.setIsDark(isDarkTheme) -} - -setDefaultTheme() +appStore.initTheme()