Skip to content

Commit 0523f08

Browse files
committed
fix(svg-icon): 自定义图标在Dropdown组件下hover状态无法显示图标
1 parent 8237adb commit 0523f08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/custom/SvgIcon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<svg aria-hidden="true" width="1em" height="1em" class="inline-block">
2+
<svg aria-hidden="true" width="1em" height="1em">
33
<use :xlink:href="symbolId" fill="currentColor" />
44
</svg>
55
</template>

src/utils/common/icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ export function customIconRender(icon: string, color?: string, size?: number) {
3535
style.size = `${size}px`;
3636
}
3737

38-
return () => h(SvgIcon, { icon, style });
38+
return () => h(NIcon, null, { default: () => h(SvgIcon, { icon, style }) });
3939
}

0 commit comments

Comments
 (0)