fix 左侧菜单底部空白项

This commit is contained in:
Amjacks 2025-04-03 14:09:06 +08:00
parent 42994f6eca
commit 86cc8122ce
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
<div> <div>
<template v-if="!item.children || (item.children && item.children.length === 0)"> <template v-if="!item.children || (item.children && item.children.length === 0)">
<el-menu-item <el-menu-item
v-if="!item.root"
@click="goRoute(item.path || item.routePath)" @click="goRoute(item.path || item.routePath)"
:index="item.path || item.routePath" :index="item.path || item.routePath"
> >

View File

@ -25,12 +25,12 @@ const constRoutes = [
/** /**
* home路由redirect使用 * home路由redirect使用
*/ */
const homeRoute = { path: '/', hidden: true, redirect: '' }; const homeRoute = { path: '/', root: true, redirect: '' };
/** /**
* 404 * 404
*/ */
const notFoundRoute = { path: '/:catchAll(.*)', redirect: '/404', hidden: true }; const notFoundRoute = { path: '/:catchAll(.*)', redirect: '/404', root: true };
/** /**
* 使require加载组件 * 使require加载组件