1
0
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:
aline-hirokawa 2025-11-26 14:37:06 -04:00
parent 5a139ffae9
commit 1d775177c7

View File

@ -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>