mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 15:39:15 +08:00
[Improvement] CouponCell: optimize text (#1499)
This commit is contained in:
parent
1b702c0a21
commit
1f5a409112
@ -43,7 +43,7 @@ body {
|
|||||||
color: #333;
|
color: #333;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
background-color: #f8f8f8;
|
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;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ export default create({
|
|||||||
const { coupons } = this;
|
const { coupons } = this;
|
||||||
const coupon = coupons[this.chosenCoupon];
|
const coupon = coupons[this.chosenCoupon];
|
||||||
if (coupon) {
|
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);
|
return coupons.length === 0 ? this.$t('tips') : this.$t('count', coupons.length);
|
||||||
}
|
}
|
||||||
|
@ -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-group van-hairline--top-bottom van-coupon-cell">
|
||||||
<div class="van-cell van-cell--clickable van-hairline">
|
<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>
|
||||||
<div class="van-cell__value"><span>您有 2 个可用优惠</span></div>
|
<div class="van-cell__value"><span>您有 2 个可用优惠</span></div>
|
||||||
|
@ -4,7 +4,7 @@ exports[`coupon cell 1`] = `
|
|||||||
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
|
<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 van-cell--clickable van-hairline">
|
||||||
<!---->
|
<!---->
|
||||||
<div class="van-cell__title"><span>优惠券码</span>
|
<div class="van-cell__title"><span>优惠券</span>
|
||||||
<!---->
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
<div class="van-cell__value"><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-group van-hairline--top-bottom van-coupon-cell">
|
||||||
<div class="van-cell van-cell--clickable van-hairline">
|
<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>
|
||||||
<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 class="van-icon van-icon-arrow van-cell__right-icon">
|
||||||
<!---->
|
<!---->
|
||||||
</i>
|
</i>
|
||||||
|
@ -34,7 +34,6 @@ export default {
|
|||||||
vanCouponCell: {
|
vanCouponCell: {
|
||||||
title: 'Coupon',
|
title: 'Coupon',
|
||||||
tips: 'Select coupon',
|
tips: 'Select coupon',
|
||||||
reduce: 'Reduce',
|
|
||||||
count: count => `You have ${count} offers`
|
count: count => `You have ${count} offers`
|
||||||
},
|
},
|
||||||
vanCouponList: {
|
vanCouponList: {
|
||||||
|
@ -30,9 +30,8 @@ export default {
|
|||||||
label: '合计:'
|
label: '合计:'
|
||||||
},
|
},
|
||||||
vanCouponCell: {
|
vanCouponCell: {
|
||||||
title: '优惠券码',
|
title: '优惠券',
|
||||||
tips: '使用优惠',
|
tips: '使用优惠',
|
||||||
reduce: '省',
|
|
||||||
count: count => `您有 ${count} 个可用优惠`
|
count: count => `您有 ${count} 个可用优惠`
|
||||||
},
|
},
|
||||||
vanCouponList: {
|
vanCouponList: {
|
||||||
|
@ -32,9 +32,8 @@ export default {
|
|||||||
label: '合計:'
|
label: '合計:'
|
||||||
},
|
},
|
||||||
vanCouponCell: {
|
vanCouponCell: {
|
||||||
title: '優惠券碼',
|
title: '優惠券',
|
||||||
tips: '使用優惠',
|
tips: '使用優惠',
|
||||||
reduce: '省',
|
|
||||||
count: count => `您有 ${count} 個可用優惠`
|
count: count => `您有 ${count} 個可用優惠`
|
||||||
},
|
},
|
||||||
vanCouponList: {
|
vanCouponList: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user