CodePudding user response:
/* package routing, cached page */
CodePudding user response:
BeforeRouteLeave (to, from, next) {This. Global. SaveQuery (this, this. $route. The path).
next();
},
CodePudding user response:
Const saveQuery=function (app, path) {Let routeKey=getRouteKey (path);
If (app. Query) {
Let the key="q_" + routeKey;
SetObj (key, app. Query);
}
If (app. Page) {
Let the key="page_" + routeKey;
Store. The set (key, app. Page);
}
}
Encapsulates a js