@zgfe/business-lib 1.1.87-auth.6 → 1.1.87-auth.7
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/context/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export interface GlobalContextProps {
|
|
|
77
77
|
funPermissions?: any;
|
|
78
78
|
menusName?: any;
|
|
79
79
|
getMenuRouterByName?: (name: string) => string;
|
|
80
|
-
|
|
80
|
+
authority?: any;
|
|
81
81
|
}
|
|
82
82
|
declare const BizGlobalDataContext: import("react").Context<GlobalContextProps>;
|
|
83
83
|
export default BizGlobalDataContext;
|
|
@@ -66,7 +66,7 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
66
66
|
setEnvList = _useState6[1];
|
|
67
67
|
var _useState7 = useState({}),
|
|
68
68
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
69
|
-
|
|
69
|
+
authority = _useState8[0],
|
|
70
70
|
setAuthorityList = _useState8[1];
|
|
71
71
|
var _useState9 = useState(true),
|
|
72
72
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -134,18 +134,18 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
134
134
|
if (!res) {
|
|
135
135
|
console.log('权限列表:', res.data.children);
|
|
136
136
|
var _data = res.data.children;
|
|
137
|
-
var
|
|
137
|
+
var _authority = {};
|
|
138
138
|
var loop = function loop(data, name) {
|
|
139
139
|
data.forEach(function (item) {
|
|
140
140
|
var _name = name ? "".concat(name, "-").concat(item.name) : item.name;
|
|
141
|
-
|
|
141
|
+
_authority[item.menuCode] = _name;
|
|
142
142
|
if (item.children) {
|
|
143
143
|
loop(item.children, _name);
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
};
|
|
147
147
|
loop(_data);
|
|
148
|
-
setAuthorityList(
|
|
148
|
+
setAuthorityList(_authority);
|
|
149
149
|
}
|
|
150
150
|
}).catch(function () {});
|
|
151
151
|
}
|
|
@@ -202,7 +202,7 @@ var DemoContent = function DemoContent(_ref3) {
|
|
|
202
202
|
eventGroupList: store === null || store === void 0 ? void 0 : store.eventGroupList,
|
|
203
203
|
userPropList: store === null || store === void 0 ? void 0 : store.userPropList,
|
|
204
204
|
eventEnvList: store === null || store === void 0 ? void 0 : store.envPropList,
|
|
205
|
-
|
|
205
|
+
authority: authority,
|
|
206
206
|
eventIdMap: store === null || store === void 0 ? void 0 : store.eventIdMap,
|
|
207
207
|
eventNameMap: store === null || store === void 0 ? void 0 : store.eventNameMap,
|
|
208
208
|
userGroupList: userGroupList,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.87-auth.
|
|
3
|
+
"version": "1.1.87-auth.7",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "4cefe5e46e9b441957eb5559e40f81c21f5051bd",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|