import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import locale from "element-plus/lib/locale/lang/zh-cn"; //中文
import lodash from 'lodash'
import * as ElementIcon from "@element-plus/icons-vue";
import "element-plus/dist/index.css";


import "../theme/index.css";
import api from "./api/index";

import Plugin from 'v-fit-columns';

import moment from 'moment';
import useWidgets from './components'

// 全局安装自定义组件
// 初始化im


import Utils from "@/static/js/utils";

let app = createApp(App).use(store).use(router).use(lodash).use(Plugin).use(ElementPlus, { locale }); //
useWidgets(app)

for (let n in ElementIcon) {
    app.component(n, ElementIcon[n])
}
app.config.globalProperties.$moment = moment
app.config.globalProperties.$api = api;
app.config.globalProperties.$Utils = Utils;
app.mount("#app");
