Skip to content

Commit

Permalink
fix(svg-icon): 自定义图标在Dropdown组件下hover状态无法显示图标
Browse files Browse the repository at this point in the history
  • Loading branch information
yanbowe committed Jun 16, 2022
1 parent 8237adb commit 0523f08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/custom/SvgIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<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" />
</svg>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/common/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export function customIconRender(icon: string, color?: string, size?: number) {
style.size = `${size}px`;
}

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

0 comments on commit 0523f08

Please sign in to comment.