import {createApp} from 'vue'; import App from './App.vue'; // 全局样式 import './assets/styles/index.scss'; // 引入字体 import './assets/fonts/iconfont/iconfont.css'; import './assets/fonts/AlimamaShuHeiTiBold/Alimama_ShuHeiTi_Bold.css'; import './assets/fonts/DingTalkJinBuTiRegular/DingTalk_JinBuTi_Regular.css'; // 引入路由 import router from './router/index.js'; // 自定义拖拽指令 import {drag} from "./assets/js/directive.js"; import http from './utils/http.js' // 引入elementUI 样式 import 'element-plus/dist/index.css'; // 全局引入ElementPlus,无需按需引入 import ElementPlus from 'element-plus'; import * as ElementPlusIconsVue from '@element-plus/icons-vue' import md5 from "js-md5" import {createPinia} from 'pinia' //全局弹出框组件 import jtpopup from './components/jt-popup/jt-popup.vue' import jtpopupif from './components/jt-popup/jt-popup-if.vue' import jtdrawer from './components/jt-drawer/drawer.vue' import jtcharts from './components/jt-charts/charts.vue' // 引入jt3dSDK import '/public/jt3dSDK/index.css'; import * as jt3dSDK from '/public/jt3dSDK/jt3d.es.js'; import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; // import 'amfe-flexible';//rem适配 import Print from 'vue3-print-nb'; //引入打印模块 // 创建 Pinia 实例 const pinia = createPinia(); pinia.use(piniaPluginPersistedstate); // 创建实例 let app = createApp(App); for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } //挂载到vue根实例上 app.config.globalProperties.$http = http app.config.globalProperties.$md5 = md5 app.config.globalProperties.jt3dSDK = jt3dSDK app.directive('drag', drag) app.component("jt-popup",jtpopup) app.component("jt-popup-if",jtpopupif) app.component("jt-drawer",jtdrawer) app.component("jt-charts",jtcharts) // app.use(pinia) 在store使用 app.use(router); app.use(ElementPlus); app.use(Print); app.mount('#app');