ztxkutils 2.8.9 → 2.8.10
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 +10 -1
- package/package.json +1 -1
package/dist/useHistory.js
CHANGED
@@ -6,7 +6,7 @@ import { WORKFLOW_HIDEFRAME_KEY } from './constants.js';
|
|
6
6
|
|
7
7
|
var ROUTER_FILTER_RULES_KEY = '__symbol__alias__session';
|
8
8
|
var ROUTER_FILTER_RULES_VALUE = 'zQzNDkwNjg2MjYwMjI4MDk3LDEzNDU5Nzg1';
|
9
|
-
var _pushTarget = ['_blank', '_blank_noframe'];
|
9
|
+
var _pushTarget = ['_blank', '_blank_noframe', '_blank_close'];
|
10
10
|
/**
|
11
11
|
* @author 陈亚雄
|
12
12
|
* @description 代理路由的push方法,可以用window.open的方式跳转页面
|
@@ -30,6 +30,15 @@ function useHistory(routeBasename) {
|
|
30
30
|
history.push(path, state);
|
31
31
|
return;
|
32
32
|
}
|
33
|
+
if (target === '_blank_close' &&
|
34
|
+
path.indexOf(WORKFLOW_HIDEFRAME_KEY) !== -1) {
|
35
|
+
window.close();
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
if (target === '_blank_close') {
|
39
|
+
history.push(path, state);
|
40
|
+
return;
|
41
|
+
}
|
33
42
|
if (target === '_blank' || target === '_blank_noframe') {
|
34
43
|
// state 没法处理,请不要传递state,可以拼接再地址栏参数后面
|
35
44
|
// 新窗口打开的页面 都不需要菜单
|