⬆️ upgrade dependencies

This commit is contained in:
landaiqing
2024-09-27 01:34:25 +08:00
parent 172bf00d93
commit d6741aaa6f
13 changed files with 1043 additions and 504 deletions

5
auto-import.d.ts vendored
View File

@@ -3,6 +3,7 @@
// @ts-nocheck // @ts-nocheck
// noinspection JSUnusedGlobalSymbols // noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
// biome-ignore lint: disable
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
@@ -74,6 +75,7 @@ declare global {
const onStartTyping: typeof import('@vueuse/core')['onStartTyping'] const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
const onUnmounted: typeof import('vue')['onUnmounted'] const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated'] const onUpdated: typeof import('vue')['onUpdated']
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
const provide: typeof import('vue')['provide'] const provide: typeof import('vue')['provide']
const provideLocal: typeof import('@vueuse/core')['provideLocal'] const provideLocal: typeof import('@vueuse/core')['provideLocal']
@@ -185,6 +187,7 @@ declare global {
const useFullscreen: typeof import('@vueuse/core')['useFullscreen'] const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
const useGamepad: typeof import('@vueuse/core')['useGamepad'] const useGamepad: typeof import('@vueuse/core')['useGamepad']
const useGeolocation: typeof import('@vueuse/core')['useGeolocation'] const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
const useId: typeof import('vue')['useId']
const useIdle: typeof import('@vueuse/core')['useIdle'] const useIdle: typeof import('@vueuse/core')['useIdle']
const useImage: typeof import('@vueuse/core')['useImage'] const useImage: typeof import('@vueuse/core')['useImage']
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll'] const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
@@ -201,6 +204,7 @@ declare global {
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery'] const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
const useMemoize: typeof import('@vueuse/core')['useMemoize'] const useMemoize: typeof import('@vueuse/core')['useMemoize']
const useMemory: typeof import('@vueuse/core')['useMemory'] const useMemory: typeof import('@vueuse/core')['useMemory']
const useModel: typeof import('vue')['useModel']
const useMounted: typeof import('@vueuse/core')['useMounted'] const useMounted: typeof import('@vueuse/core')['useMounted']
const useMouse: typeof import('@vueuse/core')['useMouse'] const useMouse: typeof import('@vueuse/core')['useMouse']
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement'] const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
@@ -248,6 +252,7 @@ declare global {
const useStyleTag: typeof import('@vueuse/core')['useStyleTag'] const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
const useSupported: typeof import('@vueuse/core')['useSupported'] const useSupported: typeof import('@vueuse/core')['useSupported']
const useSwipe: typeof import('@vueuse/core')['useSwipe'] const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRef: typeof import('vue')['useTemplateRef']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList'] const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useTextDirection: typeof import('@vueuse/core')['useTextDirection'] const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
const useTextSelection: typeof import('@vueuse/core')['useTextSelection'] const useTextSelection: typeof import('@vueuse/core')['useTextSelection']

View File

@@ -9,49 +9,48 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@alova/adapter-axios": "^2.0.6", "@alova/adapter-axios": "^2.0.7",
"@ant-design/icons-vue": "^7.0.1", "@ant-design/icons-vue": "^7.0.1",
"@types/animejs": "^3.1.12", "@types/animejs": "^3.1.12",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/json-stringify-safe": "^5.0.3", "@types/json-stringify-safe": "^5.0.3",
"@types/node": "^22.5.2", "@types/node": "^22.7.2",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@vueuse/core": "^11.0.3", "@vueuse/core": "^11.1.0",
"alova": "^3.0.14", "alova": "^3.0.16",
"animejs": "^3.2.2", "animejs": "^3.2.2",
"ant-design-vue": "^4.2.3", "ant-design-vue": "^4.2.5",
"axios": "^1.7.7", "axios": "^1.7.7",
"browser-image-compression": "^2.0.2", "browser-image-compression": "^2.0.2",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"eslint": "9.9.1", "eslint": "9.11.1",
"go-captcha-vue": "^2", "go-captcha-vue": "^2",
"json-stringify-safe": "^5.0.1", "json-stringify-safe": "^5.0.1",
"less": "^4.2.0", "less": "^4.2.0",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^2.2.2", "pinia": "^2.2.2",
"pinia-plugin-persistedstate": "^3.2.3", "pinia-plugin-persistedstate": "^4.0.2",
"unplugin-auto-import": "^0.18.2", "unplugin-auto-import": "^0.18.3",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.2", "vite-plugin-html": "^3.2.2",
"vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.4.38", "vue": "^3.5.9",
"vue-i18n": "^9.14.0", "vue-i18n": "^9.14.1",
"vue-router": "^4.4.3", "vue-router": "^4.4.5",
"ws": "^8.18.0", "ws": "^8.18.0",
"zipson": "^0.2.12" "zipson": "^0.2.12"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.9.1", "@eslint/js": "^9.11.1",
"@intlify/unplugin-vue-i18n": "^4.0.0", "@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue": "^5.1.3", "eslint-plugin-vue": "^9.28.0",
"eslint-plugin-vue": "^9.27.0",
"globals": "^15.9.0", "globals": "^15.9.0",
"sass": "^1.77.8", "sass": "^1.79.3",
"typescript": "^5.2.2", "typescript": "^5.6.2",
"typescript-eslint": "^8.3.0", "typescript-eslint": "^8.7.0",
"unplugin-vue-components": "^0.27.4", "unplugin-vue-components": "^0.27.4",
"vite": "^5.4.2", "vite": "^5.4.8",
"vue-tsc": "^2.1.4" "vue-tsc": "^2.1.6"
} }
} }

