[new feature] Sku: update style & add several props (#3875)

This commit is contained in:
codpoe
2019-07-22 10:51:40 +08:00
committed by neverland
parent e8c528a6f6
commit 503fe5f469
13 changed files with 301 additions and 165 deletions
+3 -1
View File
@@ -37,6 +37,7 @@ export default createComponent({
render(h) {
const choosed = this.skuValue.id === this.selectedSku[this.skuKeyStr];
const imgUrl = this.skuValue.imgUrl || this.skuValue.img_url;
return (
<span
@@ -49,7 +50,8 @@ export default createComponent({
]}
onClick={this.onSelect}
>
{this.skuValue.name}
{imgUrl && <img class="van-sku-row__item-img" src={imgUrl} />}
<span class="van-sku-row__item-name">{this.skuValue.name}</span>
</span>
);
}