@umijs/renderer-react 4.0.23 → 4.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/link.js CHANGED
@@ -1,15 +1,20 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["prefetch"];
2
4
  import React from 'react';
3
5
  import { Link } from 'react-router-dom';
4
6
  import { useAppData } from "./appContext";
5
7
  export function LinkWithPrefetch(props) {
8
+ var prefetch = props.prefetch,
9
+ linkProps = _objectWithoutProperties(props, _excluded);
10
+
6
11
  var appData = useAppData();
7
12
  var to = typeof props.to === 'string' ? props.to : props.to.pathname;
8
13
  return /*#__PURE__*/React.createElement(Link, _extends({
9
14
  onMouseEnter: function onMouseEnter() {
10
15
  var _appData$preloadRoute;
11
16
 
12
- return props.prefetch && to && ((_appData$preloadRoute = appData.preloadRoute) === null || _appData$preloadRoute === void 0 ? void 0 : _appData$preloadRoute.call(appData, to));
17
+ return prefetch && to && ((_appData$preloadRoute = appData.preloadRoute) === null || _appData$preloadRoute === void 0 ? void 0 : _appData$preloadRoute.call(appData, to));
13
18
  }
14
- }, props), props.children);
19
+ }, linkProps), props.children);
15
20
  }
package/dist/routes.js CHANGED
@@ -34,8 +34,8 @@ export function createClientRoutes(opts) {
34
34
  });
35
35
 
36
36
  if (children.length > 0) {
37
- route.children = children; // 兼容低版本的layout,
38
- // layout 4 以下 要使用 routes, 不然菜单会消失
37
+ route.children = children; // TODO: remove me
38
+ // compatible with @ant-design/pro-layout
39
39
 
40
40
  route.routes = children;
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/renderer-react",
3
- "version": "4.0.23",
3
+ "version": "4.0.25",
4
4
  "description": "@umijs/renderer-react",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/renderer-react#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",