materialTab.js 474 Bytes
// packageStudy/pages/sceneMarket/components/materialTab/materialTab.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    tabList: Array,
  },

  /**
   * 组件的初始数据
   */
  data: {
    tabIndex: 0
  },

  /**
   * 组件的方法列表
   */
  methods: {
    change(e) {
      const {
        index,
      } = e.currentTarget.dataset
      this.setData({
        tabIndex: index
      })
      this.triggerEvent('click', index)
    }
  }
})