selectItemPopup.js 822 Bytes
// tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    show: {
      type: Boolean
    },
    title: {
      type: String
    },
    optionList: {
      type: Array
    },
    index: {
      type: Number
    },
    optionLabel: {
        type: 'String',
        default: 'confName'
    }
  },

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

  },

  lifetimes: {
    attached() {
        console.log(this.data.optionList)
    },
  },

  /**
   * 组件的方法列表
   */
  methods: {
    click(e) {
      let { pidx, idx } = e.currentTarget.dataset
      this.triggerEvent('click', {pidx, idx})
    },
    confirm() {
      this.triggerEvent('confirm')
    },
    cancel() {
      this.triggerEvent('cancel')
    }
  }
})