<script setup lang="ts">
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ElMessage } from 'element-plus';
import { UserRole } from '~/store/user';

if (UserRole === 'other') {
  ElMessage.error('非法用户')
}

</script>

<template>
  <el-config-provider :message="{ max: 3 }" :z-index="100" :locale="zhCn">
    <suspense>
      <div class="bg w-full h-672px flex justify-center items-center">
        <router-view></router-view>
      </div>

      <template #fallback>
        <div v-loading="true" class="w-full h-672px" />
      </template>
    </suspense>
  </el-config-provider>
</template>

<style>
body {
  margin: 0;
  padding: 0;
}
</style>

<style scoped>
.bg {
  background-image: url('~/assets/bg.webp');
}
</style>
