@esmx/router 3.0.0-rc.69 → 3.0.0-rc.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/router.mjs +7 -1
- package/package.json +2 -2
- package/src/router.ts +7 -4
package/dist/router.mjs
CHANGED
|
@@ -259,7 +259,13 @@ export class Router {
|
|
|
259
259
|
});
|
|
260
260
|
await router.replace(toInput);
|
|
261
261
|
router.afterEach((to, from) => {
|
|
262
|
-
if (layerOptions.shouldClose &&
|
|
262
|
+
if (layerOptions.shouldClose && ![
|
|
263
|
+
RouteType.pushWindow,
|
|
264
|
+
RouteType.replaceWindow,
|
|
265
|
+
RouteType.replace,
|
|
266
|
+
RouteType.restartApp,
|
|
267
|
+
RouteType.pushLayer
|
|
268
|
+
].includes(to.type)) {
|
|
263
269
|
const result = layerOptions.shouldClose(to, from, router);
|
|
264
270
|
if (result === true) {
|
|
265
271
|
router.destroy();
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"unbuild": "3.6.0",
|
|
40
40
|
"vitest": "3.2.4"
|
|
41
41
|
},
|
|
42
|
-
"version": "3.0.0-rc.
|
|
42
|
+
"version": "3.0.0-rc.70",
|
|
43
43
|
"type": "module",
|
|
44
44
|
"private": false,
|
|
45
45
|
"exports": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"template",
|
|
59
59
|
"public"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "9aa452ae73e450d285e4ddbd35a4ac8b53427d95"
|
|
62
62
|
}
|
package/src/router.ts
CHANGED
|
@@ -294,10 +294,13 @@ export class Router {
|
|
|
294
294
|
router.afterEach((to, from) => {
|
|
295
295
|
if (
|
|
296
296
|
layerOptions.shouldClose &&
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
![
|
|
298
|
+
RouteType.pushWindow,
|
|
299
|
+
RouteType.replaceWindow,
|
|
300
|
+
RouteType.replace,
|
|
301
|
+
RouteType.restartApp,
|
|
302
|
+
RouteType.pushLayer
|
|
303
|
+
].includes(to.type)
|
|
301
304
|
) {
|
|
302
305
|
const result = layerOptions.shouldClose(to, from, router);
|
|
303
306
|
if (result === true) {
|