View File

@@ -65,17 +65,18 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import router from "@/router/router.ts";
import useStore from "@/store/index.ts"; import useStore from "@/store/index.ts";
import {ref} from "vue"; import {ref} from "vue";
import {DownOutlined} from '@ant-design/icons-vue'; import {DownOutlined} from '@ant-design/icons-vue';
import {useI18n} from "vue-i18n"; import {useI18n} from "vue-i18n";
import variables from "@/assets/styles/colors.module.scss"; import variables from "@/assets/styles/colors.module.scss";
import {useRouter} from "vue-router";
const lang = useStore().lang;
const {t, locale} = useI18n(); const {t, locale} = useI18n();
const router = useRouter();
const lang = useStore().lang;
async function changeLang(language: any) { async function changeLang(language: any) {
lang.lang = language; lang.lang = language;
locale.value = language; locale.value = language;
@@ -97,14 +98,11 @@ const toggleTheme = (event: any) => {
); );
// 兼容性处理 // 兼容性处理
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-expect-error
if (!document.startViewTransition) { if (!document.startViewTransition) {
app.toggleDarkMode(); app.toggleDarkMode();
return; return;
} }
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-expect-error
const transition = document.startViewTransition(async () => { const transition = document.startViewTransition(async () => {
app.toggleDarkMode(); app.toggleDarkMode();
}); });

View File

@@ -1,9 +1,8 @@
// wechat.ts // index.ts
import {createI18n} from 'vue-i18n'; import {createI18n} from 'vue-i18n';
import zh from './language/zh.ts'; import zh from './language/zh.ts';
import en from './language/en.ts'; import en from './language/en.ts';
const messages = { const messages = {
en, en,
zh zh

View File

@@ -29,7 +29,7 @@ router.beforeEach((to, _from, next) => {
start(); start();
const user = useStore().user; const user = useStore().user;
const token: string | undefined = user.user.refreshToken; const token: string | undefined = user.user.refreshToken;
const userId: string | undefined = user.user.userId; const userId: string | undefined = user.user.uid;
// 检查用户是否已登录 // 检查用户是否已登录
const isLoggedIn: boolean = token !== "" && userId !== ""; const isLoggedIn: boolean = token !== "" && userId !== "";

View File

@@ -69,7 +69,7 @@ export const useClientStore = defineStore(
persist: { persist: {
key: 'clientId', key: 'clientId',
storage: expiredStorage, storage: expiredStorage,
paths: ["clientId"], pick: ["clientId"],
} }
} }
); );

View File

@@ -14,7 +14,7 @@ export const langStore = defineStore(
persist: { persist: {
key: 'lang', key: 'lang',
storage: localStorage, storage: localStorage,
paths: ["lang"], pick: ["lang"],
} }
} }
); );

View File

@@ -40,7 +40,7 @@ export const useThemeStore = defineStore(
persist: { persist: {
key: 'theme', key: 'theme',
storage: localStorage, storage: localStorage,
paths: ["themeName", "darkMode"], pick: ["themeName", "darkMode"],
} }
} }
); );

View File

@@ -21,7 +21,7 @@ export const useAuthStore = defineStore(
persist: { persist: {
key: 'user', key: 'user',
storage: localStorage, storage: localStorage,
paths: ['user'], pick: ['user'],
} }
} }
); );

View File

@@ -42,4 +42,6 @@ export const useWebSocketStore = defineStore('websocket', () => {
onEvent, onEvent,
close, close,
}; };
}, {
persist: false,
}); });

View File

@@ -27,8 +27,7 @@
"noImplicitAny": false, "noImplicitAny": false,
"baseUrl": "./", "baseUrl": "./",
"types": [ "types": [
"node", "node"
"@intlify/unplugin-vue-i18n/messages"
], ],
"paths": { "paths": {
"@": [ "@": [

View File

@@ -7,9 +7,6 @@ import {nodePolyfills} from "vite-plugin-node-polyfills";
import Components from 'unplugin-vue-components/vite'; import Components from 'unplugin-vue-components/vite';
import {AntDesignVueResolver} from 'unplugin-vue-components/resolvers'; import {AntDesignVueResolver} from 'unplugin-vue-components/resolvers';
import AutoImport from 'unplugin-auto-import/vite'; import AutoImport from 'unplugin-auto-import/vite';
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
import {dirname, resolve} from 'node:path';
import {fileURLToPath} from 'node:url';
export default defineConfig(({mode}: { mode: string }): object => { export default defineConfig(({mode}: { mode: string }): object => {
const env: Record<string, string> = loadEnv(mode, process.cwd()); const env: Record<string, string> = loadEnv(mode, process.cwd());
@@ -22,11 +19,6 @@ export default defineConfig(({mode}: { mode: string }): object => {
} }
}, },
plugins: [vue(), plugins: [vue(),
VueI18nPlugin({
/* options */
// locale messages resource pre-compile option
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/language/**'),
}),
Components({ Components({
dts: true, dts: true,
dirs: ['src/components', 'src/views'], dirs: ['src/components', 'src/views'],
@@ -84,6 +76,7 @@ export default defineConfig(({mode}: { mode: string }): object => {
css: { css: {
preprocessorOptions: { preprocessorOptions: {
scss: { scss: {
api: "modern-compiler",
javascriptEnabled: true, javascriptEnabled: true,
}, },
less: { less: {

1462
yarn.lock

File diff suppressed because it is too large Load Diff