How to solve the problem that the address of vue router routing hook does not match with window location href

before page jump: /
after page jump: / login

not using timer: accessing window location href in after each is before jumping /

use timer: accessing window location href in after each is / login after jump

May.13,2022

what do you do with window location href? the routing information is all in $route


.

Route jump is asynchronous, use

this.$nextTick(() => {
//  href
})
Menu