v3.8.2 优化菜单名称过长悬停显示标题

This commit is contained in:
YunaiV 2022-07-06 09:11:34 +08:00
parent 0d06c7fe8b
commit d1053d55ad

View File

@ -21,7 +21,11 @@ export default {
}
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
}