From f6a585337c0c727403b30067c340ac34ea656808 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 3 Jan 2024 12:01:46 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E5=A4=8Deslint=20warning=20'?= =?UTF-8?q?route'=20is=20already=20declared=20in=20the=20upper=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 3fd5593..84e27e5 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -31,7 +31,6 @@ import { RouteRecordRaw } from 'vue-router'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const route = useRoute(); const appStore = useAppStore(); const settingsStore = useSettingsStore(); const permissionStore = usePermissionStore(); @@ -42,7 +41,7 @@ const theme = computed(() => settingsStore.theme); const isCollapse = computed(() => !appStore.sidebar.opened); const activeMenu = computed(() => { - const { meta, path } = route; + const { meta, path } = useRoute(); // if set path, the sidebar will highlight the path you set if (meta.activeMenu) { return meta.activeMenu;