// components/dialog/dialog.ts
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    visible: {
      type: Boolean,
      value: false
    },
    position: {
      type: String,
      value:""
    },

    title: {
      type: String,
      value: '标题'
    }
  },

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

  },

  /**
   * 组件的方法列表
   */
  methods: {
    close() {
      console.log('close');

      this.triggerEvent('close')
      this.hidden()
    },
    hidden() {
      this.setData({
        visible: false
      })
    },
    goChrivc() {
      wx.navigateToMiniProgram({
        appId: 'wx1da91ccb94c17c99',
        path: 'pages/report/report',
        success(res) {
          // 打开成功
        }
      })
    }
  }
})
