mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
fix(vue): correct views are now unmounted in tabs (#25270)
resolves #25255
This commit is contained in:
@ -9,6 +9,15 @@ import { shallowRef } from 'vue';
|
||||
export const createViewStacks = (router: Router) => {
|
||||
let viewStacks: ViewStacks = {};
|
||||
|
||||
/**
|
||||
* Returns the number of active stacks.
|
||||
* This is useful for determining if an app
|
||||
* is using linear navigation only or non-linear
|
||||
* navigation. Multiple stacks indiciate an app
|
||||
* is using non-linear navigation.
|
||||
*/
|
||||
const size = () => Object.keys(viewStacks).length;
|
||||
|
||||
const clear = (outletId: number) => {
|
||||
delete viewStacks[outletId];
|
||||
}
|
||||
@ -211,6 +220,7 @@ export const createViewStacks = (router: Router) => {
|
||||
add,
|
||||
remove,
|
||||
registerIonPage,
|
||||
getViewStack
|
||||
getViewStack,
|
||||
size
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user