antd-management-fast-framework 1.12.40 → 1.12.41
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/es/utils/Authorized.js +5 -3
- package/es/utils/authority.js +4 -2
- package/es/utils/core.d.ts +1 -0
- package/es/utils/core.js +5 -0
- package/es/utils/developAssist.d.ts +10 -0
- package/es/utils/developAssist.js +55 -0
- package/es/utils/globalStorageAssist.js +16 -14
- package/es/utils/localStorageAssist.d.ts +47 -0
- package/es/utils/localStorageAssist.js +114 -0
- package/es/utils/mediaDefault.d.ts +1 -1
- package/es/utils/mediaDefault.js +2 -2
- package/es/utils/sessionStorageAssist.d.ts +47 -0
- package/es/utils/sessionStorageAssist.js +114 -0
- package/es/utils/tools.d.ts +0 -77
- package/es/utils/tools.js +5 -223
- package/package.json +2 -2
package/es/utils/Authorized.js
CHANGED
|
@@ -9,14 +9,16 @@ exports.reloadAuthorized = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _Authorized = _interopRequireDefault(require("../customComponents/Authorized"));
|
|
11
11
|
|
|
12
|
+
var _core = require("./core");
|
|
13
|
+
|
|
12
14
|
var _globalStorageAssist = require("./globalStorageAssist");
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var _localStorageAssist = require("./localStorageAssist");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
function getAuthority(str) {
|
|
19
|
-
var authorityString = typeof str === 'undefined' ? (0,
|
|
21
|
+
var authorityString = typeof str === 'undefined' ? (0, _localStorageAssist.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection) : str;
|
|
20
22
|
var authority;
|
|
21
23
|
|
|
22
24
|
try {
|
|
@@ -31,7 +33,7 @@ function getAuthority(str) {
|
|
|
31
33
|
return [authority];
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
if ((0,
|
|
36
|
+
if ((0, _core.isArray)(authority)) {
|
|
35
37
|
return authority;
|
|
36
38
|
}
|
|
37
39
|
|
package/es/utils/authority.js
CHANGED
|
@@ -13,6 +13,8 @@ var _cacheAssist = require("./cacheAssist");
|
|
|
13
13
|
|
|
14
14
|
var _globalStorageAssist = require("./globalStorageAssist");
|
|
15
15
|
|
|
16
|
+
var _localStorageAssist = require("./localStorageAssist");
|
|
17
|
+
|
|
16
18
|
var _tools = require("./tools");
|
|
17
19
|
|
|
18
20
|
var authorityCollectionCache = 'authorityCollectionCache';
|
|
@@ -34,7 +36,7 @@ function getAllAuthorityCore() {
|
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
var authorityString = (0,
|
|
39
|
+
var authorityString = (0, _localStorageAssist.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection);
|
|
38
40
|
var authority;
|
|
39
41
|
|
|
40
42
|
try {
|
|
@@ -250,7 +252,7 @@ function checkHasAuthority(auth) {
|
|
|
250
252
|
|
|
251
253
|
function setAuthority(authority) {
|
|
252
254
|
var authorityCollection = typeof authority === 'string' ? [authority] : authority;
|
|
253
|
-
(0,
|
|
255
|
+
(0, _localStorageAssist.saveJsonToLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection, authorityCollection);
|
|
254
256
|
(0, _cacheAssist.flushAllCache)(); // auto reload
|
|
255
257
|
|
|
256
258
|
(0, _Authorized.reloadAuthorized)();
|
package/es/utils/core.d.ts
CHANGED
package/es/utils/core.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.empty = empty;
|
|
7
|
+
exports.isArray = isArray;
|
|
7
8
|
exports.isBrowser = isBrowser;
|
|
8
9
|
exports.replace = replace;
|
|
9
10
|
exports.stringIsNullOrWhiteSpace = stringIsNullOrWhiteSpace;
|
|
@@ -11,6 +12,10 @@ exports.trim = trim;
|
|
|
11
12
|
|
|
12
13
|
var _lodash = require("lodash");
|
|
13
14
|
|
|
15
|
+
function isArray(value) {
|
|
16
|
+
return Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
function replace(source, pattern, replacement) {
|
|
15
20
|
return (0, _lodash.replace)(source, pattern, replacement);
|
|
16
21
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.empty = empty;
|
|
7
|
+
exports.getNearestLocalhostNotifyCache = getNearestLocalhostNotifyCache;
|
|
8
|
+
exports.removeNearestLocalhostNotifyCache = removeNearestLocalhostNotifyCache;
|
|
9
|
+
exports.setNearestLocalhostNotifyCache = setNearestLocalhostNotifyCache;
|
|
10
|
+
|
|
11
|
+
var _localStorageAssist = require("./localStorageAssist");
|
|
12
|
+
|
|
13
|
+
var storageKeyCollection = {
|
|
14
|
+
nearestLocalhostNotify: 'nearestLocalhostNotify'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function getNearestLocalhostNotifyCache() {
|
|
18
|
+
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
19
|
+
var d = (0, _localStorageAssist.getJsonFromLocalStorage)(key);
|
|
20
|
+
|
|
21
|
+
if ((d || null) == null) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if ((d.nearestTime || null) == null) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return d || null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function setNearestLocalhostNotifyCache() {
|
|
33
|
+
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
34
|
+
var now = parseInt(new Date().getTime() / 1000, 10);
|
|
35
|
+
var d = {
|
|
36
|
+
nearestTime: now
|
|
37
|
+
};
|
|
38
|
+
return (0, _localStorageAssist.saveJsonToLocalStorage)(key, d);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function removeNearestLocalhostNotifyCache() {
|
|
42
|
+
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
43
|
+
(0, _localStorageAssist.removeLocalStorage)(key);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 占位函数
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
function empty() {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
@@ -23,7 +23,9 @@ var _cacheAssist = require("./cacheAssist");
|
|
|
23
23
|
|
|
24
24
|
var _constants = require("./constants");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _core = require("./core");
|
|
27
|
+
|
|
28
|
+
var _localStorageAssist = require("./localStorageAssist");
|
|
27
29
|
|
|
28
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
31
|
|
|
@@ -41,7 +43,7 @@ exports.storageKeyCollection = storageKeyCollection;
|
|
|
41
43
|
|
|
42
44
|
function getNearestLocalhostNotifyCache() {
|
|
43
45
|
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
44
|
-
var d = (0,
|
|
46
|
+
var d = (0, _localStorageAssist.getJsonFromLocalStorage)(key);
|
|
45
47
|
|
|
46
48
|
if ((d || null) == null) {
|
|
47
49
|
return null;
|
|
@@ -60,12 +62,12 @@ function setNearestLocalhostNotifyCache() {
|
|
|
60
62
|
var d = {
|
|
61
63
|
nearestTime: now
|
|
62
64
|
};
|
|
63
|
-
return (0,
|
|
65
|
+
return (0, _localStorageAssist.saveJsonToLocalStorage)(key, d);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
function removeNearestLocalhostNotifyCache() {
|
|
67
69
|
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
68
|
-
(0,
|
|
70
|
+
(0, _localStorageAssist.removeLocalStorage)(key);
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
function getAccessWayCollectionCache() {
|
|
@@ -80,12 +82,12 @@ function getAccessWayCollectionCache() {
|
|
|
80
82
|
key: key
|
|
81
83
|
});
|
|
82
84
|
|
|
83
|
-
if ((0,
|
|
85
|
+
if ((0, _core.isArray)(result)) {
|
|
84
86
|
return result;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
var d = (0,
|
|
90
|
+
var d = (0, _localStorageAssist.getJsonFromLocalStorage)(key);
|
|
89
91
|
|
|
90
92
|
if ((d || null) == null) {
|
|
91
93
|
return _objectSpread({}, _constants.accessWaySpecialCollection || {});
|
|
@@ -101,7 +103,7 @@ function getAccessWayCollectionCache() {
|
|
|
101
103
|
|
|
102
104
|
function setAccessWayCollectionCache(o) {
|
|
103
105
|
var key = storageKeyCollection.accessWayCollection;
|
|
104
|
-
(0,
|
|
106
|
+
(0, _localStorageAssist.saveJsonToLocalStorage)(key, o || {});
|
|
105
107
|
}
|
|
106
108
|
/**
|
|
107
109
|
* 获取useParamsData缓存
|
|
@@ -113,7 +115,7 @@ function setAccessWayCollectionCache(o) {
|
|
|
113
115
|
|
|
114
116
|
|
|
115
117
|
function getParamsDataCache(key) {
|
|
116
|
-
var d = (0,
|
|
118
|
+
var d = (0, _localStorageAssist.getJsonFromLocalStorage)(key);
|
|
117
119
|
|
|
118
120
|
if ((d || null) == null) {
|
|
119
121
|
removeParamsDataCache(key);
|
|
@@ -149,7 +151,7 @@ function setParamsDataCache(key, o) {
|
|
|
149
151
|
useParamsData: o || null,
|
|
150
152
|
dataVersion: now
|
|
151
153
|
};
|
|
152
|
-
return (0,
|
|
154
|
+
return (0, _localStorageAssist.saveJsonToLocalStorage)(key, d);
|
|
153
155
|
}
|
|
154
156
|
/**
|
|
155
157
|
* 移除信息
|
|
@@ -161,7 +163,7 @@ function setParamsDataCache(key, o) {
|
|
|
161
163
|
|
|
162
164
|
|
|
163
165
|
function removeParamsDataCache(key) {
|
|
164
|
-
(0,
|
|
166
|
+
(0, _localStorageAssist.removeLocalStorage)(key);
|
|
165
167
|
}
|
|
166
168
|
/**
|
|
167
169
|
* 获取Token键名
|
|
@@ -186,7 +188,7 @@ function getTokenKeyName() {
|
|
|
186
188
|
|
|
187
189
|
function getToken() {
|
|
188
190
|
var key = storageKeyCollection.token;
|
|
189
|
-
return (0,
|
|
191
|
+
return (0, _localStorageAssist.getStringFromLocalStorage)(key);
|
|
190
192
|
}
|
|
191
193
|
/**
|
|
192
194
|
* Set Token
|
|
@@ -199,7 +201,7 @@ function getToken() {
|
|
|
199
201
|
|
|
200
202
|
function setToken(v) {
|
|
201
203
|
var key = storageKeyCollection.token;
|
|
202
|
-
return (0,
|
|
204
|
+
return (0, _localStorageAssist.saveStringToLocalStorage)(key, v);
|
|
203
205
|
}
|
|
204
206
|
/**
|
|
205
207
|
* 移除Token
|
|
@@ -212,7 +214,7 @@ function setToken(v) {
|
|
|
212
214
|
|
|
213
215
|
function removeToken() {
|
|
214
216
|
var key = storageKeyCollection.token;
|
|
215
|
-
return (0,
|
|
217
|
+
return (0, _localStorageAssist.removeLocalStorage)(key);
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
function getTokenObject() {
|
|
@@ -228,5 +230,5 @@ function getTokenObject() {
|
|
|
228
230
|
|
|
229
231
|
|
|
230
232
|
function clearCustomData() {
|
|
231
|
-
(0,
|
|
233
|
+
(0, _localStorageAssist.clearLocalStorage)();
|
|
232
234
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取LocalStorage数据
|
|
3
|
+
* @export
|
|
4
|
+
* @param {*} key
|
|
5
|
+
* @param {*} value
|
|
6
|
+
*/
|
|
7
|
+
export function getStringFromLocalStorage(key: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* 获取LocalStorage数据
|
|
10
|
+
* @export
|
|
11
|
+
* @param {*} key
|
|
12
|
+
* @param {*} value
|
|
13
|
+
*/
|
|
14
|
+
export function getJsonFromLocalStorage(key: any): any;
|
|
15
|
+
/**
|
|
16
|
+
* 存储本地数据
|
|
17
|
+
* @export
|
|
18
|
+
* @param {*} key
|
|
19
|
+
* @param {*} value
|
|
20
|
+
*/
|
|
21
|
+
export function saveStringToLocalStorage(key: any, value: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* 存储本地数据
|
|
24
|
+
* @export
|
|
25
|
+
* @param {*} key
|
|
26
|
+
* @param {*} value
|
|
27
|
+
*/
|
|
28
|
+
export function saveJsonToLocalStorage(key: any, json: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* 移除LocalStorage数据
|
|
31
|
+
* @export
|
|
32
|
+
* @param {*} key
|
|
33
|
+
*/
|
|
34
|
+
export function removeLocalStorage(key: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* 清空LocalStorage数据
|
|
37
|
+
* @export
|
|
38
|
+
* @param {*} key
|
|
39
|
+
*/
|
|
40
|
+
export function clearLocalStorage(): void;
|
|
41
|
+
/**
|
|
42
|
+
* 占位函数
|
|
43
|
+
*
|
|
44
|
+
* @export
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
export function empty(): {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearLocalStorage = clearLocalStorage;
|
|
7
|
+
exports.empty = empty;
|
|
8
|
+
exports.getJsonFromLocalStorage = getJsonFromLocalStorage;
|
|
9
|
+
exports.getStringFromLocalStorage = getStringFromLocalStorage;
|
|
10
|
+
exports.removeLocalStorage = removeLocalStorage;
|
|
11
|
+
exports.saveJsonToLocalStorage = saveJsonToLocalStorage;
|
|
12
|
+
exports.saveStringToLocalStorage = saveStringToLocalStorage;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 获取LocalStorage数据
|
|
16
|
+
* @export
|
|
17
|
+
* @param {*} key
|
|
18
|
+
* @param {*} value
|
|
19
|
+
*/
|
|
20
|
+
function getStringFromLocalStorage(key) {
|
|
21
|
+
var storage = window.localStorage;
|
|
22
|
+
var value = storage.getItem(key);
|
|
23
|
+
|
|
24
|
+
if (process.env.NODE_ENV === 'development') {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var decode = decodeBase64(value);
|
|
29
|
+
var v = encodeBase64(decode);
|
|
30
|
+
|
|
31
|
+
if (value !== v) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return decode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 获取LocalStorage数据
|
|
39
|
+
* @export
|
|
40
|
+
* @param {*} key
|
|
41
|
+
* @param {*} value
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
function getJsonFromLocalStorage(key) {
|
|
46
|
+
var jsonString = getStringFromLocalStorage(key);
|
|
47
|
+
|
|
48
|
+
if (jsonString) {
|
|
49
|
+
return JSON.parse(jsonString || '{}');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 存储本地数据
|
|
56
|
+
* @export
|
|
57
|
+
* @param {*} key
|
|
58
|
+
* @param {*} value
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
function saveStringToLocalStorage(key, value) {
|
|
63
|
+
var storage = window.localStorage;
|
|
64
|
+
|
|
65
|
+
if (process.env.NODE_ENV === 'development') {
|
|
66
|
+
storage.setItem(key, value);
|
|
67
|
+
} else {
|
|
68
|
+
storage.setItem(key, encodeBase64(value));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 存储本地数据
|
|
73
|
+
* @export
|
|
74
|
+
* @param {*} key
|
|
75
|
+
* @param {*} value
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
function saveJsonToLocalStorage(key, json) {
|
|
80
|
+
saveStringToLocalStorage(key, JSON.stringify(json || {}));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 移除LocalStorage数据
|
|
84
|
+
* @export
|
|
85
|
+
* @param {*} key
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
function removeLocalStorage(key) {
|
|
90
|
+
var storage = window.localStorage;
|
|
91
|
+
storage.removeItem(key);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 清空LocalStorage数据
|
|
95
|
+
* @export
|
|
96
|
+
* @param {*} key
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
function clearLocalStorage() {
|
|
101
|
+
var storage = window.localStorage;
|
|
102
|
+
storage.clear();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 占位函数
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
* @returns
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
function empty() {
|
|
113
|
+
return {};
|
|
114
|
+
}
|
package/es/utils/mediaDefault.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.empty = empty;
|
|
7
7
|
exports.emptyLogo = void 0;
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -19,6 +19,6 @@ var emptyLogo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqa
|
|
|
19
19
|
|
|
20
20
|
exports.emptyLogo = emptyLogo;
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function empty() {
|
|
23
23
|
return {};
|
|
24
24
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取SessionStorage数据
|
|
3
|
+
* @export
|
|
4
|
+
* @param {*} key
|
|
5
|
+
* @param {*} value
|
|
6
|
+
*/
|
|
7
|
+
export function getStringFromSessionStorage(key: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* 获取SessionStorage数据
|
|
10
|
+
* @export
|
|
11
|
+
* @param {*} key
|
|
12
|
+
* @param {*} value
|
|
13
|
+
*/
|
|
14
|
+
export function getJsonFromSessionStorage(key: any): any;
|
|
15
|
+
/**
|
|
16
|
+
* 存储SessionStorage数据
|
|
17
|
+
* @export
|
|
18
|
+
* @param {*} key
|
|
19
|
+
* @param {*} value
|
|
20
|
+
*/
|
|
21
|
+
export function saveStringToSessionStorage(key: any, value: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* 存储SessionStorage数据
|
|
24
|
+
* @export
|
|
25
|
+
* @param {*} key
|
|
26
|
+
* @param {*} value
|
|
27
|
+
*/
|
|
28
|
+
export function saveJsonToSessionStorage(key: any, json: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* 移除SessionStorage数据
|
|
31
|
+
* @export
|
|
32
|
+
* @param {*} key
|
|
33
|
+
*/
|
|
34
|
+
export function removeSessionStorage(key: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* 清空SessionStorage数据
|
|
37
|
+
* @export
|
|
38
|
+
* @param {*} key
|
|
39
|
+
*/
|
|
40
|
+
export function clearSessionStorage(): void;
|
|
41
|
+
/**
|
|
42
|
+
* 占位函数
|
|
43
|
+
*
|
|
44
|
+
* @export
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
export function empty(): {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearSessionStorage = clearSessionStorage;
|
|
7
|
+
exports.empty = empty;
|
|
8
|
+
exports.getJsonFromSessionStorage = getJsonFromSessionStorage;
|
|
9
|
+
exports.getStringFromSessionStorage = getStringFromSessionStorage;
|
|
10
|
+
exports.removeSessionStorage = removeSessionStorage;
|
|
11
|
+
exports.saveJsonToSessionStorage = saveJsonToSessionStorage;
|
|
12
|
+
exports.saveStringToSessionStorage = saveStringToSessionStorage;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 获取SessionStorage数据
|
|
16
|
+
* @export
|
|
17
|
+
* @param {*} key
|
|
18
|
+
* @param {*} value
|
|
19
|
+
*/
|
|
20
|
+
function getStringFromSessionStorage(key) {
|
|
21
|
+
var storage = window.sessionStorage;
|
|
22
|
+
var value = storage.getItem(key);
|
|
23
|
+
|
|
24
|
+
if (process.env.NODE_ENV === 'development') {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var decode = decodeBase64(value);
|
|
29
|
+
var v = encodeBase64(decode);
|
|
30
|
+
|
|
31
|
+
if (value !== v) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return decode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 获取SessionStorage数据
|
|
39
|
+
* @export
|
|
40
|
+
* @param {*} key
|
|
41
|
+
* @param {*} value
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
function getJsonFromSessionStorage(key) {
|
|
46
|
+
var jsonString = getStringFromSessionStorage(key);
|
|
47
|
+
|
|
48
|
+
if (jsonString) {
|
|
49
|
+
return JSON.parse(jsonString || '{}');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 存储SessionStorage数据
|
|
56
|
+
* @export
|
|
57
|
+
* @param {*} key
|
|
58
|
+
* @param {*} value
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
function saveStringToSessionStorage(key, value) {
|
|
63
|
+
var storage = window.sessionStorage;
|
|
64
|
+
|
|
65
|
+
if (process.env.NODE_ENV === 'development') {
|
|
66
|
+
storage.setItem(key, value);
|
|
67
|
+
} else {
|
|
68
|
+
storage.setItem(key, encodeBase64(value));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 存储SessionStorage数据
|
|
73
|
+
* @export
|
|
74
|
+
* @param {*} key
|
|
75
|
+
* @param {*} value
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
function saveJsonToSessionStorage(key, json) {
|
|
80
|
+
saveStringToSessionStorage(key, JSON.stringify(json || {}));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 移除SessionStorage数据
|
|
84
|
+
* @export
|
|
85
|
+
* @param {*} key
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
function removeSessionStorage(key) {
|
|
90
|
+
var storage = window.sessionStorage;
|
|
91
|
+
storage.removeItem(key);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 清空SessionStorage数据
|
|
95
|
+
* @export
|
|
96
|
+
* @param {*} key
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
function clearSessionStorage() {
|
|
101
|
+
var storage = window.sessionStorage;
|
|
102
|
+
storage.clear();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 占位函数
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
* @returns
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
function empty() {
|
|
113
|
+
return {};
|
|
114
|
+
}
|
package/es/utils/tools.d.ts
CHANGED
|
@@ -543,86 +543,12 @@ export function transformData({ data, convert, recursiveKey, }: {
|
|
|
543
543
|
* @param {*} other
|
|
544
544
|
*/
|
|
545
545
|
export function buildFieldDescription(v: any, op: any, other: any): string;
|
|
546
|
-
/**
|
|
547
|
-
* 获取SessionStorage数据
|
|
548
|
-
* @export
|
|
549
|
-
* @param {*} key
|
|
550
|
-
* @param {*} value
|
|
551
|
-
*/
|
|
552
|
-
export function getStringFromSessionStorage(key: any): any;
|
|
553
|
-
/**
|
|
554
|
-
* 获取LocalStorage数据
|
|
555
|
-
* @export
|
|
556
|
-
* @param {*} key
|
|
557
|
-
* @param {*} value
|
|
558
|
-
*/
|
|
559
|
-
export function getStringFromLocalStorage(key: any): any;
|
|
560
|
-
/**
|
|
561
|
-
* 获取SessionStorage数据
|
|
562
|
-
* @export
|
|
563
|
-
* @param {*} key
|
|
564
|
-
* @param {*} value
|
|
565
|
-
*/
|
|
566
|
-
export function getJsonFromSessionStorage(key: any): any;
|
|
567
|
-
/**
|
|
568
|
-
* 获取LocalStorage数据
|
|
569
|
-
* @export
|
|
570
|
-
* @param {*} key
|
|
571
|
-
* @param {*} value
|
|
572
|
-
*/
|
|
573
|
-
export function getJsonFromLocalStorage(key: any): any;
|
|
574
|
-
/**
|
|
575
|
-
* 存储SessionStorage数据
|
|
576
|
-
* @export
|
|
577
|
-
* @param {*} key
|
|
578
|
-
* @param {*} value
|
|
579
|
-
*/
|
|
580
|
-
export function saveStringToSessionStorage(key: any, value: any): void;
|
|
581
|
-
/**
|
|
582
|
-
* 存储本地数据
|
|
583
|
-
* @export
|
|
584
|
-
* @param {*} key
|
|
585
|
-
* @param {*} value
|
|
586
|
-
*/
|
|
587
|
-
export function saveStringToLocalStorage(key: any, value: any): void;
|
|
588
|
-
/**
|
|
589
|
-
* 存储SessionStorage数据
|
|
590
|
-
* @export
|
|
591
|
-
* @param {*} key
|
|
592
|
-
* @param {*} value
|
|
593
|
-
*/
|
|
594
|
-
export function saveJsonToSessionStorage(key: any, json: any): void;
|
|
595
|
-
/**
|
|
596
|
-
* 存储本地数据
|
|
597
|
-
* @export
|
|
598
|
-
* @param {*} key
|
|
599
|
-
* @param {*} value
|
|
600
|
-
*/
|
|
601
|
-
export function saveJsonToLocalStorage(key: any, json: any): void;
|
|
602
|
-
/**
|
|
603
|
-
* 移除SessionStorage数据
|
|
604
|
-
* @export
|
|
605
|
-
* @param {*} key
|
|
606
|
-
*/
|
|
607
|
-
export function removeSessionStorage(key: any): void;
|
|
608
|
-
/**
|
|
609
|
-
* 移除LocalStorage数据
|
|
610
|
-
* @export
|
|
611
|
-
* @param {*} key
|
|
612
|
-
*/
|
|
613
|
-
export function removeLocalStorage(key: any): void;
|
|
614
546
|
/**
|
|
615
547
|
* 清空SessionStorage数据
|
|
616
548
|
* @export
|
|
617
549
|
* @param {*} key
|
|
618
550
|
*/
|
|
619
551
|
export function clearSessionStorage(): void;
|
|
620
|
-
/**
|
|
621
|
-
* 清空LocalStorage数据
|
|
622
|
-
* @export
|
|
623
|
-
* @param {*} key
|
|
624
|
-
*/
|
|
625
|
-
export function clearLocalStorage(): void;
|
|
626
552
|
/**
|
|
627
553
|
* 获取工作队列
|
|
628
554
|
* @export
|
|
@@ -734,9 +660,6 @@ export function getTimeDistance(type: any): moment.Moment[];
|
|
|
734
660
|
*/
|
|
735
661
|
export function buildFieldHelper(v: any, prefix?: string): string;
|
|
736
662
|
export function checkLocalhost(): boolean;
|
|
737
|
-
export function getNearestLocalhostNotifyCache(): any;
|
|
738
|
-
export function setNearestLocalhostNotifyCache(): void;
|
|
739
|
-
export function removeNearestLocalhostNotifyCache(): void;
|
|
740
663
|
/**
|
|
741
664
|
* 尝试发送最近一次本地调用通知(一般用于开发阶段,提示调用的接口域)
|
|
742
665
|
*/
|
package/es/utils/tools.js
CHANGED
|
@@ -12,7 +12,6 @@ exports.checkDevelopment = checkDevelopment;
|
|
|
12
12
|
exports.checkExist = checkExist;
|
|
13
13
|
exports.checkFromConfig = checkFromConfig;
|
|
14
14
|
exports.checkLocalhost = checkLocalhost;
|
|
15
|
-
exports.clearLocalStorage = clearLocalStorage;
|
|
16
15
|
exports.clearSessionStorage = clearSessionStorage;
|
|
17
16
|
exports.cloneWithoutMethod = cloneWithoutMethod;
|
|
18
17
|
exports.convertTarget = convertTarget;
|
|
@@ -45,15 +44,10 @@ exports.getBrowserInfo = getBrowserInfo;
|
|
|
45
44
|
exports.getDerivedStateFromPropsForUrlParams = getDerivedStateFromPropsForUrlParams;
|
|
46
45
|
exports.getDerivedStateFromPropsForUrlParamsCore = getDerivedStateFromPropsForUrlParamsCore;
|
|
47
46
|
exports.getGuid = getGuid;
|
|
48
|
-
exports.getJsonFromLocalStorage = getJsonFromLocalStorage;
|
|
49
|
-
exports.getJsonFromSessionStorage = getJsonFromSessionStorage;
|
|
50
47
|
exports.getMomentNow = getMomentNow;
|
|
51
|
-
exports.getNearestLocalhostNotifyCache = getNearestLocalhostNotifyCache;
|
|
52
48
|
exports.getPathValue = getPathValue;
|
|
53
49
|
exports.getQueue = getQueue;
|
|
54
50
|
exports.getRandomColor = getRandomColor;
|
|
55
|
-
exports.getStringFromLocalStorage = getStringFromLocalStorage;
|
|
56
|
-
exports.getStringFromSessionStorage = getStringFromSessionStorage;
|
|
57
51
|
exports.getTimeDistance = getTimeDistance;
|
|
58
52
|
exports.getValue = getValue;
|
|
59
53
|
exports.getValueByKey = getValueByKey;
|
|
@@ -92,21 +86,13 @@ exports.refitFieldDecoratorOption = refitFieldDecoratorOption;
|
|
|
92
86
|
exports.removeEndMatch = removeEndMatch;
|
|
93
87
|
exports.removeFromArray = removeFromArray;
|
|
94
88
|
exports.removeLastMatch = removeLastMatch;
|
|
95
|
-
exports.removeLocalStorage = removeLocalStorage;
|
|
96
|
-
exports.removeNearestLocalhostNotifyCache = removeNearestLocalhostNotifyCache;
|
|
97
|
-
exports.removeSessionStorage = removeSessionStorage;
|
|
98
89
|
exports.replace = replace;
|
|
99
90
|
exports.replaceTargetText = replaceTargetText;
|
|
100
91
|
exports.requestAnimFrame = void 0;
|
|
101
92
|
exports.reverse = reverse;
|
|
102
93
|
exports.roundToTarget = roundToTarget;
|
|
103
|
-
exports.saveJsonToLocalStorage = saveJsonToLocalStorage;
|
|
104
|
-
exports.saveJsonToSessionStorage = saveJsonToSessionStorage;
|
|
105
|
-
exports.saveStringToLocalStorage = saveStringToLocalStorage;
|
|
106
|
-
exports.saveStringToSessionStorage = saveStringToSessionStorage;
|
|
107
94
|
exports.searchFromList = searchFromList;
|
|
108
95
|
exports.seededRandom = seededRandom;
|
|
109
|
-
exports.setNearestLocalhostNotifyCache = setNearestLocalhostNotifyCache;
|
|
110
96
|
exports.showError = showError;
|
|
111
97
|
exports.showErrorMessage = showErrorMessage;
|
|
112
98
|
exports.showInfoMessage = showInfoMessage;
|
|
@@ -171,6 +157,8 @@ var _constants = require("./constants");
|
|
|
171
157
|
|
|
172
158
|
var _core = require("./core");
|
|
173
159
|
|
|
160
|
+
var _developAssist = require("./developAssist");
|
|
161
|
+
|
|
174
162
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
175
163
|
|
|
176
164
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -193,10 +181,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
193
181
|
|
|
194
182
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
195
183
|
|
|
196
|
-
var storageKeyCollection = {
|
|
197
|
-
nearestLocalhostNotify: 'nearestLocalhostNotify'
|
|
198
|
-
};
|
|
199
|
-
|
|
200
184
|
function defaultBaseState() {
|
|
201
185
|
return {
|
|
202
186
|
dataLoading: false,
|
|
@@ -1647,168 +1631,6 @@ function buildFieldDescription(v, op, other) {
|
|
|
1647
1631
|
var o = (other || '') === '' ? '' : ",".concat(other);
|
|
1648
1632
|
return "\u8BF7".concat(op || '输入').concat(v).concat(o);
|
|
1649
1633
|
}
|
|
1650
|
-
/**
|
|
1651
|
-
* 获取SessionStorage数据
|
|
1652
|
-
* @export
|
|
1653
|
-
* @param {*} key
|
|
1654
|
-
* @param {*} value
|
|
1655
|
-
*/
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
function getStringFromSessionStorage(key) {
|
|
1659
|
-
var storage = window.sessionStorage;
|
|
1660
|
-
var value = storage.getItem(key);
|
|
1661
|
-
|
|
1662
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1663
|
-
return value;
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
var decode = decodeBase64(value);
|
|
1667
|
-
var v = encodeBase64(decode);
|
|
1668
|
-
|
|
1669
|
-
if (value !== v) {
|
|
1670
|
-
return null;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
return decode;
|
|
1674
|
-
}
|
|
1675
|
-
/**
|
|
1676
|
-
* 获取LocalStorage数据
|
|
1677
|
-
* @export
|
|
1678
|
-
* @param {*} key
|
|
1679
|
-
* @param {*} value
|
|
1680
|
-
*/
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
function getStringFromLocalStorage(key) {
|
|
1684
|
-
var storage = window.localStorage;
|
|
1685
|
-
var value = storage.getItem(key);
|
|
1686
|
-
|
|
1687
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1688
|
-
return value;
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
var decode = decodeBase64(value);
|
|
1692
|
-
var v = encodeBase64(decode);
|
|
1693
|
-
|
|
1694
|
-
if (value !== v) {
|
|
1695
|
-
return null;
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
return decode;
|
|
1699
|
-
}
|
|
1700
|
-
/**
|
|
1701
|
-
* 获取SessionStorage数据
|
|
1702
|
-
* @export
|
|
1703
|
-
* @param {*} key
|
|
1704
|
-
* @param {*} value
|
|
1705
|
-
*/
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
function getJsonFromSessionStorage(key) {
|
|
1709
|
-
var jsonString = getStringFromSessionStorage(key);
|
|
1710
|
-
|
|
1711
|
-
if (jsonString) {
|
|
1712
|
-
return JSON.parse(jsonString || '{}');
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
return null;
|
|
1716
|
-
}
|
|
1717
|
-
/**
|
|
1718
|
-
* 获取LocalStorage数据
|
|
1719
|
-
* @export
|
|
1720
|
-
* @param {*} key
|
|
1721
|
-
* @param {*} value
|
|
1722
|
-
*/
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
function getJsonFromLocalStorage(key) {
|
|
1726
|
-
var jsonString = getStringFromLocalStorage(key);
|
|
1727
|
-
|
|
1728
|
-
if (jsonString) {
|
|
1729
|
-
return JSON.parse(jsonString || '{}');
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
return null;
|
|
1733
|
-
}
|
|
1734
|
-
/**
|
|
1735
|
-
* 存储SessionStorage数据
|
|
1736
|
-
* @export
|
|
1737
|
-
* @param {*} key
|
|
1738
|
-
* @param {*} value
|
|
1739
|
-
*/
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
function saveStringToSessionStorage(key, value) {
|
|
1743
|
-
var storage = window.sessionStorage;
|
|
1744
|
-
|
|
1745
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1746
|
-
storage.setItem(key, value);
|
|
1747
|
-
} else {
|
|
1748
|
-
storage.setItem(key, encodeBase64(value));
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
1752
|
-
* 存储本地数据
|
|
1753
|
-
* @export
|
|
1754
|
-
* @param {*} key
|
|
1755
|
-
* @param {*} value
|
|
1756
|
-
*/
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
function saveStringToLocalStorage(key, value) {
|
|
1760
|
-
var storage = window.localStorage;
|
|
1761
|
-
|
|
1762
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1763
|
-
storage.setItem(key, value);
|
|
1764
|
-
} else {
|
|
1765
|
-
storage.setItem(key, encodeBase64(value));
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
/**
|
|
1769
|
-
* 存储SessionStorage数据
|
|
1770
|
-
* @export
|
|
1771
|
-
* @param {*} key
|
|
1772
|
-
* @param {*} value
|
|
1773
|
-
*/
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
function saveJsonToSessionStorage(key, json) {
|
|
1777
|
-
saveStringToSessionStorage(key, JSON.stringify(json || {}));
|
|
1778
|
-
}
|
|
1779
|
-
/**
|
|
1780
|
-
* 存储本地数据
|
|
1781
|
-
* @export
|
|
1782
|
-
* @param {*} key
|
|
1783
|
-
* @param {*} value
|
|
1784
|
-
*/
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
function saveJsonToLocalStorage(key, json) {
|
|
1788
|
-
saveStringToLocalStorage(key, JSON.stringify(json || {}));
|
|
1789
|
-
}
|
|
1790
|
-
/**
|
|
1791
|
-
* 移除SessionStorage数据
|
|
1792
|
-
* @export
|
|
1793
|
-
* @param {*} key
|
|
1794
|
-
*/
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
function removeSessionStorage(key) {
|
|
1798
|
-
var storage = window.sessionStorage;
|
|
1799
|
-
storage.removeItem(key);
|
|
1800
|
-
}
|
|
1801
|
-
/**
|
|
1802
|
-
* 移除LocalStorage数据
|
|
1803
|
-
* @export
|
|
1804
|
-
* @param {*} key
|
|
1805
|
-
*/
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
function removeLocalStorage(key) {
|
|
1809
|
-
var storage = window.localStorage;
|
|
1810
|
-
storage.removeItem(key);
|
|
1811
|
-
}
|
|
1812
1634
|
/**
|
|
1813
1635
|
* 清空SessionStorage数据
|
|
1814
1636
|
* @export
|
|
@@ -1820,17 +1642,6 @@ function clearSessionStorage() {
|
|
|
1820
1642
|
var storage = window.sessionStorage;
|
|
1821
1643
|
storage.clear();
|
|
1822
1644
|
}
|
|
1823
|
-
/**
|
|
1824
|
-
* 清空LocalStorage数据
|
|
1825
|
-
* @export
|
|
1826
|
-
* @param {*} key
|
|
1827
|
-
*/
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
function clearLocalStorage() {
|
|
1831
|
-
var storage = window.localStorage;
|
|
1832
|
-
storage.clear();
|
|
1833
|
-
}
|
|
1834
1645
|
/**
|
|
1835
1646
|
* 获取工作队列
|
|
1836
1647
|
* @export
|
|
@@ -1939,7 +1750,7 @@ function isFunction(value) {
|
|
|
1939
1750
|
}
|
|
1940
1751
|
|
|
1941
1752
|
function isArray(value) {
|
|
1942
|
-
return
|
|
1753
|
+
return (0, _core.isArray)(value);
|
|
1943
1754
|
}
|
|
1944
1755
|
|
|
1945
1756
|
function isObject(o) {
|
|
@@ -2146,35 +1957,6 @@ function checkLocalhost() {
|
|
|
2146
1957
|
var hostname = (0, _lodash.toLower)(window.location.hostname);
|
|
2147
1958
|
return hostname === '127.0.0.1' || hostname === 'localhost';
|
|
2148
1959
|
}
|
|
2149
|
-
|
|
2150
|
-
function getNearestLocalhostNotifyCache() {
|
|
2151
|
-
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
2152
|
-
var d = getJsonFromLocalStorage(key);
|
|
2153
|
-
|
|
2154
|
-
if ((d || null) == null) {
|
|
2155
|
-
return null;
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
if ((d.nearestTime || null) == null) {
|
|
2159
|
-
return null;
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
return d || null;
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
function setNearestLocalhostNotifyCache() {
|
|
2166
|
-
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
2167
|
-
var now = parseInt(new Date().getTime() / 1000, 10);
|
|
2168
|
-
var d = {
|
|
2169
|
-
nearestTime: now
|
|
2170
|
-
};
|
|
2171
|
-
return saveJsonToLocalStorage(key, d);
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
function removeNearestLocalhostNotifyCache() {
|
|
2175
|
-
var key = storageKeyCollection.nearestLocalhostNotify;
|
|
2176
|
-
removeLocalStorage(key);
|
|
2177
|
-
}
|
|
2178
1960
|
/**
|
|
2179
1961
|
* 尝试发送最近一次本地调用通知(一般用于开发阶段,提示调用的接口域)
|
|
2180
1962
|
*/
|
|
@@ -2186,7 +1968,7 @@ function trySendNearestLocalhostNotify(_ref22) {
|
|
|
2186
1968
|
var nearestTime = 0;
|
|
2187
1969
|
|
|
2188
1970
|
if (checkLocalhost()) {
|
|
2189
|
-
var nearestLocalhostNotify = getNearestLocalhostNotifyCache() || null;
|
|
1971
|
+
var nearestLocalhostNotify = (0, _developAssist.getNearestLocalhostNotifyCache)() || null;
|
|
2190
1972
|
|
|
2191
1973
|
if (nearestLocalhostNotify == null) {
|
|
2192
1974
|
needSend = true;
|
|
@@ -2208,7 +1990,7 @@ function trySendNearestLocalhostNotify(_ref22) {
|
|
|
2208
1990
|
description: "\u5F53\u524D\u63A5\u53E3\u57DF\u540D\uFF1A".concat(text, "\u3002")
|
|
2209
1991
|
});
|
|
2210
1992
|
|
|
2211
|
-
setNearestLocalhostNotifyCache();
|
|
1993
|
+
(0, _developAssist.setNearestLocalhostNotifyCache)();
|
|
2212
1994
|
}
|
|
2213
1995
|
} catch (error) {
|
|
2214
1996
|
recordLog(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.41",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"src/framework",
|
|
172
172
|
"src/utils"
|
|
173
173
|
],
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "c9fe568c9a9352186ca91478b3ac314acceae705",
|
|
175
175
|
"gitHooks": {
|
|
176
176
|
"pre-commit": "lint-staged"
|
|
177
177
|
}
|