tabbar.js
523 Bytes
Component({
properties: {
list: Array,
flex: null,
defaultIndex: {
type: Number,
observer: function(t, e) {
this.setData({
count: t
});
}
}
},
data: {
count: 0
},
methods: {
click: function(t) {
var e = t.currentTarget.dataset.index;
this.setData({
count: e
}), this.triggerEvent("tabclick", e);
}
}
});