Skip to content

Commit

Permalink
Support Dynamic Routing
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Nov 7, 2019
1 parent 4adab32 commit 5175a22
Show file tree
Hide file tree
Showing 3 changed files with 12,063 additions and 755 deletions.
2 changes: 1 addition & 1 deletion packages/umi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"is-windows": "1.0.2",
"lodash": "4.17.13",
"react-loadable": "5.5.0",
"react-router-cache-route": "^1.6.0",
"react-router-cache-route": "1.8.3",
"resolve-cwd": "3.0.0",
"semver": "6.1.1",
"signale": "1.4.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/umi/src/renderRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ const RouteWithProps = ({
location,
sensitive,
keepAlive,
multiple,
...rest
}) => {
if (keepAlive) {
return (
<CacheRoute
when="always"
cacheKey={path}
multiple={multiple}
path={path}
exact={exact}
strict={strict}
Expand Down Expand Up @@ -171,6 +173,7 @@ export default function renderRoutes(routes, extraProps = {}, switchProps = {})
strict={route.strict}
sensitive={route.sensitive}
keepAlive={route.keepAlive}
multiple={route.multiple || false}
render={props => {
const childRoutes = renderRoutes(route.routes, extraProps, {
location: props.location,
Expand Down
Loading

0 comments on commit 5175a22

Please sign in to comment.