mirror of
https://gitee.com/yiming_chang/vue-pure-admin.git
synced 2024-12-04 20:28:40 +08:00
fix: mixNav route
This commit is contained in:
parent
08983fdbc1
commit
6fb0f7ef4d
@ -21,7 +21,6 @@ const routers = useRouter().options.routes;
|
|||||||
const menuRef = templateRef<ElRef | null>("menu", null);
|
const menuRef = templateRef<ElRef | null>("menu", null);
|
||||||
const instance =
|
const instance =
|
||||||
getCurrentInstance().appContext.config.globalProperties.$storage;
|
getCurrentInstance().appContext.config.globalProperties.$storage;
|
||||||
const wholeMenus = usePermissionStoreHook().wholeMenus;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
logout,
|
logout,
|
||||||
@ -39,6 +38,7 @@ const {
|
|||||||
let defaultActive = ref(null);
|
let defaultActive = ref(null);
|
||||||
|
|
||||||
function getDefaultActive(routePath) {
|
function getDefaultActive(routePath) {
|
||||||
|
const wholeMenus = usePermissionStoreHook().wholeMenus;
|
||||||
// 当前路由的父级路径
|
// 当前路由的父级路径
|
||||||
const parentRoutes = getParentPaths(routePath, wholeMenus)[0];
|
const parentRoutes = getParentPaths(routePath, wholeMenus)[0];
|
||||||
defaultActive.value = findRouteByPath(
|
defaultActive.value = findRouteByPath(
|
||||||
@ -113,7 +113,7 @@ function translationEn() {
|
|||||||
@select="indexPath => menuSelect(indexPath, routers)"
|
@select="indexPath => menuSelect(indexPath, routers)"
|
||||||
>
|
>
|
||||||
<el-menu-item
|
<el-menu-item
|
||||||
v-for="route in wholeMenus"
|
v-for="route in usePermissionStoreHook().wholeMenus"
|
||||||
:key="route.path"
|
:key="route.path"
|
||||||
:index="resolvePath(route) || route.redirect"
|
:index="resolvePath(route) || route.redirect"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user