当前位置:网站首页>Unable to return to the default page after page Jump

Unable to return to the default page after page Jump

2022-06-11 00:34:00 Lantau-·

The problem record : After the default page jumps to the page The browser's own return arrow is gone That is, you cannot return .
 Insert picture description here

Nature of the problem : Routing jump replace and push The difference between

helpCenter(){
    
      this.$router.replace('/hc/index')
    },

difference :this.router.push Jump to the designated url route , And think history Add a record to the stack , Click back to return to the previous page this.router.push Jump to the designated url route , And think history Add a record to the stack , Click back to return to the previous page
this.router.replace Jump to the designated url route , however history There are no records in the stack , Click back to jump to the previous page ( That is, it directly replaces the current page )

Problem solving : So the replace Switch to push Just fine

helpCenter(){
    
      this.$router.push('/hc/index')
    },
原网站

版权声明
本文为[Lantau-·]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206102311492106.html