两层路由:
const routes = [
{
path: '/dashboard',//第一层路由
component: App,
getIndexRoute(nextState, cb) {},
childRoutes: [{//子路由
path: 'product',
getComponent(nextState, cb) {},
}],
}
]
如果子路由里面再设置子路由该怎么设置呢?
两层路由:
const routes = [
{
path: '/dashboard',//第一层路由
component: App,
getIndexRoute(nextState, cb) {},
childRoutes: [{//子路由
path: 'product',
getComponent(nextState, cb) {},
}],
}
]
如果子路由里面再设置子路由该怎么设置呢?
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
3 回答1.8k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
https://github.com/zuiidea/an... 参考一下。。
或者
首先
path: '/',
getChildRoutes(location, callback) {
然后,嵌套的路由
module.exports = {
}