优化菜单名称过长悬停显示标题
This commit is contained in:
parent
22ba88a92c
commit
c9ee8d8cc3
@ -17,11 +17,19 @@ export default {
|
||||
const vnodes = []
|
||||
|
||||
if (icon) {
|
||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
||||
vnodes.push(<svg-icon icon-class={icon} />)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
vnodes.push(<span slot='title'>{(title)}</span>)
|
||||
if (title.length > 5) {
|
||||
vnodes.push(
|
||||
<span slot='title' title={title}>
|
||||
{title}
|
||||
</span>
|
||||
)
|
||||
} else {
|
||||
vnodes.push(<span slot='title'>{title}</span>)
|
||||
}
|
||||
}
|
||||
return vnodes
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user