You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
import { createApp } from 'vue' |
|
// import G6 from '@antv/g6' |
|
// 导入svg插件 |
|
import 'virtual:svg-icons-register' |
|
import App from './App.vue' |
|
// 引入elementplus组件库 |
|
import ElementPlus from 'element-plus' |
|
// 样式; |
|
import 'element-plus/dist/index.css' |
|
//@ts-expect-error忽略当前文件ts类型的检测否则有红色提示(打包会失败) |
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
|
import gloablComponent from './components/index' |
|
// 引入全局样式 |
|
import '@/styles/index.scss' |
|
// 引入路由 |
|
import router from '@/router/index' |
|
// 引入路由拦截器 |
|
import './permissions' |
|
// 引入仓库 |
|
import pinia from '@/store/index' |
|
import '@/utils/rem.js' |
|
import VuePdf from 'vue3-pdfjs' |
|
// 创建vue实例 |
|
const app = createApp(App) |
|
// 注册element plus组件库 |
|
app.use(ElementPlus, { |
|
locale: zhCn, |
|
}) |
|
app.use(VuePdf) |
|
// 注册全局组件 |
|
app.use(gloablComponent) |
|
app.use(router) |
|
app.use(pinia) |
|
// app.use(G6) |
|
// 挂载点 |
|
app.mount('#app') |
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
|
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
|
app.component(key, component) |
|
} |