<script setup> 
 | 
import { getCurrentInstance, provide } from "vue"; 
 | 
import IndexView from './views/IndexView.vue' 
 | 
import LoginView from './views/login/LoginView.vue' 
 | 
import { globalState } from './config.js' 
 | 
import zhCN from 'ant-design-vue/es/locale/zh_CN'; 
 | 
import enUS from 'ant-design-vue/es/locale/en_US'; 
 | 
import dayjs from 'dayjs'; 
 | 
import 'dayjs/locale/zh-cn'; 
 | 
const context = getCurrentInstance()?.appContext.config.globalProperties; 
 | 
dayjs.locale('zh-cn'); 
 | 
provide('globalState', globalState); 
 | 
  
 | 
const localeType = { 
 | 
  zhCN, 
 | 
  enUS, 
 | 
}; 
 | 
  
 | 
console.log('%c 中扬立库平台 %c 1.0.0','background-color:rgb(53,73,94);color: #fff;border-radius:2px 0 0 2px;padding:2px 4px;','background-color:rgb(25,190,107);color: #fff;border-radius:0 2px 2px 0;padding:2px 4px;font: 9pt "Apercu Regular", Georgia, "Times New Roman", Times, serif;') 
 | 
</script> 
 | 
  
 | 
<template> 
 | 
  <a-config-provider :locale="localeType[globalState.locale]"> 
 | 
    <div v-if="globalState.token == '' || globalState.token == null"> 
 | 
      <LoginView /> 
 | 
      {{ context.$config }} 
 | 
    </div> 
 | 
    <div v-else> 
 | 
      <IndexView /> 
 | 
      {{ context.$config }} 
 | 
    </div> 
 | 
  </a-config-provider> 
 | 
</template> 
 | 
  
 | 
<style scoped></style> 
 |