2025-10-10 10:56:33 +08:00
|
|
|
import { createSSRApp } from 'vue'
|
|
|
|
|
import App from './App.vue'
|
2026-02-05 16:55:58 +08:00
|
|
|
// 引入全局组件注册方法
|
|
|
|
|
import registerGlobalComponents from './components/index'
|
2025-10-10 10:56:33 +08:00
|
|
|
import { requestInterceptor } from './http/interceptor'
|
2026-02-05 16:55:58 +08:00
|
|
|
|
2025-10-10 10:56:33 +08:00
|
|
|
import { routeInterceptor } from './router/interceptor'
|
|
|
|
|
|
|
|
|
|
import store from './store'
|
|
|
|
|
import '@/style/index.scss'
|
|
|
|
|
import 'virtual:uno.css'
|
|
|
|
|
|
|
|
|
|
export function createApp() {
|
|
|
|
|
const app = createSSRApp(App)
|
|
|
|
|
app.use(store)
|
|
|
|
|
app.use(routeInterceptor)
|
|
|
|
|
app.use(requestInterceptor)
|
2026-02-05 16:55:58 +08:00
|
|
|
registerGlobalComponents(app)
|
2025-10-10 10:56:33 +08:00
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
app,
|
|
|
|
|
}
|
|
|
|
|
}
|