antd-management-fast-framework 1.11.4 → 1.11.5
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/authority.js
CHANGED
|
@@ -16,7 +16,24 @@ var _globalStorageAssist = require("./globalStorageAssist");
|
|
|
16
16
|
|
|
17
17
|
var _Authorized = require("./Authorized");
|
|
18
18
|
|
|
19
|
+
var authorityCollectionCache = 'authorityCollectionCache';
|
|
20
|
+
|
|
19
21
|
function getAllAuthorityCore() {
|
|
22
|
+
var result = [];
|
|
23
|
+
var existCache = (0, _cacheAssist.hasCache)({
|
|
24
|
+
key: authorityCollectionCache
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (existCache) {
|
|
28
|
+
result = (0, _cacheAssist.getCache)({
|
|
29
|
+
key: authorityCollectionCache
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if ((0, _tools.isArray)(result)) {
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
var authorityString = (0, _tools.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection);
|
|
21
38
|
var authority;
|
|
22
39
|
|
|
@@ -27,10 +44,16 @@ function getAllAuthorityCore() {
|
|
|
27
44
|
}
|
|
28
45
|
|
|
29
46
|
if (typeof authority === 'string') {
|
|
30
|
-
|
|
47
|
+
result.push(authority);
|
|
48
|
+
} else {
|
|
49
|
+
result = (0, _tools.isArray)(authority) ? authority : [];
|
|
31
50
|
}
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
(0, _cacheAssist.setCache)({
|
|
53
|
+
key: authorityCollectionCache,
|
|
54
|
+
value: result
|
|
55
|
+
});
|
|
56
|
+
return result;
|
|
34
57
|
}
|
|
35
58
|
|
|
36
59
|
function getAllAuthority() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function getNearestLocalhostNotifyCache(): any;
|
|
2
2
|
export function setNearestLocalhostNotifyCache(): void;
|
|
3
3
|
export function removeNearestLocalhostNotifyCache(): void;
|
|
4
|
-
export function getAccessWayCollectionCache():
|
|
4
|
+
export function getAccessWayCollectionCache(): {};
|
|
5
5
|
export function setAccessWayCollectionCache(o: any): void;
|
|
6
6
|
/**
|
|
7
7
|
* 获取useParamsData缓存
|
|
@@ -21,6 +21,8 @@ exports.storageKeyCollection = void 0;
|
|
|
21
21
|
|
|
22
22
|
var _tools = require("./tools");
|
|
23
23
|
|
|
24
|
+
var _cacheAssist = require("./cacheAssist");
|
|
25
|
+
|
|
24
26
|
var _constants = require("./constants");
|
|
25
27
|
|
|
26
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -67,14 +69,34 @@ function removeNearestLocalhostNotifyCache() {
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
function getAccessWayCollectionCache() {
|
|
72
|
+
var result = {};
|
|
70
73
|
var key = storageKeyCollection.accessWayCollection;
|
|
74
|
+
var existCache = (0, _cacheAssist.hasCache)({
|
|
75
|
+
key: key
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (existCache) {
|
|
79
|
+
result = (0, _cacheAssist.getCache)({
|
|
80
|
+
key: key
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if ((0, _tools.isArray)(result)) {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
71
88
|
var d = (0, _tools.getJsonFromLocalStorage)(key);
|
|
72
89
|
|
|
73
90
|
if ((d || null) == null) {
|
|
74
91
|
return _objectSpread({}, _constants.accessWaySpecialCollection || {});
|
|
75
92
|
}
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
result = _objectSpread(_objectSpread({}, d || null), _constants.accessWaySpecialCollection || {});
|
|
95
|
+
(0, _cacheAssist.setCache)({
|
|
96
|
+
key: key,
|
|
97
|
+
value: result
|
|
98
|
+
});
|
|
99
|
+
return result;
|
|
78
100
|
}
|
|
79
101
|
|
|
80
102
|
function setAccessWayCollectionCache(o) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -167,5 +167,5 @@
|
|
|
167
167
|
"bugs": {
|
|
168
168
|
"url": "https://github.com/kityandhero/antd-management-fast-framework/issues"
|
|
169
169
|
},
|
|
170
|
-
"gitHead": "
|
|
170
|
+
"gitHead": "aa387c8a9a319bb8141de51b028950207cb027b3"
|
|
171
171
|
}
|