ztxkutils 2.8.11 → 2.8.12

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.
@@ -19,6 +19,7 @@ var _pushTarget = [
19
19
  function useHistory(routeBasename) {
20
20
  var history = useHistory$1();
21
21
  return __assign(__assign({}, history), { push: function (path, state, target) {
22
+ var _a, _b;
22
23
  // 代理react router dom 的push方法
23
24
  if (typeof state === 'string' && _pushTarget.includes(state)) {
24
25
  target = state;
@@ -30,13 +31,13 @@ function useHistory(routeBasename) {
30
31
  else {
31
32
  // 如果是需要在无框架下,外链打开
32
33
  if (target === '_blank_noframe' &&
33
- path.indexOf(WORKFLOW_HIDEFRAME_KEY) !== -1) {
34
+ ((_a = window.location.href) === null || _a === void 0 ? void 0 : _a.indexOf(WORKFLOW_HIDEFRAME_KEY)) !== -1) {
34
35
  // 如果不是在隐藏框架内跳转,那么直接内部打开
35
36
  history.push(path, state);
36
37
  return;
37
38
  }
38
39
  if (target === '_blank_close' &&
39
- path.indexOf(WORKFLOW_HIDEFRAME_KEY) !== -1) {
40
+ ((_b = window.location.href) === null || _b === void 0 ? void 0 : _b.indexOf(WORKFLOW_HIDEFRAME_KEY)) !== -1) {
40
41
  window.close();
41
42
  return;
42
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.8.11",
3
+ "version": "2.8.12",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",