mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] CouponCell: remove wrapper (#2145)
This commit is contained in:
parent
0ffaa7bf3d
commit
b567a2a563
@ -1,15 +1,12 @@
|
||||
<template>
|
||||
<cell-group
|
||||
<cell
|
||||
:class="b()"
|
||||
:title="title || $t('title')"
|
||||
:value="value"
|
||||
:border="border"
|
||||
>
|
||||
<cell
|
||||
:title="title || $t('title')"
|
||||
:value="value"
|
||||
:is-link="editable"
|
||||
@click="$emit('click')"
|
||||
/>
|
||||
</cell-group>
|
||||
:is-link="editable"
|
||||
@click="$emit('click')"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -10,8 +10,8 @@
|
||||
<p>{{ validPeriod }}</p>
|
||||
<checkbox
|
||||
v-if="chosen"
|
||||
:value="true"
|
||||
:class="b('corner')"
|
||||
value
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -73,7 +73,7 @@ export default {
|
||||
| chosen-coupon | Index of chosen coupon | `Number` | `-1` |
|
||||
| coupons | Coupon list | `Array` | `[]` |
|
||||
| editable | Cell editable | `Boolean` | `true` |
|
||||
| border | Whether to show outer border | `Boolean` | `true` |
|
||||
| border | Whether to show innner border | `Boolean` | `true` |
|
||||
|
||||
### CouponList API
|
||||
|
||||
|
@ -3,17 +3,15 @@
|
||||
exports[`renders demo correctly 1`] = `
|
||||
<div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
|
||||
<div class="van-cell van-cell--clickable">
|
||||
<div class="van-cell van-cell--clickable van-coupon-cell">
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="van-cell__value"><span>你有 2 个可用优惠</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon" style="color:undefined;font-size:undefined;">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell__value"><span>你有 2 个可用优惠</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon" style="color:undefined;font-size:undefined;">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
|
@ -1,31 +1,27 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`coupon cell 1`] = `
|
||||
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
|
||||
<div class="van-cell van-cell--clickable">
|
||||
<div class="van-cell van-cell--clickable van-coupon-cell">
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="van-cell__value"><span>使用优惠</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell__value"><span>使用优惠</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`coupon cell 2`] = `
|
||||
<div class="van-cell-group van-hairline--top-bottom van-coupon-cell">
|
||||
<div class="van-cell van-cell--clickable">
|
||||
<div class="van-cell van-cell--clickable van-coupon-cell">
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
<div class="van-cell__title"><span>优惠券</span>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="van-cell__value"><span>-¥1.00</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-cell__value"><span>-¥1.00</span></div>
|
||||
<i class="van-icon van-icon-arrow van-cell__right-icon">
|
||||
<!---->
|
||||
</i>
|
||||
</div>
|
||||
`;
|
||||
|
@ -74,7 +74,7 @@ export default {
|
||||
| chosen-coupon | 当前选中优惠券的索引 | `Number` | `-1` | - |
|
||||
| coupons | 可用优惠券列表 | `Array` | `[]` | - |
|
||||
| editable | 能否切换优惠券 | `Boolean` | `true` | - |
|
||||
| border | 是否显示外边框 | `Boolean` | `true` | 1.3.10 |
|
||||
| border | 是否显示内边框 | `Boolean` | `true` | 1.3.10 |
|
||||
|
||||
### CouponList API
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user