2024-09-26 14:04:18 +08:00
|
|
|
|
import App from './App.vue';
|
|
|
|
|
import { createApp } from 'vue';
|
|
|
|
|
import ElementPlus from 'element-plus';
|
|
|
|
|
import { setupVab } from '@/vab';
|
|
|
|
|
import { setupStore } from '@/store';
|
|
|
|
|
import { setupRouter } from '@/router';
|
|
|
|
|
import '@/vab/styles/tianditu.scss';
|
|
|
|
|
import locale from 'element-plus/lib/locale/lang/zh-cn';
|
2025-02-18 08:19:37 +08:00
|
|
|
|
import print from 'vue3-print-nb';
|
2024-09-26 14:04:18 +08:00
|
|
|
|
import CKEditor from '@ckeditor/ckeditor5-vue';
|
|
|
|
|
const app = createApp(App);
|
2025-02-18 08:19:37 +08:00
|
|
|
|
import mixin from '@/mixin/index';
|
|
|
|
|
|
|
|
|
|
app.mixin(mixin);
|
2024-09-26 14:04:18 +08:00
|
|
|
|
app.use(ElementPlus, { locale });
|
|
|
|
|
app.use(CKEditor);
|
2025-02-18 08:19:37 +08:00
|
|
|
|
app.use(print);
|
2024-09-26 14:04:18 +08:00
|
|
|
|
/**
|
|
|
|
|
* @description 正式环境默认使用mock,正式项目记得注释后再打包
|
|
|
|
|
*/
|
|
|
|
|
// if (process.env.NODE_ENV === 'production') {
|
|
|
|
|
// const { mockXHR } = require('@/utils/static')
|
|
|
|
|
// mockXHR()
|
|
|
|
|
// }
|
|
|
|
|
/**
|
|
|
|
|
* @description 生产环境启用组件初始化,编译,渲染和补丁性能跟踪。仅在开发模式和支持 Performance.mark API的浏览器中工作。
|
|
|
|
|
*/
|
|
|
|
|
if (process.env.NODE_ENV === 'development') {
|
|
|
|
|
app.config.performance = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setupVab(app);
|
|
|
|
|
setupStore(app);
|
|
|
|
|
setupRouter(app);
|
|
|
|
|
app.mount('#vue-admin-beautiful-element-plus');
|