40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
|
|
// =============================================================================
|
||
|
|
// IT智能服务台 — Portal 统一入口前端应用
|
||
|
|
// =============================================================================
|
||
|
|
// 说明:统一入口前端应用,负责:
|
||
|
|
// 1. OAuth2 认证后获取用户角色
|
||
|
|
// 2. 展示角色选择页面(卡片选择)
|
||
|
|
// 3. 根据用户选择跳转到对应端
|
||
|
|
// =============================================================================
|
||
|
|
|
||
|
|
import { createApp } from 'vue'
|
||
|
|
import { createPinia } from 'pinia'
|
||
|
|
|
||
|
|
import App from './App.vue'
|
||
|
|
import router from './router'
|
||
|
|
|
||
|
|
// 导入 Element Plus
|
||
|
|
import ElementPlus from 'element-plus'
|
||
|
|
import 'element-plus/dist/index.css'
|
||
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||
|
|
|
||
|
|
// 创建 Vue 应用实例
|
||
|
|
const app = createApp(App)
|
||
|
|
|
||
|
|
// 注册 Element Plus
|
||
|
|
app.use(ElementPlus)
|
||
|
|
|
||
|
|
// 注册所有 Element Plus 图标
|
||
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||
|
|
app.component(key, component)
|
||
|
|
}
|
||
|
|
|
||
|
|
// 注册 Pinia 状态管理
|
||
|
|
app.use(createPinia())
|
||
|
|
|
||
|
|
// 注册路由
|
||
|
|
app.use(router)
|
||
|
|
|
||
|
|
// 挂载应用
|
||
|
|
app.mount('#app')
|