feat(CouponList): add list-footer slot (#8797)

This commit is contained in:
Tisiven 2021-06-03 11:09:02 +08:00 committed by GitHub
parent 127f99f8e8
commit 5280400404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -128,6 +128,13 @@ export default {
| unitDesc | Unit Text | _string_ |
| customValidPeriod | custom valid period | _string_ |
### CouponList Slots
| Name | Description |
| -------------------- | ------------------------------- |
| list-footer | Coupon list bottom |
| disabled-list-footer | Unavailable coupons list bottom |
### Less Variables
How to use: [Custom Theme](#/en-US/theme).

View File

@ -130,6 +130,13 @@ export default {
| unitDesc | 单位文案 | _string_ |
| customValidPeriod | 自定义有效时间文案 | _string_ |
### CouponList Slots
| 名称 | 说明 |
| -------------------- | -------------------- |
| list-footer | 优惠券列表底部 |
| disabled-list-footer | 不可用优惠券列表底部 |
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。

View File

@ -200,6 +200,7 @@ export default createComponent({
/>
))}
{!coupons.length && this.genEmpty()}
{this.slots('list-footer')}
</div>
</Tab>
);
@ -219,6 +220,7 @@ export default createComponent({
/>
))}
{!disabledCoupons.length && this.genEmpty()}
{this.slots('disabled-list-footer')}
</div>
</Tab>
);