Popup.js 989 Bytes
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.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,
    cancelText: String,
    cancelStyle: String
  },

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

  /**
   * 组件的方法列表
   */
  methods: {
    noScroll() {},
    hidePopup() {
      this.setData({
        show: false
      })
      this.triggerEvent('cancel')
    },
    confirm() {
      this.triggerEvent('confirm')
    }
  },
  attached() {
    // console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
    this.setData({
      isFullSucreen: wx.$util.isFullSucreen(true)
    })
  }
})