[Improvement] Coupon i18n (#431)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<cell-group class="van-coupon-cell">
|
||||
<cell :title="title || '优惠券码'" :value="value" :isLink="editable" @click="$emit('click')" />
|
||||
<cell :title="title || $t('title')" :value="value" :isLink="editable" @click="$emit('click')" />
|
||||
</cell-group>
|
||||
</template>
|
||||
|
||||
@@ -42,9 +42,9 @@ export default create({
|
||||
const { coupons } = this;
|
||||
const coupon = coupons[this.chosenCoupon];
|
||||
if (coupon) {
|
||||
return `省¥${(coupon.value / 100).toFixed(2)}`;
|
||||
return `${this.$t('reduce')}¥${(coupon.value / 100).toFixed(2)}`;
|
||||
}
|
||||
return coupons.length === 0 ? '使用优惠' : `您有 ${coupons.length} 个可用优惠`;
|
||||
return coupons.length === 0 ? this.$t('tips') : this.$t('count', coupons.length);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user