there are now A, A1, B, B1. An and B are first-level routes, and A1 and B1 are child routes, respectively. Now when you jump from A1 to B1, the order should be:
Bcreated--> B1 created--> B1 mounted--> B mounted
but the order on my side is:
Bcreated--> B1 created--> B1 mounted--> B mounted--> B1 created--> B1 mounted
B1 this page has been executed twice. The
code is as follows:
mVueRouter = new VueRouter ({
routes: [
{
path: "/",
components: mComponents,
beforeEnter: function(to, from, next) {
if(!mComponents.viewQuote) {
mComponents.viewQuote = require("./quote.js");
}
next();
},
children:[
{
path: "",
component: require("../main/new-quote.js")
},
{
path: "detail",
name:"detail",
component: require("../market/new-detail.js")
}
]
},
{
path: "/more",
components: mComponents,
beforeEnter: function(to, from, next) {
if(!mComponents.viewMore) {
mComponents.viewMore = require("./more.js");
}
next();
},
children:[
{
path: "",
component: require("../main/new-more.js")
},
{
path: "login",
component: require("../user/new-login.js")
}
]
}
]
});
which god can come out and give me some advice? no, no, no. It has been going on for a long time