From fd30f84af5617ff7468d7b81060b49275808dbc5 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Sun, 18 Feb 2024 19:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B5=8C=E5=A5=97=20route=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/package.json.md5 | 2 +- frontend/src/App.vue | 6 +++++- frontend/src/router/index.ts | 1 + frontend/tsconfig.json | 5 ++++- frontend/yarn.lock | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index e01074b..702afb9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,7 +16,7 @@ "pinia": "^2.0.21", "vue": "^3.2.38", "vue-i18n": "^9.2.2", - "vue-router": "^4.1.5" + "vue-router": "^4.2.5" }, "devDependencies": { "@types/node": "^16.11.56", diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 19e1d45..5a3b1b8 100644 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -7dc8355d48f99175c4067c253750bda0 \ No newline at end of file +15a19573e5ac860a508a6ee2598ed3e8 \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 02f775a..6f2cf17 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -6,6 +6,10 @@ import {useGlobalConfig} from "@/stores/globalConfig"; import {watch,onBeforeUnmount } from "vue"; import {useMagicKeys, whenever} from "@vueuse/core"; import {destroyDebugger, switchDebugger} from "@/utils/debugger/eruda"; +import {useRoute} from "vue-router"; + +let routeLocationNormalizedLoaded = useRoute(); +console.log(routeLocationNormalizedLoaded) const {t, availableLocales: languages, locale} = useI18n(); let globalConfig = useGlobalConfig(); @@ -82,7 +86,7 @@ document.body.addEventListener("click", function (event) { - +