1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2026-01-07 23:47:00 +08:00
This commit is contained in:
AnaaGabs 2025-11-26 18:47:33 -04:00
commit d52e4b4178

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>