We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ff083a commit da8e70eCopy full SHA for da8e70e
components/button/button.tsx
@@ -114,9 +114,9 @@ export default defineComponent({
114
? (
115
<LoadingOutlined class={loadingIconClassName} />
116
)
117
- : props.iconPlacement !== 'right' && <span class={`${prefixCls}-icon`}>{slots.icon?.()}</span> }
+ : (props.iconPlacement !== 'right' && slots.icon) && <span class={`${prefixCls}-icon`}>{slots.icon?.()}</span> }
118
{slots.default?.()}
119
- {props.iconPlacement === 'right' && <span class={[`${prefixCls}-icon`, 'is-right']}>{slots.icon?.()}</span> }
+ {(props.iconPlacement === 'right' && slots.icon) && <span class={[`${prefixCls}-icon`, 'is-right']}>{slots.icon?.()}</span> }
120
</button>
121
);
122
},
0 commit comments