feat(CouponCell): prefer to use value over denominations & modify tips (#5438)

This commit is contained in:
rex 2020-01-02 16:10:37 +08:00 committed by neverland
parent 74c63ad2f0
commit 67d0811596
8 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ function formatValue(props: CouponCellProps) {
const coupon = coupons[chosenCoupon];
if (coupon) {
const value = coupon.denominations || coupon.value;
const value = coupon.value || coupon.denominations || 0;
return `-${currency}${(value / 100).toFixed(2)}`;
}

View File

@ -37,7 +37,7 @@ exports[`empty-image prop 1`] = `
exports[`render coupon cell 1`] = `
<div role="button" tabindex="0" class="van-cell van-cell--clickable van-coupon-cell">
<div class="van-cell__title"><span>优惠券</span></div>
<div class="van-cell__value"><span>使用优惠</span></div><i class="van-icon van-icon-arrow van-cell__right-icon">
<div class="van-cell__value"><span>暂无可用</span></div><i class="van-icon van-icon-arrow van-cell__right-icon">
<!----></i>
</div>
`;

View File

@ -42,7 +42,7 @@ export default {
},
vanCouponCell: {
title: 'Coupon',
tips: 'Select coupon',
tips: 'No coupons',
count: (count: number) => `You have ${count} coupons`
},
vanCouponList: {

View File

@ -42,7 +42,7 @@ export default {
},
vanCouponCell: {
title: 'Cupón',
tips: 'Selecciona cupón',
tips: 'Sin cupones',
count: (count: number) => `You have ${count} coupons`
},
vanCouponList: {

View File

@ -42,7 +42,7 @@ export default {
},
vanCouponCell: {
title: 'Kupon',
tips: 'Kupon seç',
tips: 'Kupon yok',
count: (count: number) => `${count} adet teklif var`
},
vanCouponList: {

View File

@ -43,7 +43,7 @@ export default {
},
vanCouponCell: {
title: '优惠券',
tips: '使用优惠',
tips: '暂无可用',
count: (count: number) => `${count}张可用`
},
vanCouponList: {

View File

@ -43,7 +43,7 @@ export default {
},
vanCouponCell: {
title: '優惠券',
tips: '使用優惠',
tips: '暫無可用',
count: (count: number) => `${count}張可用`
},
vanCouponList: {

View File

@ -43,7 +43,7 @@ export default {
},
vanCouponCell: {
title: '優惠券',
tips: '使用優惠',
tips: '暫無可用',
count: (count: number) => `${count}張可用`
},
vanCouponList: {