Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does vue realize the jump between the pages of this project?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

The knowledge of this article "vue how to jump between pages of this project" is not quite understood by most people, so the editor summarizes the following content to you, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "vue how to achieve the jump between pages of this project" article.

The jump mode between pages of this project is added in the template template

Button button to join the click event

Add the test question and write the path func () {this.$router.push ({path: "add-question"});} in methods to modify the routing file.

Add the local interface of all jumps

Vue solves the problem of page jump

Problem description: two different pages, jump with parameters

Solution.

1. Create a jump method for the page that needs to jump.

/ / @ click= "PageJump (scope.row)" / / is as follows: click to jump to PageJump (row) {this.$router.push ({path: "/ page / specific / path /" + row.id, params: {id: row.id}});}

2. Configure routing (usually router.js files)

{path:'/ file directory path', component: Layout, hidden: true, children: [{path: 'PageJump/data/:OtherId (\\ d +)', component: (resolve) = > require (['@ / views/ page path / index'], resolve), name: 'PageJump', meta: {title:' page to be redirected' Icon:''}}]}

According to this, you can basically complete the page jump with parameters.

The above is about the content of the article "how to jump between the pages of this project by vue". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report