feat(Image): add radius prop (#4230)

This commit is contained in:
neverland
2019-08-25 12:41:26 +08:00
committed by GitHub
parent c257cc4bac
commit af018ca0f1
5 changed files with 28 additions and 2 deletions
+6
View File
@@ -11,6 +11,7 @@ export default createComponent({
round: Boolean,
width: [Number, String],
height: [Number, String],
radius: [Number, String],
lazyLoad: Boolean,
showError: {
type: Boolean,
@@ -48,6 +49,11 @@ export default createComponent({
style.height = addUnit(this.height);
}
if (isDef(this.radius)) {
style.overflow = 'hidden';
style.borderRadius = addUnit(this.radius);
}
return style;
}
},