55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import { createApp } from 'vue'
|
|
import App from '@/App.vue'
|
|
import { initAMapApiLoader } from '@vuemap/vue-amap';
|
|
import DataVVue3 from '@kjgl77/datav-vue3'
|
|
import '@vuemap/vue-amap/dist/style.css'
|
|
initAMapApiLoader({
|
|
key: 'YOUR_KEY'
|
|
})
|
|
import dayjs from 'dayjs';
|
|
import lodasha from 'lodash';
|
|
import ElementPlus from 'element-plus'
|
|
import 'element-plus/dist/index.css'
|
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
|
|
// import '@types/leaflet'
|
|
// 高德地图typescript支持
|
|
import "@amap/amap-jsapi-types";
|
|
// vue Router
|
|
import router from "@/router";
|
|
// pinia store
|
|
import pinia from "@/stores";
|
|
|
|
//浏览器重置样式
|
|
import '@/assets/scss/reset.scss'
|
|
//公共样式
|
|
import '@/assets/scss/common.scss'
|
|
//ant design 扩展样式
|
|
import '@/assets/scss/myAntD.scss'
|
|
// 阿里巴巴普惠体
|
|
import '@/assets/scss/font.scss'
|
|
//动画样式库
|
|
import 'animate.css';
|
|
// iconfont css
|
|
import "@/assets/iconfont/iconfont.css";
|
|
|
|
//自定义指令
|
|
import vCopy from "@/directives/copy";
|
|
const vueApp = createApp(App);
|
|
vueApp.config.globalProperties.day = dayjs//全局挂载
|
|
vueApp.config.globalProperties.lodash = lodasha//全局挂载
|
|
|
|
vueApp.directive('copy', vCopy)
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
vueApp.component(key, component)
|
|
}
|
|
|
|
vueApp
|
|
.use(router)
|
|
.use(DataVVue3)
|
|
.use(pinia)
|
|
.use(ElementPlus, {
|
|
locale: zhCn,
|
|
})
|
|
.use(zhCn)
|
|
.mount('#app') |