mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Coupon: update cell value color (#2359)
This commit is contained in:
parent
92ebce4462
commit
a843cf79c3
@ -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' : '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -2,6 +2,10 @@
|
||||
@import '../style/mixins/ellipsis';
|
||||
|
||||
.van-coupon {
|
||||
&-cell--selected {
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
&-list {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
@ -18,7 +18,7 @@ exports[`coupon cell 2`] = `
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="van-cell__value"><span>-¥1.00</span></div> <i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<div class="van-cell__value van-coupon-cell--selected"><span>-¥1.00</span></div> <i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<!---->
|
||||
<!----></i>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user