两层路由:
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) {},
}],
}
]
如果子路由里面再设置子路由该怎么设置呢?
13 回答12.9k 阅读
7 回答2.1k 阅读
3 回答1.3k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
6 回答942 阅读✓ 已解决
4 回答1.6k 阅读
6 回答1.1k 阅读
https://github.com/zuiidea/an... 参考一下。。
或者
首先
path: '/',
getChildRoutes(location, callback) {
然后,嵌套的路由
module.exports = {
}