import { createApp } from 'vue'
import App from './App.vue'
// import httpss from './api/http.js'
import router from './router'
import ElementPlus from 'element-plus'
import Vant from 'vant'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import 'vant/lib/index.css';
import './assets/css/icon.css'
import './assets/font/iconfont.css'
import './api/permission' //路由守卫
import * as echarts from 'echarts'
import utils from '@/utils/index.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import store from './store'
import axios from 'axios'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.config.globalProperties.$utils = utils;
app.config.globalProperties.$echarts = echarts;
app.config.globalProperties.$axios = axios;
app.use(router).use(store).use(Vant).use(ElementPlus, { size: 'small',locale: zhCn }).mount('#app')
