antd-management-fast-framework 1.12.12 → 1.12.13
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/CHANGELOG.md +4 -0
- package/es/framework/DataSinglePageView/SinglePage/index.js +3 -1
- package/es/utils/globalStorageAssist.d.ts +1 -1
- package/es/utils/globalStorageAssist.js +2 -2
- package/es/utils/mediaDefault.d.ts +4 -3
- package/es/utils/mediaDefault.js +6 -5
- package/es/utils/requestAssistor.js +3 -5
- package/es/utils/tools.d.ts +12 -1
- package/es/utils/tools.js +34 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.12.13](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.12.12...antd-management-fast-framework@1.12.13) (2022-01-19)
|
|
6
|
+
|
|
7
|
+
**Note:** Version bump only for package antd-management-fast-framework
|
|
8
|
+
|
|
5
9
|
### [1.12.12](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.12.11...antd-management-fast-framework@1.12.12) (2021-12-29)
|
|
6
10
|
|
|
7
11
|
**Note:** Version bump only for package antd-management-fast-framework
|
|
@@ -67,7 +67,9 @@ var SinglePage = /*#__PURE__*/function (_Base) {
|
|
|
67
67
|
_this.handleSearchReset = function () {
|
|
68
68
|
var form = _this.getSearchCard();
|
|
69
69
|
|
|
70
|
-
form
|
|
70
|
+
if ((form || null) != null) {
|
|
71
|
+
form.resetFields();
|
|
72
|
+
}
|
|
71
73
|
|
|
72
74
|
_this.handleAdditionalSearchReset();
|
|
73
75
|
|
|
@@ -210,9 +210,9 @@ function setToken(v) {
|
|
|
210
210
|
*/
|
|
211
211
|
|
|
212
212
|
|
|
213
|
-
function removeToken(
|
|
213
|
+
function removeToken() {
|
|
214
214
|
var key = storageKeyCollection.token;
|
|
215
|
-
return (0, _tools.removeLocalStorage)(key
|
|
215
|
+
return (0, _tools.removeLocalStorage)(key);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
function getTokenObject() {
|
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.emptyExport = emptyExport;
|
|
7
7
|
exports.emptyLogo = void 0;
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -11,13 +11,14 @@ exports.emptyLogo = void 0;
|
|
|
11
11
|
*/
|
|
12
12
|
var emptyLogo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAEXRFWHRTb2Z0d2FyZQBTbmlwYXN0ZV0Xzt0AAAIsSURBVHic7ZqxaoNQFIb/lL7EHYUU8gB3yih06OATmLlDhm7O4uxQyNDBWZ8gQ4eAYyYfIJDCHe9jtEMtRKPNvY3lh/Z84OTx5L9f9HgDmVlr3/GPuWEHYCMC2AHYiAB2ADYigB2AjQhgB2AjAtgB2IgAdgA2IoAdgI0IYAdgIwLYAdiIAHYANiKAHYCNCGAHYCMCfC8wRQSlEtSXCusESqnOERXmuwuQ9OpVMvIp3r3H+YU7wKCIFFR8QLa3sPbrqLBIl1BRgX7UT6kxUJ3WW9iH154E/96XuL1ytWeY4glps0Jlc4SdMyFyWwEqxjKZw+bt2TrBMgWyvcVj0GsW5rAnTbx7OzDxHVDjJW2gszWGI4RYZxooX9tHyKB4LqGzzfnir+7txrQCzBsO0Ijux1cT3EfQOODNADA7bBtgMb+4ev/ejkws4IjGqbDB0XzVa9x11tQfhu3A9e3tyLQCgjtop8J20YP1IfJ2uO2zk7O+vR2ZWMAcCzTY7sa/ArPbosEC88Ct/se9HZl4CIZ4WAFN+jIyiPqD7HNwjddf09uNyfcBYb5HpkvEZ5ulGomKUeoMm5ORHzxu2voI/b2MOXafet/eLsx8/yRligjLdGAcrarO+3eoblVZjL6i6wQqLvtNB975P+j9Dd4C/hryY4gdgI0IYAdgIwLYAdiIAHYANiKAHYCNCGAHYCMC2AHYiAB2ADYigB2AjQhgB2AjAtgB2IgAdgA2/17AB0T0+YJa7nadAAAAAElFTkSuQmCC';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* 占位函数
|
|
15
|
+
*
|
|
15
16
|
* @export
|
|
16
|
-
* @
|
|
17
|
+
* @returns
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
exports.emptyLogo = emptyLogo;
|
|
20
21
|
|
|
21
|
-
function
|
|
22
|
-
|
|
22
|
+
function emptyExport() {
|
|
23
|
+
return {};
|
|
23
24
|
}
|
|
@@ -31,8 +31,6 @@ var _defaultSettingsSpecial = require("./defaultSettingsSpecial");
|
|
|
31
31
|
|
|
32
32
|
var _virtualRequest = require("./virtualRequest");
|
|
33
33
|
|
|
34
|
-
var _lodash = require("lodash");
|
|
35
|
-
|
|
36
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
35
|
|
|
38
36
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -447,11 +445,11 @@ function _request() {
|
|
|
447
445
|
|
|
448
446
|
if ((urlParams || null) != null) {
|
|
449
447
|
if ((0, _tools.isString)(urlParams)) {
|
|
450
|
-
url = "url?".concat(urlParams);
|
|
448
|
+
url = "".concat(url, "?").concat(urlParams);
|
|
451
449
|
}
|
|
452
450
|
|
|
453
|
-
if ((0,
|
|
454
|
-
url = "url?".concat((0, _tools.queryStringify)(urlParams));
|
|
451
|
+
if ((0, _tools.isObject)(urlParams)) {
|
|
452
|
+
url = "".concat(url, "?").concat((0, _tools.queryStringify)(urlParams));
|
|
455
453
|
}
|
|
456
454
|
}
|
|
457
455
|
|
package/es/utils/tools.d.ts
CHANGED
|
@@ -426,6 +426,17 @@ export function formatTarget({ target, format, option }: {
|
|
|
426
426
|
* 通过 path 获取对应得值
|
|
427
427
|
*/
|
|
428
428
|
export function getPathValue(o: any, path: any, defaultValue?: any): any;
|
|
429
|
+
/**
|
|
430
|
+
*计算时间间隔
|
|
431
|
+
* @param {startTime} 起始时间
|
|
432
|
+
* @param {endTime} 结束时间
|
|
433
|
+
*/
|
|
434
|
+
export function calculateTimeInterval(startTime: any, endTime: any): {
|
|
435
|
+
day: number;
|
|
436
|
+
hour: number;
|
|
437
|
+
minute: number;
|
|
438
|
+
second: number;
|
|
439
|
+
};
|
|
429
440
|
/**
|
|
430
441
|
* 格式化货币
|
|
431
442
|
*
|
|
@@ -747,7 +758,7 @@ export function trySendNearestLocalhostNotify({ text }: {
|
|
|
747
758
|
/**
|
|
748
759
|
* 文本缩略
|
|
749
760
|
*/
|
|
750
|
-
export function ellipsis(value: any, length: any): string;
|
|
761
|
+
export function ellipsis(value: any, length: any, symbol?: string): string;
|
|
751
762
|
export function notifySuccess(text: any): void;
|
|
752
763
|
/**
|
|
753
764
|
* 发送页面通知
|
package/es/utils/tools.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.arrayMove = arrayMove;
|
|
|
7
7
|
exports.arrayMoveMutate = arrayMoveMutate;
|
|
8
8
|
exports.buildFieldDescription = buildFieldDescription;
|
|
9
9
|
exports.buildFieldHelper = buildFieldHelper;
|
|
10
|
+
exports.calculateTimeInterval = calculateTimeInterval;
|
|
10
11
|
exports.checkDevelopment = checkDevelopment;
|
|
11
12
|
exports.checkExist = checkExist;
|
|
12
13
|
exports.checkFromConfig = checkFromConfig;
|
|
@@ -1170,6 +1171,36 @@ function getPathValue(o, path) {
|
|
|
1170
1171
|
|
|
1171
1172
|
return v || defaultValue;
|
|
1172
1173
|
}
|
|
1174
|
+
/**
|
|
1175
|
+
*计算时间间隔
|
|
1176
|
+
* @param {startTime} 起始时间
|
|
1177
|
+
* @param {endTime} 结束时间
|
|
1178
|
+
*/
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
function calculateTimeInterval(startTime, endTime) {
|
|
1182
|
+
var timeBegin = startTime.getTime();
|
|
1183
|
+
var timeEnd = endTime.getTime();
|
|
1184
|
+
var total = (timeEnd - timeBegin) / 1000;
|
|
1185
|
+
var day = parseInt(total / (24 * 60 * 60)); //计算整数天数
|
|
1186
|
+
|
|
1187
|
+
var afterDay = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
|
|
1188
|
+
|
|
1189
|
+
var hour = parseInt(afterDay / (60 * 60)); //计算整数小时数
|
|
1190
|
+
|
|
1191
|
+
var afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
|
|
1192
|
+
|
|
1193
|
+
var min = parseInt(afterHour / 60); //计算整数分
|
|
1194
|
+
|
|
1195
|
+
var afterMin = total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数
|
|
1196
|
+
|
|
1197
|
+
return {
|
|
1198
|
+
day: day,
|
|
1199
|
+
hour: hour,
|
|
1200
|
+
minute: min,
|
|
1201
|
+
second: afterMin
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1173
1204
|
/**
|
|
1174
1205
|
* 格式化货币
|
|
1175
1206
|
*
|
|
@@ -2082,8 +2113,10 @@ function trySendNearestLocalhostNotify(_ref20) {
|
|
|
2082
2113
|
|
|
2083
2114
|
|
|
2084
2115
|
function ellipsis(value, length) {
|
|
2116
|
+
var symbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '...';
|
|
2117
|
+
|
|
2085
2118
|
if (value && value.length > length) {
|
|
2086
|
-
return "".concat(toString(value).substr(0, length)
|
|
2119
|
+
return "".concat(toString(value).substr(0, length)).concat(symbol);
|
|
2087
2120
|
}
|
|
2088
2121
|
|
|
2089
2122
|
return toString(value);
|