|
@@ -66,8 +66,9 @@ export default {
|
|
|
return h(Icon, { props: { ...props } })
|
|
|
},
|
|
|
renderMenuItem: function (h, menu, pIndex, index) {
|
|
|
+ const target = menu.meta.target || null
|
|
|
return h(Item, { key: menu.path ? menu.path : 'item_' + pIndex + '_' + index }, [
|
|
|
- h('router-link', { attrs: { to: { name: menu.name } } }, [
|
|
|
+ h('router-link', { attrs: { to: { name: menu.name }, target: target } }, [
|
|
|
this.renderIcon(h, menu.meta.icon),
|
|
|
h('span', [menu.meta.title])
|
|
|
])
|
|
@@ -78,7 +79,8 @@ export default {
|
|
|
const subItem = [h('span', { slot: 'title' }, [this.renderIcon(h, menu.meta.icon), h('span', [menu.meta.title])])]
|
|
|
const itemArr = []
|
|
|
const pIndex_ = pIndex + '_' + index
|
|
|
- if (!menu.alwaysShow) {
|
|
|
+ console.log('menu', menu)
|
|
|
+ if (!menu.hideChildrenInMenu) {
|
|
|
menu.children.forEach(function (item, i) {
|
|
|
itemArr.push(this2_.renderItem(h, item, pIndex_, i))
|
|
|
})
|
|
@@ -87,7 +89,7 @@ export default {
|
|
|
},
|
|
|
renderItem: function (h, menu, pIndex, index) {
|
|
|
if (!menu.hidden) {
|
|
|
- return menu.children && !menu.alwaysShow
|
|
|
+ return menu.children && !menu.hideChildrenInMenu
|
|
|
? this.renderSubMenu(h, menu, pIndex, index)
|
|
|
: this.renderMenuItem(h, menu, pIndex, index)
|
|
|
}
|