ztxkutils 2.8.13 → 2.8.14

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.
@@ -21,6 +21,7 @@ var _pushTarget = [
21
21
  */
22
22
  function useHistory(routeBasename) {
23
23
  var history = useHistory$1();
24
+ var historyPush = history.push;
24
25
  history.push = function (path, state, target) {
25
26
  var _a, _b;
26
27
  // 代理react router dom 的push方法
@@ -29,14 +30,14 @@ function useHistory(routeBasename) {
29
30
  }
30
31
  // 如果没有传入target,那么还是使用原生的push方法
31
32
  if (!target) {
32
- history.push(path, state);
33
+ historyPush(path, state);
33
34
  }
34
35
  else {
35
36
  // 如果是需要在无框架下,外链打开
36
37
  if (target === '_blank_noframe' &&
37
38
  ((_a = window.location.href) === null || _a === void 0 ? void 0 : _a.indexOf(WORKFLOW_HIDEFRAME_KEY)) !== -1) {
38
39
  // 如果不是在隐藏框架内跳转,那么直接内部打开
39
- history.push(path, state);
40
+ historyPush(path, state);
40
41
  return;
41
42
  }
42
43
  if (target === '_blank_close' &&
@@ -45,7 +46,7 @@ function useHistory(routeBasename) {
45
46
  return;
46
47
  }
47
48
  if (target === '_blank_close') {
48
- history.push(path, state);
49
+ historyPush(path, state);
49
50
  return;
50
51
  }
51
52
  if (target === '_blank' ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.8.13",
3
+ "version": "2.8.14",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",