|
@@ -73,9 +73,10 @@ export default {
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // Show parent if there are no child router to display
|
|
|
|
|
|
|
+ // 扁平路由(完整 path 如 /crm/line)无 children 时须保留 parent.path,
|
|
|
|
|
+ // 否则 el-menu-item index 全为空字符串,点击一项会全部高亮
|
|
|
if (showingChildren.length === 0) {
|
|
if (showingChildren.length === 0) {
|
|
|
- this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
|
|
|
|
|
|
+ this.onlyOneChild = { ...parent, path: parent.path || '', noShowingChildren: true }
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
|
|
|