feat: 添加 IonRouterOutlet 组件支持,优化 App 组件的路由动画设置
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -52,6 +52,8 @@ authClient.getSession().then((session) => {
|
||||
mode: "ios",
|
||||
statusTap: true,
|
||||
swipeBackEnabled: true,
|
||||
// rippleEffect: true,
|
||||
// animated: false,
|
||||
})
|
||||
.use(uiComponents)
|
||||
.use(pinia)
|
||||
|
||||
Reference in New Issue
Block a user