From 05e8bceb4823a3fab30dfdc65f207dc58de61217 Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Thu, 4 Nov 2021 16:18:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20menu=20=E9=BB=98=E8=AE=A4=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index bc1a346..cff75ab 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,6 +12,7 @@ const store = useStore(); let timer = null; const routeList = ref(routes); const menu = computed(() => store.state.menu); +const activeMenuIndex = ref(0); // 验证 获取query中u参数 获取token const route = useRoute(); @@ -20,6 +21,7 @@ const router = useRouter(); useRouter() .isReady() .then(async () => { + activeMenuIndex.value = routes.findIndex(item => item.name === route.name); const u = computed(() => route.query.u); if (!u.value) { // 获取url中的u参数, 没有提示缺少参数 @@ -68,7 +70,7 @@ function openPage(path) { - +