mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-29 20:29:46 +08:00
fix(Coupon): failed to render face amount
This commit is contained in:
parent
742872a4aa
commit
4e7769ebee
@ -43,12 +43,12 @@ export default createComponent({
|
|||||||
const { coupon } = this;
|
const { coupon } = this;
|
||||||
|
|
||||||
if (coupon.valueDesc) {
|
if (coupon.valueDesc) {
|
||||||
return `${coupon.valueDesc}<span>${coupon.unitDesc || ''}</span>`;
|
return [coupon.valueDesc, <span>{coupon.unitDesc || ''}</span>];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (coupon.denominations) {
|
if (coupon.denominations) {
|
||||||
const denominations = formatAmount(coupon.denominations);
|
const denominations = formatAmount(coupon.denominations);
|
||||||
return `<span>${this.currency}</span> ${denominations}`;
|
return [<span>{this.currency}</span>, ` ${denominations}`];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (coupon.discount) {
|
if (coupon.discount) {
|
||||||
@ -72,7 +72,7 @@ export default createComponent({
|
|||||||
<div class={bem({ disabled })}>
|
<div class={bem({ disabled })}>
|
||||||
<div class={bem('content')}>
|
<div class={bem('content')}>
|
||||||
<div class={bem('head')}>
|
<div class={bem('head')}>
|
||||||
<h2 class={bem('amount')} domPropsInnerHTML={this.faceAmount} />
|
<h2 class={bem('amount')}>{this.faceAmount}</h2>
|
||||||
<p class={bem('condition')}>
|
<p class={bem('condition')}>
|
||||||
{this.coupon.condition || this.conditionMessage}
|
{this.coupon.condition || this.conditionMessage}
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user