import { verifyPhone, verifyUsername, verifyPassword } from '@/utils/validator'
export default {
  data () {
    return {
      visible: false,
      form: this.$form.createForm(this),
      confirmLoading: false,
      formItemLayout: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 18 }
        }
      }
    }
  },
  methods: {
    verifyPhone,
    verifyUsername,
    verifyPassword,
    show (data) {
      this.visible = true
      this.form.resetFields()
      // 显示后执行方法
      this.showCallback && this.showCallback(data)
    },
    handleCancel () {
      this.visible = false
    }
  }
}
