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