/*
  @description:element-ui
  @Modifier:肖文龙
  @routerPath:
  @date:2020-7-15 17:19:32
*/
export const elementMxin = {
  methods: {
    // alert弹框
    $elAlert(message, type, callback) {
      this.$alert(message, '提示', {
        type: type,
        confirmButtonText: '确定',
        callback: action => {
          // confirm 点击确定时
          if (action === 'confirm') {
            // 回调
            if (callback instanceof Function) callback()
          }
        }
      })
    }
  }
}
