[new feature] Coupon: add valueDesc、unitDesc prop (#2710)
This commit is contained in:
@@ -37,9 +37,13 @@ export default sfc({
|
||||
},
|
||||
|
||||
faceAmount() {
|
||||
return this.coupon.denominations
|
||||
const { coupon } = this;
|
||||
if (coupon.valueDesc && coupon.unitDesc) {
|
||||
return `${coupon.valueDesc}<span>${coupon.unitDesc}</span>`;
|
||||
}
|
||||
return coupon.denominations
|
||||
? `<span>${this.currency}</span> ${formatAmount(this.coupon.denominations)}`
|
||||
: this.coupon.discount
|
||||
: coupon.discount
|
||||
? t('discount', formatDiscount(this.coupon.discount))
|
||||
: '';
|
||||
},
|
||||
|
||||
@@ -40,13 +40,15 @@
|
||||
|
||||
&__head {
|
||||
position: relative;
|
||||
min-width: 95px;
|
||||
min-width: 85px;
|
||||
padding-right: 10px;
|
||||
|
||||
h2 {
|
||||
color: @red;
|
||||
font-size: 24px;
|
||||
|
||||
span {
|
||||
margin-left: 2px;
|
||||
font-size: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user