import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
const app = createApp(App)

import 'element-plus/theme-chalk/index.css'  // 引入组件样式


import {elementList} from "@/plugins/elementData";
for (const key of elementList) {
    app.component(key.name, key)
}

import * as ElementPlusIconsVue from '@element-plus/icons-vue'// 全部引入 Icon 图标 
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {// 全部引入 Icon 图标 ，并注册iocn图标
    app.component(key, component)
}


// 全局注册组件
// app.component('ElButton', ElButton)
// app.component('ElForm', ElForm)
// app.component('ElInput', ElInput)


app.use(store)
app.use(router)
app.mount('#app')
