⬆️ upgrade dependencies
This commit is contained in:
5
auto-import.d.ts
vendored
5
auto-import.d.ts
vendored
@@ -3,6 +3,7 @@
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
@@ -74,6 +75,7 @@ declare global {
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const provideLocal: typeof import('@vueuse/core')['provideLocal']
|
||||
@@ -185,6 +187,7 @@ declare global {
|
||||
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||
const useGamepad: typeof import('@vueuse/core')['useGamepad']
|
||||
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||
const useId: typeof import('vue')['useId']
|
||||
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||
const useImage: typeof import('@vueuse/core')['useImage']
|
||||
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
|
||||
@@ -201,6 +204,7 @@ declare global {
|
||||
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||
const useModel: typeof import('vue')['useModel']
|
||||
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||
@@ -248,6 +252,7 @@ declare global {
|
||||
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||
const useSupported: typeof import('@vueuse/core')['useSupported']
|
||||
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
|
||||
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||
|
39
package.json
39
package.json
@@ -9,49 +9,48 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alova/adapter-axios": "^2.0.6",
|
||||
"@alova/adapter-axios": "^2.0.7",
|
||||
"@ant-design/icons-vue": "^7.0.1",
|
||||
"@types/animejs": "^3.1.12",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/json-stringify-safe": "^5.0.3",
|
||||
"@types/node": "^22.5.2",
|
||||
"@types/node": "^22.7.2",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vueuse/core": "^11.0.3",
|
||||
"alova": "^3.0.14",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"alova": "^3.0.16",
|
||||
"animejs": "^3.2.2",
|
||||
"ant-design-vue": "^4.2.3",
|
||||
"ant-design-vue": "^4.2.5",
|
||||
"axios": "^1.7.7",
|
||||
"browser-image-compression": "^2.0.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"eslint": "9.9.1",
|
||||
"eslint": "9.11.1",
|
||||
"go-captcha-vue": "^2",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"less": "^4.2.0",
|
||||
"localforage": "^1.10.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.2.2",
|
||||
"pinia-plugin-persistedstate": "^3.2.3",
|
||||
"unplugin-auto-import": "^0.18.2",
|
||||
"pinia-plugin-persistedstate": "^4.0.2",
|
||||
"unplugin-auto-import": "^0.18.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-html": "^3.2.2",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vue": "^3.4.38",
|
||||
"vue-i18n": "^9.14.0",
|
||||
"vue-router": "^4.4.3",
|
||||
"vue": "^3.5.9",
|
||||
"vue-i18n": "^9.14.1",
|
||||
"vue-router": "^4.4.5",
|
||||
"ws": "^8.18.0",
|
||||
"zipson": "^0.2.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.9.1",
|
||||
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
||||
"@vitejs/plugin-vue": "^5.1.3",
|
||||
"eslint-plugin-vue": "^9.27.0",
|
||||
"@eslint/js": "^9.11.1",
|
||||
"@vitejs/plugin-vue": "^5.1.4",
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"globals": "^15.9.0",
|
||||
"sass": "^1.77.8",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript-eslint": "^8.3.0",
|
||||
"sass": "^1.79.3",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.7.0",
|
||||
"unplugin-vue-components": "^0.27.4",
|
||||
"vite": "^5.4.2",
|
||||
"vue-tsc": "^2.1.4"
|
||||
"vite": "^5.4.8",
|
||||
"vue-tsc": "^2.1.6"
|
||||
}
|
||||
}
|
||||
|
@@ -65,17 +65,18 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import router from "@/router/router.ts";
|
||||
|
||||
import useStore from "@/store/index.ts";
|
||||
import {ref} from "vue";
|
||||
import {DownOutlined} from '@ant-design/icons-vue';
|
||||
import {useI18n} from "vue-i18n";
|
||||
import variables from "@/assets/styles/colors.module.scss";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
|
||||
const lang = useStore().lang;
|
||||
const {t, locale} = useI18n();
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
const lang = useStore().lang;
|
||||
async function changeLang(language: any) {
|
||||
lang.lang = 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) {
|
||||
app.toggleDarkMode();
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-expect-error
|
||||
|
||||
const transition = document.startViewTransition(async () => {
|
||||
app.toggleDarkMode();
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
// wechat.ts
|
||||
// index.ts
|
||||
import {createI18n} from 'vue-i18n';
|
||||
import zh from './language/zh.ts';
|
||||
import en from './language/en.ts';
|
||||
|
||||
|
||||
const messages = {
|
||||
en,
|
||||
zh
|
||||
|
@@ -29,7 +29,7 @@ router.beforeEach((to, _from, next) => {
|
||||
start();
|
||||
const user = useStore().user;
|
||||
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 !== "";
|
||||
|
@@ -69,7 +69,7 @@ export const useClientStore = defineStore(
|
||||
persist: {
|
||||
key: 'clientId',
|
||||
storage: expiredStorage,
|
||||
paths: ["clientId"],
|
||||
pick: ["clientId"],
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -14,7 +14,7 @@ export const langStore = defineStore(
|
||||
persist: {
|
||||
key: 'lang',
|
||||
storage: localStorage,
|
||||
paths: ["lang"],
|
||||
pick: ["lang"],
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -40,7 +40,7 @@ export const useThemeStore = defineStore(
|
||||
persist: {
|
||||
key: 'theme',
|
||||
storage: localStorage,
|
||||
paths: ["themeName", "darkMode"],
|
||||
pick: ["themeName", "darkMode"],
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -21,7 +21,7 @@ export const useAuthStore = defineStore(
|
||||
persist: {
|
||||
key: 'user',
|
||||
storage: localStorage,
|
||||
paths: ['user'],
|
||||
pick: ['user'],
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -42,4 +42,6 @@ export const useWebSocketStore = defineStore('websocket', () => {
|
||||
onEvent,
|
||||
close,
|
||||
};
|
||||
}, {
|
||||
persist: false,
|
||||
});
|
||||
|
@@ -27,8 +27,7 @@
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": "./",
|
||||
"types": [
|
||||
"node",
|
||||
"@intlify/unplugin-vue-i18n/messages"
|
||||
"node"
|
||||
],
|
||||
"paths": {
|
||||
"@": [
|
||||
|
@@ -7,9 +7,6 @@ import {nodePolyfills} from "vite-plugin-node-polyfills";
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import {AntDesignVueResolver} from 'unplugin-vue-components/resolvers';
|
||||
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 => {
|
||||
const env: Record<string, string> = loadEnv(mode, process.cwd());
|
||||
@@ -22,11 +19,6 @@ export default defineConfig(({mode}: { mode: string }): object => {
|
||||
}
|
||||
},
|
||||
plugins: [vue(),
|
||||
VueI18nPlugin({
|
||||
/* options */
|
||||
// locale messages resource pre-compile option
|
||||
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/language/**'),
|
||||
}),
|
||||
Components({
|
||||
dts: true,
|
||||
dirs: ['src/components', 'src/views'],
|
||||
@@ -84,6 +76,7 @@ export default defineConfig(({mode}: { mode: string }): object => {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: "modern-compiler",
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
less: {
|
||||
|
Reference in New Issue
Block a user