修改svgIcon组件没有图标时默认不占位

This commit is contained in:
不做码农
2022-05-20 20:01:01 +08:00
parent 562115c084
commit fdab552d6b
+3 -1
View File
@@ -29,7 +29,7 @@ export default defineComponent({
},
[h(resolveComponent(props.name.replace('ele-', '')))],
)
} else {
} else if (props.name != undefined && props.name != '') {
return () =>
h(
'svg',
@@ -44,6 +44,8 @@ export default defineComponent({
fill: `${props.color}`,
}),
)
} else {
return () => h('i')
}
},
})