From 9c3fbdd71b9045f2b398635c6e0bd558090bb1a7 Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Thu, 14 Sep 2023 15:09:11 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20fix=E9=A1=B6=E9=83=A8=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=AB=98=E4=BA=AE=20(#601)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 9c843c2..5076429 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,8 +1,6 @@ import uniq from 'lodash/uniq'; import { createRouter, createWebHistory, RouteRecordRaw, useRoute } from 'vue-router'; -import { useSettingStore } from '@/store'; - const env = import.meta.env.MODE || 'development'; // 导入homepage相关固定路由 @@ -62,16 +60,11 @@ export const getRoutesExpanded = () => { export const getActive = (maxLevel = 3): string => { const route = useRoute(); - const settingStore = useSettingStore(); if (!route.path) { return ''; } - if (settingStore.layout === 'top') { - return route.path.split('/').slice(0, 2).join('/'); - } - return route.path .split('/') .filter((_item: string, index: number) => index <= maxLevel && index > 0)