vue页面创建时获取所有路由文件
使用 this.$router.options.routesthis.$router 返回的事VueRouter这个对象VueRouter {app: Vue, apps: Array(1), options: {…}, beforeHooks: Array(1), resolveHooks: Array(0), …}afterHooks: [ƒ]app: Vue {_uid: ...
·
使用 this.$router.options.routes
this.$router 返回的事VueRouter这个对象
VueRouter {app: Vue, apps: Array(1), options: {…}, beforeHooks: Array(1), resolveHooks: Array(0), …}
afterHooks: [ƒ]
app: Vue {_uid: 2, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}
apps: [Vue]
beforeHooks: [ƒ]
fallback: false
history: HashHistory {router: VueRouter, base: "", current: {…}, pending: null, ready: true, …}
matcher: {match: ƒ, addRoutes: ƒ}
mode: "hash"
options: {scrollBehavior: ƒ, routes: Array(13)}
resolveHooks: []
currentRoute: (...)
__proto__: Object
更多推荐
已为社区贡献2条内容
所有评论(0)