mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(vue): improve path matching when going back (#22275)
resolves #22258
This commit is contained in:
@ -6,8 +6,8 @@ export const IonPage = defineComponent({
|
||||
isInOutlet: { type: Boolean, default: false }
|
||||
},
|
||||
setup(props, { attrs, slots }) {
|
||||
const hidePageClass = (props.isInOutlet) ? 'ion-page-invisible' : '';
|
||||
return () => {
|
||||
const hidePageClass = (props.isInOutlet) ? 'ion-page-invisible' : '';
|
||||
return h(
|
||||
'div',
|
||||
{
|
||||
|
@ -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