I use _ self.$router.options.routes to get the routing table, and then I want to traverse the word routes in the table, but the children doesn"t actually show it.
var localRouter = _ self.$router.options.routes
console.dir (localRouter) prints as follows:
and then traverse this table
for (var q = 0 Q < localRouter.length;qPP) {
console.dir(localRouter[q].children)
}
print out the undefined
break point to see that localRouter [Q] has only two attributes, path and component
, that is, why the children attribute is missing when traversing the route obtained by _ self.$router.options.routes.