Vue jumps to this page and reports an error

A button is bound to a method. The method is to jump to a route address. When the trigger method has been clicked to the route, click the button again. The console will report an error and will not affect the project operation

 

  Solution:

if(this.$route.path  == ‘/ bindingmodifica/newpassword’){

             return  ”

}else{

             this.$router.push(‘/bindingmodifica/newpassword’)

}

 

Judge whether the route is changed, and jump when it is not

Similar Posts: