feat(Button): add icon slot (#8783)

This commit is contained in:
neverland
2021-05-30 20:49:21 +08:00
committed by GitHub
parent ba876d286b
commit 36dae5ae8c
5 changed files with 39 additions and 8 deletions
+4
View File
@@ -89,6 +89,10 @@ export default defineComponent({
return renderLoadingIcon();
}
if (slots.icon) {
return <div class={bem('icon')}>{slots.icon()}</div>;
}
if (props.icon) {
return (
<Icon