import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'  // 导入中文语言包
import * as ElIcons from '@element-plus/icons-vue'
import router from './router' // 引入路由配置
import { setupStore } from './store' // 引入 store 初始化方法

import './styles/common.scss'
import './styles/page.scss'

import './styles/appCommon.scss'


const app = createApp(App)
Object.keys(ElIcons).forEach((key) => {
  app.component(key, (ElIcons as Record<string, any>)[key])
})//ele icon

app.use(ElementPlus, { locale: zhCn })
app.use(router) // 注册路由
setupStore(app) // 注册 Vuex Store
app.mount('#app')
