fix(Toast): icon-size prop should affect loading icon (#8339)

This commit is contained in:
neverland
2021-03-14 11:52:28 +08:00
committed by GitHub
parent 7a14991b16
commit ca9ec7e1bd
3 changed files with 20 additions and 4 deletions
+5 -3
View File
@@ -83,14 +83,14 @@ export default defineComponent({
};
const renderIcon = () => {
const { icon, type, iconPrefix, loadingType } = props;
const { icon, type, iconSize, iconPrefix, loadingType } = props;
const hasIcon = icon || type === 'success' || type === 'fail';
if (hasIcon) {
return (
<Icon
name={icon || type}
size={props.iconSize}
size={iconSize}
class={bem('icon')}
classPrefix={iconPrefix}
/>
@@ -98,7 +98,9 @@ export default defineComponent({
}
if (type === 'loading') {
return <Loading class={bem('loading')} type={loadingType} />;
return (
<Loading class={bem('loading')} size={iconSize} type={loadingType} />
);
}
};