Article From:https://segmentfault.com/q/1010000011702157
Question:

1 The current page URL is

http://localhost:8081/#/home/index/home

By clicking a button on the current page to achieve the jump of the page, jump to the URL of the page.

http://localhost:8081/#/home/client/Index

2 My code:

this.$router.push(''./home/client/Index)

3 But after clicking the page, the URL of the page becomes

http://localhost:8081/#/home/index/home/client/Index

Routing is simply added to the back and cannot be achieved.

How can I use vue-router to page Jump?

Answer 0:

this.$router.push({path:’/home/client/Index’})

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *