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

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

</script>

<template>
  <el-config-provider :message="{ max: 3 }" :z-index="100" :locale="zhCn" namespace="ep">
    <suspense>
      <div class="bg-hex-f2f2f295 w-full h-100vh flex flex-col justify-start items-stretch">
        <router-view></router-view>
      </div>

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

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

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