<template>
  <n-space :vertical="true">
    <n-divider class="!mb-0 text-14px text-#666">登录账户类型</n-divider>
    <n-space justify="center">
      <n-button v-for="item in accounts" :key="item.type" type="primary" @click="change(item.type)">
        {{ item.label }}
      </n-button>
    </n-space>
  </n-space>
</template>

<script lang="ts" setup>
interface Emits {
  (e: 'change', param: { type: string }): void;
}
const emit = defineEmits<Emits>();
const accounts = [
  {
    label: '教务人员',
    type: 'admin'
  },
  {
    label: '学生账户',
    type: 'student'
  }
];

function change(type: string) {
  emit('change', { type });
}
</script>

<style scoped></style>
