style: 修复eslint warning 'route' is already declared in the upper scope

This commit is contained in:
dhb52 2024-01-03 12:01:46 +08:00
parent 14f6a214f2
commit f6a585337c

View File

@ -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;