vant-weapp/dist/tab/index.js
2018-04-30 23:50:08 +08:00

40 lines
586 B
JavaScript

Component({
externalClasses: 'class',
properties: {
scroll: {
type: Boolean,
value: false
},
fixed: {
type: Boolean,
value: false
},
height: {
type: Number,
value: 0
},
list: {
type: Array,
value: []
},
selectedId: {
type: [String, Number],
value: ''
}
},
methods: {
_handleZanTabChange(e) {
const selectedId = e.currentTarget.dataset.itemId;
this.setData({
selectedId
});
this.triggerEvent('tabchange', selectedId);
}
}
});