简体   繁体   English

我可以从我的 nuxt.js 项目中获得 - 我所有潜在路线的列表吗?

[英]Can I get from my nuxt.js project - list of all my potential routes?


Can I get from my nuxt.js project我可以从我的 nuxt.js 项目中获得
- list of all my potential routes? - 我所有潜在路线的清单?
(all of my URL) (我所有的网址)

Your nuxt app will create a router which will include an Object with all routes available to your app.您的 nuxt 应用程序将创建一个路由器,其中将包括一个 Object 以及您的应用程序可用的所有路由。 You can find the created router in your .nuxt folder if I am not mistaken.如果我没记错的话,您可以在.nuxt文件夹中找到创建的路由器。

Also, in your nuxt Config you have the router key, which allows you to customize the behavior of vue-router .此外,在您的 nuxt 配置中,您有router密钥,它允许您自定义vue-router的行为。 Read more here: Vue-Router Documentation在此处阅读更多信息: Vue-Router 文档

You can access the router in components under this.$router .您可以在this.$router下的组件中访问路由器。 All generated routes are accessible at this.$router.options.routes .所有生成的路由都可以在this.$router.options.routes

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM