<template>
  <div class="login-form account-login">
    <div class="login-form__item">
      <input
        type="text"
        class="login-input"
        placeholder="手机/邮箱/用户名"
        v-model="ruleForm.account"
      />
    </div>
    <div class="login-form__item">
      <input
        type="password"
        class="login-input"
        placeholder="密码"
        v-model="ruleForm.password"
        @keyup.enter="onSubmit"
      />
    </div>
  </div>
</template>

<script>
export default {
  name: 'AccountLogin',
  data() {
    return {
      ruleForm: {
        account: '',
        password: ''
      }
    }
  },
  methods: {
    submit() {
      if (!this.ruleForm.account) {
        this.$notify('请输入手机/邮箱/用户名')
        return false
      } else if (!this.ruleForm.password) {
        this.$notify('请输入密码')
        return false
      }
      return true
    }
  }
}
</script>
