import TyComponent from '../common/component'

TyComponent({
  /**
   * 组件的属性列表
   */
  properties: {

    items: {
      type: Array,
      value: []
    },
    mainActiveIndex: {
      type: Number,
      value: 0
    },
    activeId: {
      type: [String, Number],
      value: 0
    },
    max: {
      type: Number,
      value: 10000
    },
    mainItemClass: {
      type: String
    },
    contentItemClass: {
      type: String
    },
    mainActiveClass: {
      type: String
    },
    contentActiveClass: {
      type: String
    },
    mainDisabledClass: {
      type: String
    },
    contentDisabledClass: {
      type: String
    }

  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleClickNav({detail}) {
      this.triggerEvent('click-nav', detail)
    },
    handleClickItem({detail}) {
      this.triggerEvent('click-item', detail)
    },
  }
})
