feat: 前端配置和组件更新

- App.vue, Sidebar.vue
- main.ts, router/index.ts
- package.json, vite.config.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 14:26:33 +08:00
parent 03540fb9e9
commit 85b4c51fd7
6 changed files with 294 additions and 68 deletions

View File

@@ -1,4 +1,4 @@
import { createApp } from 'vue'
import { createApp, type Component } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
@@ -6,8 +6,18 @@ import router from './router'
import './assets/styles/index.css'
import App from './App.vue'
// 全局注册 Lucide 图标
import * as iconModule from 'lucide-vue-next'
const app = createApp(App)
// 注册所有图标为全局组件(过滤非组件)
for (const [name, icon] of Object.entries(iconModule)) {
if (typeof icon === 'object' && icon !== null && 'render' in icon) {
app.component(name, icon as Component)
}
}
app.use(createPinia())
app.use(router)
app.use(ElementPlus)