import { createApp } from 'vue'
import * as Elicons from '@element-plus/icons-vue'
//引入Elmessage和Elloading的css样式文件
import 'element-plus/theme-chalk/el-loading.css'
import 'element-plus/theme-chalk/el-message.css'

import '@/styles/common.scss'

import App from './App.vue'
import router from './router'

// 引入悟加载指令插件并且注册
import { lazyPlugin } from '@/directives'

const app = createApp(App)

app.use(router)
app.use(lazyPlugin)

//全局注册elementplus icon
Object.keys(Elicons).forEach((key) => {
  app.component(key, Elicons[key])
})

app.mount('#app')
