Files
JayuCloud/WeChatProgram/components/product-card/product-card.js
T

35 lines
531 B
JavaScript

Component({
properties: {
item: {
type: Object,
value: {}
},
showMeta: {
type: Boolean,
value: true
},
showStats: {
type: Boolean,
value: false
},
showQuickAdd: {
type: Boolean,
value: false
},
inCart: {
type: Boolean,
value: false
}
},
methods: {
handleTap() {
this.triggerEvent('select', this.properties.item)
},
handleQuickAdd() {
this.triggerEvent('quickadd', this.properties.item)
}
}
})