import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import CommonSelector from "@/components/CommonSelector.vue";
import * as ElIcons from "@element-plus/icons";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import router from "./router";
import { createPinia } from "pinia";
import "./assets/fonts/font.less"; // 字体样式
import "../public/iconFont/iconfont.css"; // 图标字体样式
import { $get, $post } from "@/data/https.js";
import windowConfig from "@/window";
import moment from "moment";

const pinia = createPinia();
const app = createApp(App);
app.config.globalProperties.$get = $get;
app.config.globalProperties.$post = $post;
app.config.globalProperties.windowConfig = windowConfig;
app.config.globalProperties.moment = moment;
for (const [key, component] of Object.entries(ElIcons)) {
  app.component(key, component);
}
app.component("CommonSelector", CommonSelector);
app.use(ElementPlus, { locale: zhCn }).use(router).use(pinia).mount("#app");
