feat: 添加 IonRouterOutlet 组件支持,优化 App 组件的路由动画设置

This commit is contained in:
2025-12-23 05:50:51 +07:00
parent a87f11c1f4
commit df9c9da25e
3 changed files with 7 additions and 3 deletions

View File

@@ -6,15 +6,16 @@ const { isAuthenticated } = storeToRefs(userStore);
const { locale, loadSavedLanguage } = useLanguage();
const { initializeWallet } = useWalletStore();
const { updateProfile } = useUserStore();
const route = useRoute();
onMounted(() => {
if (!isAuthenticated.value)
return;
updateProfile();
initializeWallet();
CapacitorApp.addListener("appStateChange", async ({ isActive }) => {
CapacitorApp.addListener("appStateChange", ({ isActive }) => {
if (isActive) {
await userStore.updateProfile();
userStore.updateProfile();
}
});
});
@@ -31,7 +32,7 @@ watch(locale, (newLocale) => {
<template>
<IonApp>
<Suspense>
<IonRouterOutlet />
<IonRouterOutlet :animated="false" />
</Suspense>
</IonApp>
</template>