只需要修改default页面 导入文件 import { Link } from 'react-router-dom' import menus from './../utils/menu' 删除 import BreadcrumbNameMap from './../utils/BreadcrumbNameMap' 添加itemRender函数 itemRender(route, params, routes, paths) { const last = routes.indexOf(route) === routes.length - 1; // console.log('paths', paths) return last ? ( <span>{ route.breadcrumbName}</span> ) : ( <Link to={ route.path}>{ route.breadcrumbName}</Link> ); } 在render中删除 const { location } = this.props // console.log(location) const arr = location.pathname.split('/') // console.log(arr) ["", "pro", "list"] const paths = arr.filter( i => i) console.log(paths) // ['pro', 'list'] const extraItems = paths.map((_, index) => { const url = "/"