mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(vue): improve path matching when going back (#22275)
resolves #22258
This commit is contained in:
@ -7,7 +7,8 @@ import {
|
||||
provide,
|
||||
watch,
|
||||
shallowRef,
|
||||
InjectionKey
|
||||
InjectionKey,
|
||||
onUnmounted
|
||||
} from 'vue';
|
||||
import { AnimationBuilder } from '@ionic/core';
|
||||
import { useRoute } from 'vue-router';
|
||||
@ -307,6 +308,13 @@ export const IonRouterOutlet = defineComponent({
|
||||
setupViewItem(matchedRouteRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove stack data for this outlet
|
||||
* when outlet is destroyed otherwise
|
||||
* we will see cached view data.
|
||||
*/
|
||||
onUnmounted(() => viewStacks.clear(id));
|
||||
|
||||
return {
|
||||
id,
|
||||
components,
|
||||
|
Reference in New Issue
Block a user