fix(IconSelect): 🐛 修复构建时提示iconComponent.name可能为undefined的报错;
This commit is contained in:
@@ -169,7 +169,7 @@ function loadIcons() {
|
||||
type IconNames = keyof typeof ElementPlusIconsVue;
|
||||
const renderIcon = (iconName: string) => {
|
||||
const iconComponent = ElementPlusIconsVue[iconName as IconNames];
|
||||
if (iconComponent) {
|
||||
if (iconComponent && iconComponent.name) {
|
||||
return h(resolveComponent(iconComponent.name));
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user