focus.js
779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Component({
properties: {
swiperList: {
type: Array,
value: []
},
swieperSpeed: {
type: String,
value: '0'
},
// use for floors' click report
floorId: {
type: String,
value: ''
},
floorName: {
type: String,
value: ''
},
floorIndex: {
type: String, // start from 1
value: ''
}
},
data: {
indicatorDots: false,
interval: 5000,
autoplay: true,
duration: 500,
circular: true,
swiperCurrent: 0
},
methods: {
swiperChange: function(e) {
this.setData({
swiperCurrent: e.detail.current
});
},
// use for floors' click report
report: function(e) {
this.triggerEvent('clickreport', e.detail);
}
}
});