code-login.vue 577 B

123456789101112131415161718192021222324
  1. <script lang="ts" setup>
  2. import type { LoginCodeParams } from '@vben/common-ui';
  3. import { AuthenticationCodeLogin } from '@vben/common-ui';
  4. import { ref } from 'vue';
  5. defineOptions({ name: 'CodeLogin' });
  6. const loading = ref(false);
  7. /**
  8. * 异步处理登录操作
  9. * Asynchronously handle the login process
  10. * @param values 登录表单数据
  11. */
  12. async function handleLogin(values: LoginCodeParams) {
  13. // eslint-disable-next-line no-console
  14. console.log(values);
  15. }
  16. </script>
  17. <template>
  18. <AuthenticationCodeLogin :loading="loading" @submit="handleLogin" />
  19. </template>