Component({
  options: {
    addGlobalClass: true
  }, //使用全局css样式
  properties: {
    show: {
      type: Boolean,
      observer: function (newVal) {
        this.setData({
          show: newVal
        });
      }
    },
    alternateData: {
      type: Object,
      observer: function (newVal) {
        this.setData({
          info: newVal
        });
      }
    },
    type:{
      type: Number,
      observer: function (newVal, oldVal) {
        this.setData({ type: newVal })
      }
    }
  },
  data: {
    show: false,
    info: {},
    type:0,
  },
  methods: {
    // 关闭弹窗
    closeTip(e) {
      this.close(e.detail)
    },
    closePopup() {
      this.close(false)
    },
    close(data) {
      this.triggerEvent("close");
    },
  }
})