<template>
  <ElConfigProvider :locale="zhCn">
    <router-view v-slot="{ Component }" v-if="!sysError">
      <component :is="Component" />
    </router-view>
    <Error v-else />
  </ElConfigProvider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn.mjs";
import { sysError } from "./store";
import Error from "./views/error/index.vue";
</script>
