feat(Image): add error-icon prop (#5470)

This commit is contained in:
neverland
2020-01-03 18:49:41 +08:00
committed by GitHub
parent e380c23b1c
commit 46e995ab4a
5 changed files with 27 additions and 1 deletions
+5 -1
View File
@@ -21,6 +21,10 @@ export default createComponent({
type: Boolean,
default: true
},
errorIcon: {
type: String,
default: 'warning-o'
},
loadingIcon: {
type: String,
default: 'photo-o'
@@ -123,7 +127,7 @@ export default createComponent({
return (
<div class={bem('error')}>
{this.slots('error') || (
<Icon name="warning-o" class={bem('error-icon')} />
<Icon name={this.errorIcon} class={bem('error-icon')} />
)}
</div>
);