|
|
@ -4,7 +4,7 @@ |
|
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> |
|
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"> |
|
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }"> |
|
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }"> |
|
|
<svg-icon :icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"/> |
|
|
<svg-icon :icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"/> |
|
|
<template #title>{{ onlyOneChild.meta.title }}</template> |
|
|
<template #title><span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">{{ onlyOneChild.meta.title }}</span></template> |
|
|
</el-menu-item> |
|
|
</el-menu-item> |
|
|
</app-link> |
|
|
</app-link> |
|
|
</template> |
|
|
</template> |
|
|
@ -12,7 +12,7 @@ |
|
|
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> |
|
|
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> |
|
|
<template v-if="item.meta" #title> |
|
|
<template v-if="item.meta" #title> |
|
|
<svg-icon :icon-class="item.meta && item.meta.icon" /> |
|
|
<svg-icon :icon-class="item.meta && item.meta.icon" /> |
|
|
<span>{{ item.meta.title }}</span> |
|
|
<span class="menu-title" :title="hasTitle(item.meta.title)">{{ item.meta.title }}</span> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<sidebar-item |
|
|
<sidebar-item |
|
|
@ -91,4 +91,12 @@ function resolvePath(routePath, routeQuery) { |
|
|
} |
|
|
} |
|
|
return getNormalPath(props.basePath + '/' + routePath) |
|
|
return getNormalPath(props.basePath + '/' + routePath) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function hasTitle(title){ |
|
|
|
|
|
if (title.length > 5) { |
|
|
|
|
|
return title; |
|
|
|
|
|
} else { |
|
|
|
|
|
return ""; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|