You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
814 B
JavaScript
45 lines
814 B
JavaScript
// components/cart/cart.js
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
cartFlag:Boolean,
|
|
list:Array,
|
|
color:String
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
options: {
|
|
addGlobalClass: true,
|
|
},
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
cy_hide:function(){
|
|
this.triggerEvent("cy_hide");
|
|
},
|
|
cy_clearCart:function(){
|
|
this.triggerEvent("cy_clearCart");
|
|
},
|
|
cy_subCartItem:function(e){
|
|
this.triggerEvent("cy_subCartItem",e.currentTarget);
|
|
},
|
|
cy_addCartItem:function(e){
|
|
this.triggerEvent("cy_addCartItem",e.currentTarget);
|
|
},
|
|
cy_subSpecItem:function(){
|
|
this.triggerEvent("cy_subSpecItem");
|
|
},
|
|
cy_addSpecItem:function(){
|
|
this.triggerEvent("cy_addSpecItem");
|
|
}
|
|
}
|
|
})
|