添加navbar组件

This commit is contained in:
wangxiaowei
2025-08-22 17:53:25 +08:00
parent 01fd9ecdf0
commit cbcdaa061e
3 changed files with 73 additions and 1 deletions

View File

@ -3,18 +3,27 @@ import { createSSRApp } from 'vue'
import App from './App.vue'
import { requestInterceptor } from './http/interceptor'
import { routeInterceptor } from './router/interceptor'
import navBar from '@/components/navbar.vue'
import store from './store'
import '@/style/index.scss'
import 'virtual:uno.css'
import { getNavBarHeight, getCapsuleOffset } from '@/utils/index'
export function createApp() {
const app = createSSRApp(App)
/* 注册全局组件 */
app.component('navBar', navBar) // 注册全局组件
app.use(store)
app.use(routeInterceptor)
app.use(requestInterceptor)
app.use(VueQueryPlugin)
app.provide('OSS', 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/')
app.provide('navbarHeight', getNavBarHeight())
app.provide('capsuleOffset', getCapsuleOffset())
return {
app,