恢复商品和详情页面
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
Component({
|
||||
externalClasses: ['wr-class'],
|
||||
|
||||
options: { multipleSlots: true },
|
||||
|
||||
properties: {
|
||||
soldout: {
|
||||
// 商品是否下架
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
isStock: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
}, // 是否有库存
|
||||
isSlotButton: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
}, // 是否开启按钮插槽
|
||||
buttonType: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
toBuyNow(e) {
|
||||
const { isStock, soldout } = this.properties;
|
||||
if (soldout || !isStock) return;
|
||||
this.triggerEvent('toBuyNow', e);
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user