classlist.js
641 Bytes
Component({
properties:{
typelist:Array,
topHeight:{
type:Number,
value:0
}
},
data:{
},
methods:{
selectclass:function(e){
var id=e.currentTarget.dataset.id;
var typelist=this.data.typelist;
typelist.forEach(function(v,i){
v.isactive=false
if(id==v.id){
v.isactive=true;
}
})
this.setData({
typelist:typelist,
classid:id
})
this.triggerEvent('getcooklist',id)
},
}
})