/*
 * @Author: zengzhe
 * @Date: 2024-12-27 11:15:21
 * @LastEditors: zengzhe
 * @LastEditTime: 2024-12-27 14:26:21
 * @Description:
 */
import { createApp } from 'vue'
// 引入ElementPlus图标
import * as Icons from 'tdesign-icons-vue-next'
// 引入组件库的少量全局样式变量
import 'tdesign-vue-next/es/style/index.css'
import App from './App.vue'
// 引入 iconfont
import '@/assets/iconfont/iconfont.css'
// 引入字体
import '@/assets/fonts/font.less'
// 引入自定义样式
import '@/styles/index.less'
// svg icons
// import 'virtual:svg-icons-register'
// 引入路由
import router from '@/routers'
// 引入pinia状态管理
import pinia from '@/stores'
// 引入全局错误处理函数errorHandler
// import errorHandler from '@/utils/errorHandler'

const app = createApp(App)
// app.config.errorHandler = errorHandler
// 全局注册ElementPlus图标组件
Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key as keyof typeof Icons])
})

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