mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2026-01-07 23:47:00 +08:00
♻️ refactor: Renomeação de Item para MenuItem - resolver erro de Single Name Component
This commit is contained in:
parent
5a139ffae9
commit
1d775177c7
@ -14,20 +14,20 @@ export default {
|
||||
},
|
||||
render(h, context) {
|
||||
const { icon, title } = context.props
|
||||
const vnodes = []
|
||||
const nodes = []
|
||||
|
||||
if (icon) {
|
||||
if (icon.includes('el-icon')) {
|
||||
vnodes.push(<i class={[icon, 'sub-el-icon']} />)
|
||||
nodes.push(<i class={[icon, 'menu-item-icon']} />)
|
||||
} else {
|
||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
||||
nodes.push(<svg-icon icon-class={icon} />)
|
||||
}
|
||||
}
|
||||
|
||||
if (title) {
|
||||
vnodes.push(<span slot='title'>{(title)}</span>)
|
||||
nodes.push(<span slot='title'>{title}</span>)
|
||||
}
|
||||
return vnodes
|
||||
return nodes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
x
Reference in New Issue
Block a user