TopToolbarPopup.js 805 Bytes
// components/TopToolbarPopup/TopToolbarPopup.js
Component({
  externalClasses: ['popup-slot-class'],
  properties: {
    show: {
      type: Boolean,
      value: false,
      observer: function (n, o) {
        n && wx.hideKeyboard()
        this.setData({
          showPopup: n
        })
      }
    },
    title: String,
    height: {
      type: String,
      value: '85%'
    },
    slotStyle: String
  },

  data: {
    isFullSucreen: false
  },

  methods: {
    noScroll() { },
    hidePopup() {
      this.setData({
        show: false
      })
      this.triggerEvent('cancel')
    },
    confirm() {
      this.triggerEvent('confirm')
    }
  },

  attached() {
    this.setData({
      isFullSucreen: wx.$util && wx.$util.isFullSucreen ? wx.$util.isFullSucreen(true) : false
    })
  }
})