fix: display problem of menu item's title in collapsed state; 🐛

修复:折叠状态下菜单项标题的显示问题;
master
chenghongxing 4 years ago
parent f0e9a50919
commit 556b5bf6fc
  1. 8
      src/components/menu/menu.js

@ -134,10 +134,10 @@ export default {
return h( return h(
Item, {key: menu.fullPath}, Item, {key: menu.fullPath},
[ [
h('router-link', {props: {to: menu.fullPath}}, h('router-link', {props: {to: menu.fullPath}, attrs: {style: 'overflow:hidden;white-space:normal;text-overflow:clip;'}},
[ [
this.renderIcon(h, menu.meta ? menu.meta.icon : 'none', menu.fullPath), this.renderIcon(h, menu.meta ? menu.meta.icon : 'none', menu.fullPath),
h('span', [this.$t(getI18nKey(menu.fullPath))]) this.$t(getI18nKey(menu.fullPath))
] ]
) )
] ]
@ -145,10 +145,10 @@ export default {
}, },
renderSubMenu: function (h, menu) { renderSubMenu: function (h, menu) {
let this_ = this let this_ = this
let subItem = [h('span', {slot: 'title'}, let subItem = [h('span', {slot: 'title', attrs: {style: 'overflow:hidden;white-space:normal;text-overflow:clip;'}},
[ [
this.renderIcon(h, menu.meta ? menu.meta.icon : 'none', menu.fullPath), this.renderIcon(h, menu.meta ? menu.meta.icon : 'none', menu.fullPath),
h('span', [this.$t(getI18nKey(menu.fullPath))]) this.$t(getI18nKey(menu.fullPath))
] ]
)] )]
let itemArr = [] let itemArr = []

Loading…
Cancel
Save