82 lines
2.1 KiB
JavaScript
82 lines
2.1 KiB
JavaScript
/*
|
|
* _oo0oo_
|
|
* o8888888o
|
|
* 88" . "88
|
|
* (| -_- |)
|
|
* 0\ = /0
|
|
* ___/`---'\___
|
|
* .' \\| |// '.
|
|
* / \\||| : |||// \
|
|
* / _||||| -:- |||||- \
|
|
* | | \\\ - /// | |
|
|
* | \_| ''\---/'' |_/ |
|
|
* \ .-\__ '-' ___/-. /
|
|
* ___'. .' /--.--\ `. .'___
|
|
* ."" '< `.___\_<|>_/___.' >' "".
|
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
|
|
* \ \ `_. \_ __\ /__ _/ .-` / /
|
|
* =====`-.____`.___ \_____/___.-`___.-'=====
|
|
* `=---='
|
|
*
|
|
*
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
*
|
|
* 佛祖保佑 永不宕机 永无BUG
|
|
*
|
|
* @Descripttion:
|
|
* @version:
|
|
* @Date: 2021-04-20 11:06:21
|
|
* @LastEditors: huzhushan@126.com
|
|
* @LastEditTime: 2021-07-22 18:04:34
|
|
* @Author: huzhushan@126.com
|
|
* @HomePage: https://huzhushan.gitee.io/vue3-element-admin
|
|
* @Github: https://github.com/huzhushan/vue3-element-admin
|
|
* @Donate: https://huzhushan.gitee.io/vue3-element-admin/donate/
|
|
*/
|
|
|
|
import { createApp } from 'vue'
|
|
import App from './App.vue'
|
|
|
|
const app = createApp(App)
|
|
|
|
// 引入element-plus
|
|
import ElementPlus from 'element-plus'
|
|
import './assets/style/element-variables.scss'
|
|
// 引入中文语言包
|
|
import 'dayjs/locale/zh-cn'
|
|
import locale from 'element-plus/lib/locale/lang/zh-cn'
|
|
|
|
// 引入路由
|
|
import router from './router'
|
|
|
|
// 引入store
|
|
import store from './store'
|
|
|
|
// 权限控制
|
|
import './permission'
|
|
|
|
// 引入svg图标注册脚本
|
|
import 'vite-plugin-svg-icons/register'
|
|
|
|
// 引入全局设置
|
|
import defaultSettings from './defaultSettings'
|
|
app.provide('defaultSettings', defaultSettings)
|
|
|
|
// 注册全局组件
|
|
import * as Components from './global-components'
|
|
Object.entries(Components).forEach(([key, component]) => {
|
|
app.component(key, component)
|
|
})
|
|
|
|
// 错误日志
|
|
import useErrorHandler from './error-log'
|
|
useErrorHandler(app)
|
|
|
|
app
|
|
.use(ElementPlus, {
|
|
locale,
|
|
})
|
|
.use(store)
|
|
.use(router)
|
|
.mount('#app')
|