mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 06:59:15 +08:00
feat(Coupon): add new prop condition @rex-zsd (#2551)
This commit is contained in:
parent
3f60e4701b
commit
4fdf731a8e
@ -67,7 +67,7 @@ export default {
|
||||
id: 1,
|
||||
discount: 0,
|
||||
denominations: 150,
|
||||
originCondition: 0,
|
||||
condition: '无使用门槛\n最多优惠12元',
|
||||
reason: '',
|
||||
value: 150,
|
||||
name: this.$t('coupon.name'),
|
||||
|
@ -108,7 +108,7 @@ export default {
|
||||
| name | Name | `String` |
|
||||
| discount | Discount | `Number` |
|
||||
| denominations | Denominations | `Number` |
|
||||
| originCondition | Condition | `Number` |
|
||||
| condition | Condition | `String` |
|
||||
| startAt | Start time (Timestmap, unit second) | `Number` |
|
||||
| endAt | End time (Timestmap, unit second) | `Number` |
|
||||
| description | Description | `String` |
|
||||
|
@ -36,7 +36,7 @@ const coupon = {
|
||||
available: 1,
|
||||
discount: 0,
|
||||
denominations: 150,
|
||||
originCondition: 0,
|
||||
condition: '无使用门槛\n最多优惠12元',
|
||||
reason: '',
|
||||
value: 150,
|
||||
name: '优惠券名称',
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
| name | 优惠券名称 | `String` |
|
||||
| discount | 折扣(0为满减券)88=>8.8折 | `Number` |
|
||||
| denominations | 面值(0为折扣券)单位分 | `Number` |
|
||||
| originCondition | 满减条件(0为无门槛,满XX元可用)单位分 | `Number` |
|
||||
| condition | 满减条件 | `String` |
|
||||
| startAt | 卡有效开始时间 (时间戳, 单位秒) | `Number` |
|
||||
| endAt | 卡失效日期 (时间戳, 单位秒) | `Number` |
|
||||
| description | 描述信息,优惠券可用时展示 | `String` |
|
||||
|
@ -60,7 +60,7 @@ export default sfc({
|
||||
<div class={bem('content')}>
|
||||
<div class={bem('head')}>
|
||||
<h2 domPropsInnerHTML={this.faceAmount} />
|
||||
<p>{this.conditionMessage}</p>
|
||||
<p>{this.coupon.condition || this.conditionMessage}</p>
|
||||
</div>
|
||||
<div class={bem('body')}>
|
||||
<h2>{coupon.name}</h2>
|
||||
|
@ -39,7 +39,8 @@
|
||||
}
|
||||
|
||||
&__head {
|
||||
min-width: 90px;
|
||||
position: relative;
|
||||
min-width: 95px;
|
||||
|
||||
h2 {
|
||||
color: @red;
|
||||
@ -49,6 +50,10 @@
|
||||
font-size: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
&__body {
|
||||
|
Loading…
x
Reference in New Issue
Block a user