优化代码

This commit is contained in:
RuoYi
2025-04-22 12:03:31 +08:00
parent a9f9133e31
commit 8f4eb24bf2
4 changed files with 4 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
@input="querySearch"
prefix-icon="Search"
placeholder="菜单搜索支持标题、URL模糊查询"
clearable
>
</el-input>
<el-scrollbar wrap-class="right-scrollbar-wrapper">

View File

@@ -57,7 +57,7 @@ export default {
this.routers.map((menu) => {
if (menu.hidden !== true) {
// 兼容顶部栏一级菜单内部跳转
if (menu.path === "/") {
if (menu.path === '/' && menu.children) {
topMenus.push(menu.children[0]);
} else {
topMenus.push(menu);