1234567891011121314151617181920212223242526272829303132 |
- Component({
-
- properties: {
- arr:{
- type: Array,
- value: []
- }
- },
-
- data: {
- curIndex: 0,
- },
-
- methods: {
- getSwitch:function(e){
- const val = e.target.dataset.index
- this.triggerEvent("changeIndex",val)
- this.setData({
- curIndex: e.target.dataset.index
- })
- },
- }
- })
|