import { createApp } from 'vue'
import { createPinia } from 'pinia'

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

import './assets/main.css'
import './assets/iconfont/iconfont.css'

import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css' // 引入 Element Plus 的样式文件
import * as ElIcon from '@element-plus/icons-vue'

const app = createApp(App)

Object.keys(ElIcon).forEach((key) => {
    app.component(key, ElIcon[key])
})

// 设置全局主题色
app.config.globalProperties.$theme = {
    primary: '#1890ff',
  };

app.use(createPinia())
app.use(router)
app.use(ElementPlus).mount('#app')
