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) {
|
render(h, context) {
|
||||||
const { icon, title } = context.props
|
const { icon, title } = context.props
|
||||||
const vnodes = []
|
const nodes = []
|
||||||
|
|
||||||
if (icon) {
|
if (icon) {
|
||||||
if (icon.includes('el-icon')) {
|
if (icon.includes('el-icon')) {
|
||||||
vnodes.push(<i class={[icon, 'sub-el-icon']} />)
|
nodes.push(<i class={[icon, 'menu-item-icon']} />)
|
||||||
} else {
|
} else {
|
||||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
nodes.push(<svg-icon icon-class={icon} />)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title) {
|
if (title) {
|
||||||
vnodes.push(<span slot='title'>{(title)}</span>)
|
nodes.push(<span slot='title'>{title}</span>)
|
||||||
}
|
}
|
||||||
return vnodes
|
return nodes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
Loading…
x
Reference in New Issue
Block a user