<template>
  <div class="reset-password-check">
    <div class="reset-btn" :class="[componentName == 'ResetPasswordPhone' ? 'check' : '']" @click="checkComponent('ResetPasswordPhone')">手机号</div>
    <div class="reset-btn" :class="[componentName == 'ResetPasswordEmail' ? 'check' : '']" @click="checkComponent('ResetPasswordEmail')">邮箱</div>
  </div>
</template>

<script>
export default {
  name: 'CheckModeReset',
  props: ['componentName'],
  methods: {
    //修改父组件的模块参数
    checkComponent(component) {
      this.$emit('update:componentName', component);
    }
  }
};
</script>

<style lang="scss" scoped>
.reset-password-check {
  display: flex;
  margin-bottom: 20px;
  .reset-btn {
    width: 62px;
    height: 40px;
    color: #24222f;
    font-size: 14px;
    line-height: 40px;
    text-align: center;
  }
  .check {
    color: #3a86ff;
    border-bottom: 2px solid #3a86ff;
  }
}
</style>