-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed as not planned
Description
in App.vue
route change watch not trgger
watch(()=> router.currentRoute.path, (val) => {\
console.log('router.currentRoute.path not trigger', val);
}, {
immediate: true
});
why oldValue === val
watch(()=> route, (val, oldValue) => {
console.log('route.path not trigger', val, oldValue);
console.log('why is true', JSON.stringify(val) === JSON.stringify(oldValue));
}, {
immediate: true,
deep: true
});
home.vue
onDeactivated(() => {
console.log('onDeactivated why after onBeforeRouteLeave');
})
onBeforeRouteLeave((_, from, next) => {
console.log('onBeforeRouteLeave');
next()
})
why onDeactivated after onBeforeRouteLeave
repo link: https://github.com/Miofly/demo-issue-template/tree/vue2-template
Metadata
Metadata
Assignees
Labels
No labels