You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
Component({
|
|
properties: {
|
|
statusList: Array,
|
|
source: String
|
|
},
|
|
data: {
|
|
current: 0
|
|
},
|
|
methods: {
|
|
refresh: function () {
|
|
var _this = this;
|
|
var statusList = this.data.statusList;
|
|
statusList.forEach(function (item) {
|
|
_this.selectComponent("#list" + item.status).refreshList();
|
|
});
|
|
},
|
|
handleSwiperChange: function (e) {
|
|
var _a = e.detail, current = _a.current, source = _a.source;
|
|
if (source == "touch") {
|
|
this.setData({ current: current });
|
|
console.log('$el----', this.selectComponent("#list" + current));
|
|
if (current == 3)
|
|
this.selectComponent("#list" + current).initApiData();
|
|
}
|
|
},
|
|
handleTabs: function (e) {
|
|
var id = e.currentTarget.dataset.id;
|
|
this.setData({ current: id });
|
|
if (id == 3)
|
|
this.selectComponent("#list" + id).initApiData();
|
|
},
|
|
}
|
|
});
|
|
|