import { createApp } from 'vue'; import website from './config/website'; import axios from './axios'; import router from './router/'; import store from './store'; import i18n from './lang/'; import { language, messages } from './lang/'; import * as ElementPlusIconsVue from '@element-plus/icons-vue'; import ElementPlus from 'element-plus'; import 'element-plus/dist/index.css'; import Avue from '@smallwei/avue'; import '@smallwei/avue/lib/index.css'; import crudCommon from '@/mixins/crud.js'; import globalc from '@/api/basicdata/globalc.js' import { getScreen } from './utils/util'; import './permission'; import error from './error'; import avueUeditor from 'components/avue-ueditor/main.vue'; import basicBlock from 'components/basic-block/main.vue'; import basicContainer from 'components/basic-container/main.vue'; import thirdRegister from './components/third-register/main.vue'; import NfDesignBase from '@saber/nf-design-base-elp'; import flowDesign from './components/flow-design/main.vue'; import App from './App.vue'; import 'animate.css'; import dayjs from 'dayjs'; import 'styles/common.scss'; // 业务组件 import tenantPackage from './views/system/tenantpackage.vue'; import AvueMap from 'vue-amap'; // AvueMap.initAMapApiLoader({ // //申请地址 https://lbs.amap.com/ 选择web端jsAPI // key: '40448f21dfc7a531e9db4c405d955bea', // // 插件集合,用到什么插件就使用什么插件 // plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'], // v: '1.4.4', // 高德sdk版本,最新的sdk已经出到了2.0 // //官网解释:JSAPI 2.0 提供的开发接口与 1.4 版本达到 99%的兼容度,但是为了保证插件的稳定性我们还是选择1.4.4。 // }) window.$crudCommon = crudCommon; window.axios = axios; const app = createApp(App); for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component); } app.component('avueUeditor', avueUeditor); app.component('basicContainer', basicContainer); app.component('basicBlock', basicBlock); app.component('thirdRegister', thirdRegister); app.component('flowDesign', flowDesign); app.component('tenantPackage', tenantPackage); app.config.globalProperties.$dayjs = dayjs; app.config.globalProperties.$globalc = globalc; app.config.globalProperties.website = website; app.config.globalProperties.getScreen = getScreen; app.use(error); app.use(i18n); app.use(AvueMap); app.use(store); app.use(router); app.use(ElementPlus, { locale: messages[language], }); app.use(Avue, { axios, calcHeight: 10, locale: messages[language], }); app.use(NfDesignBase); app.mount('#app');