|
|
|
@ -2,7 +2,9 @@ import {createApp} from 'vue' |
|
|
|
import App from './App.vue' |
|
|
|
import router from './router' |
|
|
|
import ElementPlus from 'element-plus' |
|
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn' |
|
|
|
// import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
|
|
// import en from 'element-plus/es/locale/lang/en'
|
|
|
|
// import th from 'element-plus/es/locale/lang/th'
|
|
|
|
import 'element-plus/dist/index.css' |
|
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|
|
|
import './assets/css/common.css' // 引入公共CSS文件
|
|
|
|
@ -34,10 +36,22 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|
|
|
app.component('downloadExcel', JsonExcel) |
|
|
|
app.config.globalProperties.$http = request |
|
|
|
|
|
|
|
// // 动态设置 Element Plus 的语言
|
|
|
|
// const getElementPlusLocale = () => {
|
|
|
|
// const lang = localStorage.getItem('lang') || 'zh-CN'
|
|
|
|
// switch (lang) {
|
|
|
|
// case 'en':
|
|
|
|
// return en
|
|
|
|
// case 'th':
|
|
|
|
// return th
|
|
|
|
// case 'zh-CN':
|
|
|
|
// default:
|
|
|
|
// return zhCn
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 使用各种插件
|
|
|
|
app.use(ElementPlus, { |
|
|
|
locale: zhCn |
|
|
|
}) |
|
|
|
app.use(ElementPlus) |
|
|
|
.use(router) |
|
|
|
.use(VxeUI) |
|
|
|
.use(VxeUITable) |
|
|
|
|