1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // const getReq = require('./../../../config.js').getReq
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- tabs: {
- type: Array
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- secIndex: 0
- },
- ready() {
-
- },
- /**
- * 组件的方法列表
- */
- methods: {
- secTabs: function (e) {
- let secIndex = e.currentTarget.dataset.id
- if (secIndex == this.data.secIndex) {
- return
- }
- let item = e.currentTarget.dataset.item
- this.setData({
- secIndex
- })
- var myEventDetail = { item } // detail对象,提供给事件监听函数
- this.triggerEvent('myevent', myEventDetail)
- }
- }
- })
|