Component({
  options: {
    multipleSlots: true,
  },

  properties: {
    list: Array,
    title: {
      type: String,
      value: '领券中心',
    },
    show: {
      type: Boolean,
    },
  },

  // data: {
  //   list: [],
  // },

  methods: {
    change(e) {
      const { index } = e.currentTarget.dataset;
      this.triggerEvent('promotionChange', {
        index,
      });
    },

    closePromotionPopup() {
      console.log(this.list);

      this.triggerEvent('closePromotionPopup', {
        show: false,
      });
    },
  },
});
