[improvement] Coupon: update cell value color (#2359)

This commit is contained in:
neverland
2018-12-22 11:25:27 +08:00
committed by GitHub
parent 92ebce4462
commit a843cf79c3
3 changed files with 10 additions and 1 deletions
+5
View File
@@ -5,6 +5,7 @@
:value="value"
:border="border"
:is-link="editable"
:value-class="valueClass"
@click="$emit('click')"
/>
</template>
@@ -49,6 +50,10 @@ export default create({
return `-${this.currency}${(value / 100).toFixed(2)}`;
}
return coupons.length === 0 ? this.$t('tips') : this.$t('count', coupons.length);
},
valueClass() {
return this.coupons[this.chosenCoupon] ? 'van-coupon-cell--selected' : '';
}
}
});