|
@@ -9,7 +9,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-aside
|
|
<el-aside
|
|
|
:width="!isCollapse ? '250px' : '100px'"
|
|
:width="!isCollapse ? '250px' : '100px'"
|
|
|
- :class="['asideBox', isTechBlueTheme ? 'asideBox--tech' : 'asideBox--legacy']"
|
|
|
|
|
|
|
+ :class="[
|
|
|
|
|
+ 'asideBox',
|
|
|
|
|
+ isTechBlueTheme ? 'asideBox--tech' : 'asideBox--legacy',
|
|
|
|
|
+ ]"
|
|
|
>
|
|
>
|
|
|
<div class="homeBox"></div>
|
|
<div class="homeBox"></div>
|
|
|
<el-menu
|
|
<el-menu
|
|
@@ -190,10 +193,7 @@ export default {
|
|
|
if (direct) return direct;
|
|
if (direct) return direct;
|
|
|
if (
|
|
if (
|
|
|
this.staleMenuFallbackIndex &&
|
|
this.staleMenuFallbackIndex &&
|
|
|
- this.routeMatchesMenuIndex(
|
|
|
|
|
- this.$route,
|
|
|
|
|
- this.staleMenuFallbackIndex,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ this.routeMatchesMenuIndex(this.$route, this.staleMenuFallbackIndex)
|
|
|
) {
|
|
) {
|
|
|
return this.staleMenuFallbackIndex;
|
|
return this.staleMenuFallbackIndex;
|
|
|
}
|
|
}
|
|
@@ -211,10 +211,7 @@ export default {
|
|
|
if (d) {
|
|
if (d) {
|
|
|
this.staleMenuFallbackIndex = d;
|
|
this.staleMenuFallbackIndex = d;
|
|
|
} else if (
|
|
} else if (
|
|
|
- !this.routeMatchesMenuIndex(
|
|
|
|
|
- this.$route,
|
|
|
|
|
- this.staleMenuFallbackIndex,
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ !this.routeMatchesMenuIndex(this.$route, this.staleMenuFallbackIndex)
|
|
|
) {
|
|
) {
|
|
|
this.staleMenuFallbackIndex = "";
|
|
this.staleMenuFallbackIndex = "";
|
|
|
}
|
|
}
|
|
@@ -308,9 +305,7 @@ export default {
|
|
|
for (const item of this.routerList) {
|
|
for (const item of this.routerList) {
|
|
|
if (item.meta?.hidden !== false) continue;
|
|
if (item.meta?.hidden !== false) continue;
|
|
|
const isSubmenuParent =
|
|
const isSubmenuParent =
|
|
|
- item.children &&
|
|
|
|
|
- item.children.length &&
|
|
|
|
|
- item.meta?.hidden === false;
|
|
|
|
|
|
|
+ item.children && item.children.length && item.meta?.hidden === false;
|
|
|
if (isSubmenuParent) {
|
|
if (isSubmenuParent) {
|
|
|
for (const child of item.children) {
|
|
for (const child of item.children) {
|
|
|
if (child.meta?.hidden === false) {
|
|
if (child.meta?.hidden === false) {
|
|
@@ -336,8 +331,7 @@ export default {
|
|
|
|
|
|
|
|
if (pathMatches.length === 1) {
|
|
if (pathMatches.length === 1) {
|
|
|
chosen =
|
|
chosen =
|
|
|
- qid !== undefined &&
|
|
|
|
|
- String(pathMatches[0].id) !== qid
|
|
|
|
|
|
|
+ qid !== undefined && String(pathMatches[0].id) !== qid
|
|
|
? null
|
|
? null
|
|
|
: pathMatches[0];
|
|
: pathMatches[0];
|
|
|
} else if (pathMatches.length > 1) {
|
|
} else if (pathMatches.length > 1) {
|
|
@@ -384,9 +378,7 @@ export default {
|
|
|
|
|
|
|
|
if (!items[idx]) {
|
|
if (!items[idx]) {
|
|
|
if (retriesLeft > 0) {
|
|
if (retriesLeft > 0) {
|
|
|
- this.$nextTick(() =>
|
|
|
|
|
- this.syncElMenuHighlight(retriesLeft - 1),
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ this.$nextTick(() => this.syncElMenuHighlight(retriesLeft - 1));
|
|
|
} else if (
|
|
} else if (
|
|
|
current &&
|
|
current &&
|
|
|
items[current] &&
|
|
items[current] &&
|