antd-management-fast-framework 1.9.38 → 1.9.39
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/framework/Base/index.js +14 -5
- package/es/utils/constants.d.ts +1 -0
- package/es/utils/constants.js +2 -1
- package/es/utils/defaultSettingsSpecial.d.ts +1 -0
- package/es/utils/defaultSettingsSpecial.js +10 -0
- package/es/utils/globalStorageAssist.d.ts +2 -2
- package/es/utils/globalStorageAssist.js +2 -2
- package/es/utils/proLayoutCollection.js +14 -10
- package/es/utils/tools.d.ts +1 -0
- package/es/utils/tools.js +6 -2
- package/package.json +4 -4
|
@@ -13,6 +13,8 @@ var _nprogress = _interopRequireDefault(require("nprogress"));
|
|
|
13
13
|
|
|
14
14
|
var _tools = require("../../utils/tools");
|
|
15
15
|
|
|
16
|
+
var _defaultSettingsSpecial = require("../../utils/defaultSettingsSpecial");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
18
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -153,7 +155,9 @@ var Base = /*#__PURE__*/function (_Component) {
|
|
|
153
155
|
pathname: path
|
|
154
156
|
};
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
|
|
159
|
+
_nprogress["default"].inc();
|
|
160
|
+
}
|
|
157
161
|
|
|
158
162
|
_umi.history.push(location);
|
|
159
163
|
};
|
|
@@ -163,7 +167,9 @@ var Base = /*#__PURE__*/function (_Component) {
|
|
|
163
167
|
pathname: path
|
|
164
168
|
};
|
|
165
169
|
|
|
166
|
-
|
|
170
|
+
if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
|
|
171
|
+
_nprogress["default"].inc();
|
|
172
|
+
}
|
|
167
173
|
|
|
168
174
|
_umi.history.replace(location);
|
|
169
175
|
};
|
|
@@ -186,9 +192,12 @@ var Base = /*#__PURE__*/function (_Component) {
|
|
|
186
192
|
_createClass(Base, [{
|
|
187
193
|
key: "componentDidMount",
|
|
188
194
|
value: function componentDidMount() {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
195
|
+
if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
|
|
196
|
+
setTimeout(function () {
|
|
197
|
+
_nprogress["default"].done();
|
|
198
|
+
}, 400);
|
|
199
|
+
}
|
|
200
|
+
|
|
192
201
|
this.beforeDidMount();
|
|
193
202
|
this.mounted = true;
|
|
194
203
|
this.doDidMountTask();
|
package/es/utils/constants.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export namespace appInitDefault {
|
|
|
52
52
|
export const imageUploadMaxSize: number;
|
|
53
53
|
export const videoUploadMaxSize: number;
|
|
54
54
|
export const fileUploadMaxSize: number;
|
|
55
|
+
export const useNprogress: boolean;
|
|
55
56
|
}
|
|
56
57
|
export const accessWaySpecialCollection: {
|
|
57
58
|
super: {
|
package/es/utils/constants.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export function empty(): {};
|
|
8
8
|
export namespace defaultSettingsLayoutCustom {
|
|
9
|
+
export function getUseNprogress(): boolean;
|
|
9
10
|
export function getFileUploadMaxSize(): number;
|
|
10
11
|
export function getVideoUploadMaxSize(): number;
|
|
11
12
|
export function getImageUploadMaxSize(): number;
|
|
@@ -17,6 +17,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
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; }
|
|
18
18
|
|
|
19
19
|
var defaultSettingsLayoutCustom = {
|
|
20
|
+
getUseNprogress: function getUseNprogress() {
|
|
21
|
+
var appInit = (0, _tools.getAppInitConfigData)();
|
|
22
|
+
|
|
23
|
+
var _useNprogress = _objectSpread(_objectSpread({}, {
|
|
24
|
+
useNprogress: true
|
|
25
|
+
}), appInit || {}),
|
|
26
|
+
useNprogress = _useNprogress.useNprogress;
|
|
27
|
+
|
|
28
|
+
return useNprogress;
|
|
29
|
+
},
|
|
20
30
|
getFileUploadMaxSize: function getFileUploadMaxSize() {
|
|
21
31
|
var appInit = (0, _tools.getAppInitConfigData)();
|
|
22
32
|
|
|
@@ -36,7 +36,7 @@ export function removeParamsDataCache(key: any): void;
|
|
|
36
36
|
*/
|
|
37
37
|
export function getTokenKeyName(): string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Get Token
|
|
40
40
|
*
|
|
41
41
|
* @export
|
|
42
42
|
* @param {*} fn
|
|
@@ -44,7 +44,7 @@ export function getTokenKeyName(): string;
|
|
|
44
44
|
*/
|
|
45
45
|
export function getToken(): any;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Set Token
|
|
48
48
|
*
|
|
49
49
|
* @export
|
|
50
50
|
* @param {*} fn
|
|
@@ -154,7 +154,7 @@ function getTokenKeyName() {
|
|
|
154
154
|
return storageKeyCollection.token;
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* Get Token
|
|
158
158
|
*
|
|
159
159
|
* @export
|
|
160
160
|
* @param {*} fn
|
|
@@ -167,7 +167,7 @@ function getToken() {
|
|
|
167
167
|
return (0, _tools.getStringFromLocalStorage)(key);
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
|
-
*
|
|
170
|
+
* Set Token
|
|
171
171
|
*
|
|
172
172
|
* @export
|
|
173
173
|
* @param {*} fn
|
|
@@ -14,6 +14,8 @@ var _nprogress = _interopRequireDefault(require("nprogress"));
|
|
|
14
14
|
|
|
15
15
|
var _tools = require("./tools");
|
|
16
16
|
|
|
17
|
+
var _defaultSettingsSpecial = require("./defaultSettingsSpecial");
|
|
18
|
+
|
|
17
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
20
|
|
|
19
21
|
var proLayoutDefaultProps = {
|
|
@@ -39,18 +41,20 @@ var proLayoutDefaultProps = {
|
|
|
39
41
|
return /*#__PURE__*/_react["default"].createElement(_umi.Link, {
|
|
40
42
|
to: menuItemProps.path,
|
|
41
43
|
onClick: function onClick() {
|
|
42
|
-
if ((
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
|
|
45
|
+
if ((_nprogress["default"] || null) == null) {
|
|
46
|
+
var text = 'nprogress need install';
|
|
47
|
+
(0, _tools.showErrorMessage)({
|
|
48
|
+
message: text
|
|
49
|
+
});
|
|
50
|
+
}
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
_nprogress["default"].inc();
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
setTimeout(function () {
|
|
55
|
+
_nprogress["default"].done();
|
|
56
|
+
}, 400);
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
}, defaultDom);
|
|
56
60
|
}
|
package/es/utils/tools.d.ts
CHANGED
package/es/utils/tools.js
CHANGED
|
@@ -191,8 +191,12 @@ function getAppInitConfigData() {
|
|
|
191
191
|
var appInitConfig = _constants.appInitDefault;
|
|
192
192
|
|
|
193
193
|
if (isBrowser()) {
|
|
194
|
-
if ((window.
|
|
195
|
-
appInitConfig = _objectSpread(_objectSpread({}, appInitConfig), window.
|
|
194
|
+
if ((window.appInitCustomLocal || null) != null) {
|
|
195
|
+
appInitConfig = _objectSpread(_objectSpread({}, appInitConfig), window.appInitCustomLocal);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if ((window.appInitCustomRemote || null) != null) {
|
|
199
|
+
appInitConfig = _objectSpread(_objectSpread({}, appInitConfig), window.appInitCustomRemote);
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.39",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ant-design/icons": "^4.7.0",
|
|
33
|
-
"@ant-design/pro-layout": "^6.31.
|
|
33
|
+
"@ant-design/pro-layout": "^6.31.2",
|
|
34
34
|
"@antv/data-set": "^0.11.8",
|
|
35
35
|
"antd": "^4.17.1",
|
|
36
36
|
"array-move": "^4.0.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@testing-library/react": "^12.1.2",
|
|
89
89
|
"@testing-library/react-hooks": "^7.0.2",
|
|
90
90
|
"@types/jest": "^27.0.3",
|
|
91
|
-
"@types/node": "^16.11.
|
|
91
|
+
"@types/node": "^16.11.10",
|
|
92
92
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
93
93
|
"@umijs/fabric": "^2.8.1",
|
|
94
94
|
"@umijs/test": "^3.5.20",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"eslint-config-prettier": "^8.3.0",
|
|
106
106
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
107
107
|
"eslint-plugin-import": "^2.25.3",
|
|
108
|
-
"eslint-plugin-jest": "^25.
|
|
108
|
+
"eslint-plugin-jest": "^25.3.0",
|
|
109
109
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
110
110
|
"eslint-plugin-prettier": "^4.0.0",
|
|
111
111
|
"eslint-plugin-react": "^7.27.1",
|