initHeader

This commit is contained in:
2024-08-21 14:52:36 +08:00
parent 41babdfa5c
commit fe895bd37c
25 changed files with 1023 additions and 20 deletions

View File

@@ -1,9 +1,9 @@
import { createApp } from 'vue'
import App from './App.vue'
// element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// element-plus 全局引入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 使用pinia
import pinia from '@/stores'
// 导入路由
@@ -18,11 +18,16 @@ import registerGlobComp from '@/components'
//创建实例
const app = createApp(App)
const setupAll = async () => {
//全局注册图标
for(const [key, component] of Object.entries(ElementPlusIconsVue)){
app.component(key, component)
}
app
.use(Router) // 使用路由
.use(ElementPlus) // 使用ele-plus组件
.use(pinia) // 使用pinia
.use(registerGlobComp) // 使用全局自定义组件
.use(ElementPlusIconsVue) // 使用element-plus图标
//待路由初始化完毕后挂载app