0.0.21 • Published 5 years ago
促销弹窗
引入
"usingComponents": {
"wr-promotion-popup": "@retailwe/promotion-popup/index"
}
代码演示
<wr-promotion-popup list="{{activityList}}" bind:closePromotionPopup="closePromotionPopup" show="{{isShowPromotionPop}}"></wr-promotion-popup>
// Events
closePromotionPopup() {
this.setData({
isShowPromotionPop: false,
});
}
promotionChange(e) {
const { index } = e.detail;
console.log('index:', index);
}
入参
| 参数 | 说明 | 类型 | 默认值 | 是否必要 |
|---|
| list | 促销列表 | Array | [] | 是 |
| show | 显示隐藏 | Boolean | '' | 否 |
| title | 弹窗标题 | String | '促销说明' | 否 |
list 促销列表说明
| 参数 | 说明 | 类型 | 默认值 | 是否必要 |
|---|
| tag | 标签名 | String | '' | 是 |
| linkText | 跳转按钮文案 | String | '' | 否 |
| label | 促销内容 | String | ‘’ | 是 |
Events
| 事件 | 是否必要 | 说明 |
|---|
| promotionChange | 是 | 按钮回调, 返回索引 |
| closePromotionPopup | 是 | 弹窗关闭 |
外部样式类
slot
| name | 说明 |
|---|
| promotion-bottom | 弹窗底部插槽 |