mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(vue): correct views are now unmounted in tabs (#25270)
resolves #25255
This commit is contained in:
@ -317,6 +317,8 @@ See https://ionicframework.com/docs/vue/navigation#ionpage for more information.
|
||||
leavingEl.classList.add('ion-page-hidden');
|
||||
leavingEl.setAttribute('aria-hidden', 'true');
|
||||
|
||||
const usingLinearNavigation = viewStacks.size() === 1;
|
||||
|
||||
if (routerAction === 'replace') {
|
||||
leavingViewItem.mount = false;
|
||||
leavingViewItem.ionPageElement = undefined;
|
||||
@ -327,9 +329,18 @@ See https://ionicframework.com/docs/vue/navigation#ionpage for more information.
|
||||
leavingViewItem.mount = false;
|
||||
leavingViewItem.ionPageElement = undefined;
|
||||
leavingViewItem.ionRoute = false;
|
||||
viewStacks.unmountLeavingViews(id, enteringViewItem, delta);
|
||||
|
||||
/**
|
||||
* router.go() expects navigation to be
|
||||
* linear. If an app is using multiple stacks then
|
||||
* it is not using linear navigation. As a result, router.go()
|
||||
* will not give the results that developers are expecting.
|
||||
*/
|
||||
if (usingLinearNavigation) {
|
||||
viewStacks.unmountLeavingViews(id, enteringViewItem, delta);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (usingLinearNavigation) {
|
||||
viewStacks.mountIntermediaryViews(id, leavingViewItem, delta);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user