chore(): sync with master

This commit is contained in:
Liam DeBeasi
2021-04-05 16:40:39 -04:00
81 changed files with 47583 additions and 2036 deletions

View File

@ -1,12 +1,12 @@
{
"name": "@ionic/vue-router",
"version": "5.6.0",
"version": "5.6.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue-router",
"version": "5.6.0",
"version": "5.6.3",
"license": "MIT",
"devDependencies": {
"@ionic/vue": "5.4.1",
@ -23,13 +23,13 @@
},
"../../core": {
"name": "@ionic/core",
"version": "5.5.5",
"version": "5.6.2",
"dev": true,
"license": "MIT",
"dependencies": {
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.0",
"tslib": "^1.10.0"
"ionicons": "^5.5.1",
"tslib": "^2.1.0"
},
"devDependencies": {
"@jest/core": "^26.6.3",
@ -8255,7 +8255,7 @@
"clean-css-cli": "^4.1.11",
"domino": "^2.1.6",
"fs-extra": "^9.0.1",
"ionicons": "^5.5.0",
"ionicons": "^5.5.1",
"jest": "^26.4.1",
"jest-cli": "^26.4.1",
"np": "^6.4.0",
@ -8266,7 +8266,7 @@
"stylelint": "^13.6.1",
"stylelint-order": "^4.1.0",
"swiper": "5.4.1",
"tslib": "^1.10.0",
"tslib": "^2.1.0",
"tslint": "^6.1.3",
"tslint-ionic-rules": "0.0.21",
"tslint-react": "^5.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/vue-router",
"version": "5.6.0",
"version": "5.6.3",
"description": "Vue Router integration for @ionic/vue",
"scripts": {
"test.spec": "jest",

View File

@ -23,7 +23,31 @@ export const createViewStacks = (router: Router) => {
}
const findViewItemByRouteInfo = (routeInfo: RouteInfo, outletId?: number) => {
return findViewItemByPath(routeInfo.pathname, outletId, false);
let viewItem = findViewItemByPath(routeInfo.pathname, outletId, false);
/**
* Given a route such as /path/:id,
* going from /page/1 to /home
* to /page/2 will cause the same
* view item from /page/1 to match
* for /page/2 so we need to make
* sure any params get updated.
* Not normally an issue for accessing
* the params via useRouter from vue-router,
* but when passing params as props not doing
* this would cause the old props to show up.
*/
if (viewItem && viewItem.params !== routeInfo.params) {
/**
* Clear the props function result
* as the value may have changed due
* to different props.
*/
delete viewItem.vueComponentData.propsFunctionResult;
viewItem.params = routeInfo.params;
}
return viewItem;
}
const findLeavingViewItemByRouteInfo = (routeInfo: RouteInfo, outletId?: number, mustBeIonRoute: boolean = true) => {