Refaktoring
This commit is contained in:
+4
-2
@@ -27,8 +27,10 @@ export default route(function (/* { store, ssrContext } */) {
|
||||
history: createHistory(process.env.VUE_ROUTER_BASE)
|
||||
})
|
||||
|
||||
Router.afterEach(async (to) => {
|
||||
useAppStore().resetAfterRouteChange();
|
||||
Router.afterEach(async (to, from) => {
|
||||
if (from.name !== to.name) {
|
||||
useAppStore().resetAfterRouteChange();
|
||||
}
|
||||
});
|
||||
|
||||
return Router
|
||||
|
||||
Reference in New Issue
Block a user