fix(svg-icon): 自定义图标在Dropdown组件下hover状态无法显示图标

This commit is contained in:
燕博文 2022-06-16 11:07:43 +08:00
parent 8237adb9c0
commit 0523f08382
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<svg aria-hidden="true" width="1em" height="1em" class="inline-block"> <svg aria-hidden="true" width="1em" height="1em">
<use :xlink:href="symbolId" fill="currentColor" /> <use :xlink:href="symbolId" fill="currentColor" />
</svg> </svg>
</template> </template>

View File

@ -35,5 +35,5 @@ export function customIconRender(icon: string, color?: string, size?: number) {
style.size = `${size}px`; style.size = `${size}px`;
} }
return () => h(SvgIcon, { icon, style }); return () => h(NIcon, null, { default: () => h(SvgIcon, { icon, style }) });
} }