diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index 32207d5dc..5d7253c36 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -42,8 +42,11 @@ export default defineComponent({ }, watch: { - $route(to, from) { - this.canBack = (window.history.length > 0 && !['index'].includes(to.name)); + $route: { + handler(to, from) { + this.canBack = (window.history.length > 0 && !['index'].includes(to.name)); + }, + immediate: true }, },