[Improvement] CouponCell: optimize text (#1499)

This commit is contained in:
neverland 2018-07-17 21:21:08 +08:00 committed by GitHub
parent 1b702c0a21
commit 1f5a409112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 11 deletions

View File

@ -43,7 +43,7 @@ body {
color: #333;
line-height: 1;
background-color: #f8f8f8;
font-family: Arial, Helvetica, "STHeiti STXihei", "Microsoft YaHei", Tohoma, sans-serif;
font-family: 'PingFang SC', Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
}

View File

@ -35,7 +35,7 @@ export default create({
const { coupons } = this;
const coupon = coupons[this.chosenCoupon];
if (coupon) {
return `${this.$t('reduce')}${(coupon.value / 100).toFixed(2)}`;
return `-${(coupon.value / 100).toFixed(2)}`;
}
return coupons.length === 0 ? this.$t('tips') : this.$t('count', coupons.length);
}

View File

@ -6,7 +6,7 @@ exports[`renders demo correctly 1`] = `
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
<div class="van-cell van-cell--clickable van-hairline">
<!---->
<div class="van-cell__title"><span>优惠券</span>
<div class="van-cell__title"><span>优惠券</span>
<!---->
</div>
<div class="van-cell__value"><span>您有 2 个可用优惠</span></div>

View File

@ -4,7 +4,7 @@ exports[`coupon cell 1`] = `
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
<div class="van-cell van-cell--clickable van-hairline">
<!---->
<div class="van-cell__title"><span>优惠券</span>
<div class="van-cell__title"><span>优惠券</span>
<!---->
</div>
<div class="van-cell__value"><span>使用优惠</span></div>
@ -19,10 +19,10 @@ exports[`coupon cell 2`] = `
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
<div class="van-cell van-cell--clickable van-hairline">
<!---->
<div class="van-cell__title"><span>优惠券</span>
<div class="van-cell__title"><span>优惠券</span>
<!---->
</div>
<div class="van-cell__value"><span>¥1.00</span></div>
<div class="van-cell__value"><span>-¥1.00</span></div>
<i class="van-icon van-icon-arrow van-cell__right-icon">
<!---->
</i>

View File

@ -34,7 +34,6 @@ export default {
vanCouponCell: {
title: 'Coupon',
tips: 'Select coupon',
reduce: 'Reduce',
count: count => `You have ${count} offers`
},
vanCouponList: {

View File

@ -30,9 +30,8 @@ export default {
label: '合计:'
},
vanCouponCell: {
title: '优惠券',
title: '优惠券',
tips: '使用优惠',
reduce: '省',
count: count => `您有 ${count} 个可用优惠`
},
vanCouponList: {

View File

@ -32,9 +32,8 @@ export default {
label: '合計:'
},
vanCouponCell: {
title: '優惠券',
title: '優惠券',
tips: '使用優惠',
reduce: '省',
count: count => `您有 ${count} 個可用優惠`
},
vanCouponList: {