2025-10-27 23:13:08 +08:00

24 lines
679 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { createSSRApp } from 'vue'
// 引入 createPinia 方法(命名导出)
import { createPinia } from 'pinia'
import App from './App.vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// FontAwesome CSS 将通过 App.vue 中的全局样式引入
export function createApp() {
const app = createSSRApp(App)
// 创建 Pinia 实例
const pinia = createPinia()
// 注册 Pinia 持久化
pinia.use(piniaPluginPersistedstate)
// 注册 Pinia
app.use(pinia)
// 暂时注释掉 uView因为与 Vue 3 有兼容性问题
// 后续可以使用 uView Plus 或其他 Vue 3 兼容的 UI 库
// app.use(uView)
return {
app
}
}