Home  >  Article  >  Web Front-end  >  Why is the vue homepage rendered twice? Causes and solutions introduced

Why is the vue homepage rendered twice? Causes and solutions introduced

青灯夜游
青灯夜游forward
2020-11-12 17:49:252819browse

The followingvue.js column will introduce to you the reasons and solutions for the vue homepage to be rendered twice. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Why is the vue homepage rendered twice? Causes and solutions introduced

Now I am using vue to make some single-page applications, and I have encountered some problems. For example, when I render the homepage, it will be rendered twice. I checked the reason. , it turns out that the format written when writing the route is wrong:

In this case, the exam_list page is loaded initially, but it will be loaded twice,

The solution is to take out the url of the homepage separately and write it into the route, and then redirect the route initially:

Related recommendations:

2020 Summary of front-end vue interview questions (with answers)

vue tutorial recommendation: The latest 5 vue.js video tutorials in 2020 Select

For more programming-related knowledge, please visit: Programming Learning Website! !

The above is the detailed content of Why is the vue homepage rendered twice? Causes and solutions introduced. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete