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

1
auto-imports.d.ts vendored
View File

@@ -7,6 +7,7 @@
export {}
declare global {
const EffectScope: typeof import('vue').EffectScope
const IonRouterOutlet: typeof import('@ionic/vue').IonRouterOutlet
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
const asyncComputed: typeof import('@vueuse/core').asyncComputed
const autoResetRef: typeof import('@vueuse/core').autoResetRef

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>

View File

@@ -52,6 +52,8 @@ authClient.getSession().then((session) => {
mode: "ios",
statusTap: true,
swipeBackEnabled: true,
// rippleEffect: true,
// animated: false,
})
.use(uiComponents)
.use(pinia)