From 810fe4339ef35b5a2dc90044dadd3d59d3238608 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sat, 11 Oct 2025 10:10:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(store):=20=E7=AB=8B=E5=8D=B3=E6=BF=80?= =?UTF-8?q?=E6=B4=BBPinia=E5=AE=9E=E4=BE=8B=E4=BB=A5=E8=A7=A3=E5=86=B3APP?= =?UTF-8?q?=E7=AB=AF=E7=99=BD=E5=B1=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在app.use(store)之前调用store时确保Pinia实例已激活,避免白屏问题 --- src/store/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/index.ts b/src/store/index.ts index d09a35c..2f5a7c3 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -10,6 +10,7 @@ store.use( }, }), ) +// 立即激活 Pinia 实例, 这样即使在 app.use(store)之前调用 store 也能正常工作 (解决APP端白屏问题) setActivePinia(store) export default store