<template>
  <BaseLogin @success="handleSuccess" title="切换账号" @close="emits('close')" />
</template>
<script lang="ts" setup>
  import BaseLogin from './components/BaseLogin.vue';
  import { useRouter } from 'vue-router';

  const emits = defineEmits(['close']);

  const router = useRouter();
  const handleSuccess = async () => {
    emits('close');
    await router.push('/');
    window.location.reload();
  };
</script>
