ztxkutils 2.10.66-57 → 2.10.66-58
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/useHistory.js +11 -11
- package/package.json +1 -1
package/dist/useHistory.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { d as __spreadArray } from './tslib.es6-35653116.js';
|
|
2
1
|
import { useRef, useEffect } from 'react';
|
|
3
2
|
import { useHistory as useHistory$1 } from 'react-router-dom';
|
|
4
3
|
import { i as isQiankun } from './authority-7a91cb9f.js';
|
|
5
4
|
import { WORKFLOW_HIDEFRAME_KEY } from './constants.js';
|
|
6
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @author 陈亚雄
|
|
8
|
+
* @description 路由跳转方法
|
|
9
|
+
*/
|
|
7
10
|
var ROUTER_FILTER_RULES_KEY = '__symbol__alias__session';
|
|
8
11
|
var ROUTER_FILTER_RULES_VALUE = 'zQzNDkwNjg2MjYwMjI4MDk3LDEzNDU5Nzg1';
|
|
9
12
|
var _pushTarget = [
|
|
@@ -20,16 +23,13 @@ var _pushTarget = [
|
|
|
20
23
|
*/
|
|
21
24
|
function useHistory(routeBasename, options) {
|
|
22
25
|
var history = useHistory$1();
|
|
23
|
-
var historyPush =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(_a = options === null || options === void 0 ? void 0 : options.pushCallback) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([options], args));
|
|
31
|
-
history.push.apply(history, args);
|
|
32
|
-
};
|
|
26
|
+
var historyPush = history.push;
|
|
27
|
+
// const _historyPush = history.push;
|
|
28
|
+
// const historyPush = (...args: any[]) => {
|
|
29
|
+
// // 调用回调函数
|
|
30
|
+
// options?.pushCallback?.(...args);
|
|
31
|
+
// _historyPush(...args);
|
|
32
|
+
// };
|
|
33
33
|
history.push = function (path, state, target) {
|
|
34
34
|
var _a, _b;
|
|
35
35
|
// 代理react router dom 的push方法
|