2024-02-19 13:44:32 +08:00
|
|
|
|
import { createApp } from 'vue'
|
|
|
|
|
|
import App from './App.vue'
|
|
|
|
|
|
import router from './router'
|
|
|
|
|
|
import pinia from '@/stores/index'
|
|
|
|
|
|
import { registerIcons } from '@/utils/common'
|
|
|
|
|
|
import mitt from 'mitt'
|
|
|
|
|
|
import VXETable from 'vxe-table'
|
|
|
|
|
|
import XEUtils from 'xe-utils'
|
|
|
|
|
|
import 'vxe-table/lib/style.css'
|
|
|
|
|
|
import ElementPlus from 'element-plus'
|
|
|
|
|
|
import 'element-plus/dist/index.css'
|
|
|
|
|
|
import 'element-plus/theme-chalk/display.css'
|
|
|
|
|
|
import '@fortawesome/fontawesome-free/css/all.css'
|
|
|
|
|
|
import '@/styles/index.scss'
|
|
|
|
|
|
import '@/assets/font/iconfont.css'
|
|
|
|
|
|
import { ElDialog } from 'element-plus'
|
2024-02-20 09:48:20 +08:00
|
|
|
|
import BaiduMap from 'vue-baidu-map-3x'
|
2024-02-28 09:42:07 +08:00
|
|
|
|
import BaiduMapOffline from 'vue-baidu-map-offline';
|
2024-02-23 16:26:32 +08:00
|
|
|
|
import ExcelJS from 'exceljs'
|
|
|
|
|
|
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
|
|
|
|
|
|
// 方式1:NPM 安装,注入 ExcelJS 对象
|
|
|
|
|
|
VXETable.use(VXETablePluginExportXLSX, {
|
|
|
|
|
|
ExcelJS
|
|
|
|
|
|
})
|
2024-02-19 13:44:32 +08:00
|
|
|
|
window.XEUtils = XEUtils
|
|
|
|
|
|
|
|
|
|
|
|
const app = createApp(App)
|
2024-02-28 09:42:07 +08:00
|
|
|
|
//开启离线地图
|
|
|
|
|
|
// app.use(BaiduMapOffline, {
|
|
|
|
|
|
// offline: true,
|
|
|
|
|
|
// offlineUrl: window.location.origin + '/map/',
|
|
|
|
|
|
// });
|
2024-02-20 09:48:20 +08:00
|
|
|
|
app.use(BaiduMap, {
|
2024-02-28 09:42:07 +08:00
|
|
|
|
ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
|
|
|
|
|
v: '3.0',
|
|
|
|
|
|
});
|
2024-02-19 13:44:32 +08:00
|
|
|
|
app.use(router)
|
|
|
|
|
|
app.use(pinia)
|
2024-02-19 15:28:43 +08:00
|
|
|
|
app.use(ElementPlus)
|
2024-02-19 13:44:32 +08:00
|
|
|
|
app.use(VXETable)
|
2024-02-19 15:28:43 +08:00
|
|
|
|
;(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false
|
2024-02-19 13:44:32 +08:00
|
|
|
|
registerIcons(app) // icons
|
|
|
|
|
|
|
|
|
|
|
|
app.mount('#app')
|
|
|
|
|
|
app.config.globalProperties.eventBus = mitt()
|