feat: 添加 IonRouterOutlet 组件支持,优化 App 组件的路由动画设置
This commit is contained in:
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@@ -7,6 +7,7 @@
|
|||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const EffectScope: typeof import('vue').EffectScope
|
const EffectScope: typeof import('vue').EffectScope
|
||||||
|
const IonRouterOutlet: typeof import('@ionic/vue').IonRouterOutlet
|
||||||
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
||||||
const asyncComputed: typeof import('@vueuse/core').asyncComputed
|
const asyncComputed: typeof import('@vueuse/core').asyncComputed
|
||||||
const autoResetRef: typeof import('@vueuse/core').autoResetRef
|
const autoResetRef: typeof import('@vueuse/core').autoResetRef
|
||||||
|
|||||||
@@ -6,15 +6,16 @@ const { isAuthenticated } = storeToRefs(userStore);
|
|||||||
const { locale, loadSavedLanguage } = useLanguage();
|
const { locale, loadSavedLanguage } = useLanguage();
|
||||||
const { initializeWallet } = useWalletStore();
|
const { initializeWallet } = useWalletStore();
|
||||||
const { updateProfile } = useUserStore();
|
const { updateProfile } = useUserStore();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!isAuthenticated.value)
|
if (!isAuthenticated.value)
|
||||||
return;
|
return;
|
||||||
updateProfile();
|
updateProfile();
|
||||||
initializeWallet();
|
initializeWallet();
|
||||||
CapacitorApp.addListener("appStateChange", async ({ isActive }) => {
|
CapacitorApp.addListener("appStateChange", ({ isActive }) => {
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
await userStore.updateProfile();
|
userStore.updateProfile();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -31,7 +32,7 @@ watch(locale, (newLocale) => {
|
|||||||
<template>
|
<template>
|
||||||
<IonApp>
|
<IonApp>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<IonRouterOutlet />
|
<IonRouterOutlet :animated="false" />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</IonApp>
|
</IonApp>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ authClient.getSession().then((session) => {
|
|||||||
mode: "ios",
|
mode: "ios",
|
||||||
statusTap: true,
|
statusTap: true,
|
||||||
swipeBackEnabled: true,
|
swipeBackEnabled: true,
|
||||||
|
// rippleEffect: true,
|
||||||
|
// animated: false,
|
||||||
})
|
})
|
||||||
.use(uiComponents)
|
.use(uiComponents)
|
||||||
.use(pinia)
|
.use(pinia)
|
||||||
|
|||||||
Reference in New Issue
Block a user