import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// 引入vue3 element 组件 和样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// element组件默认语言设置为中文
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router)

app
  .use(ElementPlus, {
    locale: zhCn
  })
  .mount('#app')
