旧版本 ue-element-admin 有这个问题,最新版本的 ue-element-admin 已经修复了
错误消息:
解决方法:
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
//加入判断,避免在这个地方死循环
if (this.tempChild != parent) {
this.onlyOneChild = {
...parent,
path: '',
noShowingChildren: true
}
this.tempChild = parent
return true
}
}
参考博文:https://www.jb51.net/article/161173.htm
方法2:
参考 https://github.com/PanJiaChen/vue-element-admin
data() {
//2021-08-26 移动参数位置,避免死循环,只需要改这里就好啦,不用改其他地方
this.onlyOneChild = null
return {
}
},