<script setup lang="ts">
import { RouterView } from 'vue-router'
import elementEnLocale from 'element-plus/es/locale/lang/en'
import elementZhLocale from 'element-plus/es/locale/lang/zh-cn'
import i18n from '@/locale/index.ts'
import {computed} from "vue";

// element-ui 国际化在此配置
const lang = computed(() => {
  switch (i18n.global.locale.value) {
    case 'en':
      return elementEnLocale;
    case 'zh-cn':
      return elementZhLocale;
    default:
      return elementZhLocale;
  }
});
</script>

<template>
  <el-config-provider :locale="lang">
    <div style="height: 10vh">
      <RouterView />
    </div>
  </el-config-provider>
</template>

<style scoped>


</style>
