40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { createApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import ElementPlus from 'element-plus'
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
// Element Plus 样式 - 按需导入时仍需要基础样式
|
|
import 'element-plus/dist/index.css'
|
|
// 全局样式
|
|
import '@/assets/styles/index.scss'
|
|
// 路由
|
|
import router from './router'
|
|
import App from './App.vue'
|
|
|
|
// 输出版本信息到控制台
|
|
console.log('🚀 XiangYi Admin System')
|
|
console.log('📦 Vue Version:', '3.4.38')
|
|
console.log('🎨 Element Plus Version:', '2.8.4')
|
|
console.log('🕒 Build Time:', new Date().toISOString())
|
|
console.log('🔄 Cache Buster:', Math.random().toString(36).substr(2, 9))
|
|
|
|
const app = createApp(App)
|
|
|
|
// 注册 Element Plus 图标
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
app.component(key, component)
|
|
}
|
|
|
|
// 使用 Pinia
|
|
app.use(createPinia())
|
|
|
|
// 使用路由
|
|
app.use(router)
|
|
|
|
// 使用 Element Plus 并配置中文
|
|
app.use(ElementPlus, {
|
|
locale: zhCn
|
|
})
|
|
|
|
app.mount('#app')
|