[new feature] Image: add round prop (#3838)

This commit is contained in:
一颗红心
2019-07-18 17:12:27 +08:00
committed by neverland
parent 3f33fcc525
commit e1021e70ba
6 changed files with 95 additions and 3 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ const [createComponent, bem] = createNamespace('image');
export default createComponent({
props: {
round: Boolean,
src: String,
fit: String,
alt: String,
@@ -134,7 +135,7 @@ export default createComponent({
render(h) {
return (
<div class={bem()} style={this.style} onClick={this.onClick}>
<div class={bem({ round: this.round })} style={this.style} onClick={this.onClick}>
{this.renderImage()}
{this.renderPlaceholder()}
</div>