{"action":"opened","issue":{"url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/2154","repository_url":"https://api.github.com/repos/ant-design/ant-design-pro","labels_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/2154/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/2154/comments","events_url":"https://api.github.com/repos/ant-design/ant-design-pro/issues/2154/events","html_url":"https://github.com/ant-design/ant-design-pro/issues/2154","id":356714084,"node_id":"MDU6SXNzdWUzNTY3MTQwODQ=","number":2154,"title":"升级2.0后，原Switch方式 变更为 this.props.children 参数怎么往下传","user":{"login":"panshiyu","id":18595177,"node_id":"MDQ6VXNlcjE4NTk1MTc3","avatar_url":"https://avatars1.githubusercontent.com/u/18595177?v=4","gravatar_id":"","url":"https://api.github.com/users/panshiyu","html_url":"https://github.com/panshiyu","followers_url":"https://api.github.com/users/panshiyu/followers","following_url":"https://api.github.com/users/panshiyu/following{/other_user}","gists_url":"https://api.github.com/users/panshiyu/gists{/gist_id}","starred_url":"https://api.github.com/users/panshiyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panshiyu/subscriptions","organizations_url":"https://api.github.com/users/panshiyu/orgs","repos_url":"https://api.github.com/users/panshiyu/repos","events_url":"https://api.github.com/users/panshiyu/events{/privacy}","received_events_url":"https://api.github.com/users/panshiyu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-04T08:56:37Z","updated_at":"2018-09-04T08:56:37Z","closed_at":null,"author_association":"NONE","body":"原方案父组件 /list/search\r\n`<PageHeaderLayout >\r\n          <Switch>\r\n            {getRoutes(match.path, routerData).map(item => {\r\n              return (\r\n                <AuthorizedRoute\r\n                  key={item.key}\r\n                  path={item.path}\r\n                  component={item.component}\r\n                  exact={item.exact}\r\n                  authority={item.authority}\r\n                  redirectPath=\"/exception/403\"\r\n                  参数1=\"\"\r\n                  参数2=\"\"\r\n                />\r\n              );\r\n            })}\r\n          </Switch>\r\n        </PageHeaderLayout>`\r\n\r\n\r\n现改为Pro 2.0 方案后 父组件 /list/search\r\n`<PageHeaderLayout>\r\n          {children}\r\n</PageHeaderLayout>`\r\n\r\n对应路由参考\r\n`   {\r\n            path: '/list/search',\r\n            name: 'searchlist',\r\n            component: './List/List',\r\n            routes: [\r\n              {\r\n                path: '/list/search/articles',\r\n                name: 'articles',\r\n                component: './List/Articles',\r\n              }\r\n            ],\r\n          }`\r\n\r\n\r\n原来父组件的 参数1，参数2  要如何 传到子组件，React.cloneElement 方法已尝试，路由后，并非在colone的那个子组件上，而是在children.props, 请问有提供什么方法可以下传吗？\r\n\r\n"}}
{"actor":{"display_login":"panshiyu"}}