eoss-ui 0.4.70 → 0.4.72
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/lib/button-group.js +597 -117
- package/lib/button.js +597 -117
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +598 -118
- package/lib/clients.js +2 -2
- package/lib/data-table-form.js +598 -118
- package/lib/data-table.js +598 -118
- package/lib/date-picker.js +597 -117
- package/lib/dialog.js +596 -116
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +619 -125
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +598 -118
- package/lib/flow-list.js +774 -294
- package/lib/flow.js +600 -120
- package/lib/form.js +623 -143
- package/lib/handle-user.js +598 -118
- package/lib/handler.js +598 -118
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +597 -117
- package/lib/input.js +622 -142
- package/lib/label.js +2 -2
- package/lib/login.js +598 -118
- package/lib/main.js +598 -118
- package/lib/menu.js +2 -2
- package/lib/nav.js +597 -117
- package/lib/notify.js +4 -4
- package/lib/page.js +597 -117
- package/lib/pagination.js +2 -2
- package/lib/player.js +613 -133
- package/lib/qr-code.js +604 -124
- package/lib/radio-group.js +598 -118
- package/lib/retrial-auth.js +598 -118
- package/lib/select-ganged.js +597 -117
- package/lib/select.js +605 -125
- package/lib/selector-panel.js +598 -118
- package/lib/selector.js +605 -125
- package/lib/sizer.js +598 -118
- package/lib/steps.js +597 -117
- package/lib/switch.js +597 -117
- package/lib/table-form.js +623 -143
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +598 -118
- package/lib/tips.js +598 -118
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +621 -127
- package/lib/tree.js +598 -118
- package/lib/upload.js +599 -119
- package/lib/utils/util.js +582 -102
- package/lib/wujie.js +597 -117
- package/lib/wxlogin.js +598 -118
- package/package.json +1 -1
- package/packages/tree-group/src/main.vue +26 -8
- package/src/index.js +1 -1
- package/src/utils/util.js +530 -80
package/lib/utils/util.js
CHANGED
|
@@ -357,6 +357,34 @@ var arrUnique = function arrUnique(data, key) {
|
|
|
357
357
|
}
|
|
358
358
|
return newArr;
|
|
359
359
|
};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* average
|
|
363
|
+
* @desc 计算平均值
|
|
364
|
+
* @author SuTao
|
|
365
|
+
* @date 2023年12月14日
|
|
366
|
+
* @param {...number} numbers - 一组数字
|
|
367
|
+
* @return {number} 数组中数字的平均值
|
|
368
|
+
**/
|
|
369
|
+
var average = function average() {
|
|
370
|
+
for (var _len = arguments.length, numbers = Array(_len), _key = 0; _key < _len; _key++) {
|
|
371
|
+
numbers[_key] = arguments[_key];
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Ensure that all arguments are valid numbers
|
|
375
|
+
if (!numbers.every(Number.isFinite)) {
|
|
376
|
+
throw new Error('Invalid input. Please provide valid numbers.');
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Calculate the average of the numbers
|
|
380
|
+
var sum = numbers.reduce(function (acc, num) {
|
|
381
|
+
return acc + num;
|
|
382
|
+
}, 0);
|
|
383
|
+
var average = sum / numbers.length;
|
|
384
|
+
|
|
385
|
+
return average;
|
|
386
|
+
};
|
|
387
|
+
|
|
360
388
|
/**
|
|
361
389
|
* browser
|
|
362
390
|
* @desc:浏览器类型
|
|
@@ -373,107 +401,169 @@ var browser = function browser() {
|
|
|
373
401
|
};
|
|
374
402
|
|
|
375
403
|
/**
|
|
376
|
-
*
|
|
377
|
-
* @desc
|
|
378
|
-
* @
|
|
379
|
-
* @
|
|
380
|
-
* @param {
|
|
381
|
-
* @param {
|
|
404
|
+
* calculateNetworkDays
|
|
405
|
+
* @desc 工作日天数
|
|
406
|
+
* @desc 计算两个日期之间的工作日天数,可以排除周末和指定的假期
|
|
407
|
+
* @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
|
|
408
|
+
* @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
|
|
409
|
+
* @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
|
|
410
|
+
* @return {number} 工作日天数
|
|
382
411
|
**/
|
|
383
|
-
var
|
|
384
|
-
|
|
385
|
-
try {
|
|
386
|
-
// 尝试将输入转换为 Date 对象
|
|
387
|
-
var d1 = new Date(date1);
|
|
388
|
-
var d2 = new Date(date2);
|
|
412
|
+
var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
|
|
413
|
+
var holidays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
389
414
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
415
|
+
if (typeof start_date !== 'string' || typeof end_date !== 'string') {
|
|
416
|
+
throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
|
|
417
|
+
}
|
|
394
418
|
|
|
395
|
-
|
|
396
|
-
|
|
419
|
+
var startDateObj = new Date(start_date);
|
|
420
|
+
var endDateObj = new Date(end_date);
|
|
397
421
|
|
|
398
|
-
|
|
399
|
-
|
|
422
|
+
if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
|
|
423
|
+
throw new Error("Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'.");
|
|
424
|
+
}
|
|
400
425
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
// 捕获错误并抛出
|
|
404
|
-
_eossElement.MessageBox.error(error, 5);
|
|
405
|
-
}
|
|
426
|
+
if (startDateObj > endDateObj) {
|
|
427
|
+
throw new Error('Start date should be earlier than or equal to end date.');
|
|
406
428
|
}
|
|
407
|
-
};
|
|
408
429
|
|
|
409
|
-
|
|
410
|
-
* calcDateHourDiff
|
|
411
|
-
* @desc:时间计算-小时计算
|
|
412
|
-
* @author sutao
|
|
413
|
-
* @date 2023年11月10日
|
|
414
|
-
* @param {String/Object/Number} [date1] - 时间对象、字符串、时间戳
|
|
415
|
-
* @param {String/Object/Number} [date2] - 时间对象、字符串、时间戳
|
|
416
|
-
**/
|
|
417
|
-
var calcDateHourDiff = function calcDateHourDiff(date1, date2) {
|
|
418
|
-
if (date1 && date2) {
|
|
419
|
-
try {
|
|
420
|
-
// 尝试将输入转换为 Date 对象
|
|
421
|
-
var d1 = new Date(date1);
|
|
422
|
-
var d2 = new Date(date2);
|
|
430
|
+
var workdays = 0;
|
|
423
431
|
|
|
424
|
-
|
|
425
|
-
if (isNaN(d1.getTime()) || isNaN(d2.getTime())) {
|
|
426
|
-
throw new Error('日期格式不正确');
|
|
427
|
-
}
|
|
432
|
+
// Iterate through each day in the date range
|
|
428
433
|
|
|
429
|
-
|
|
430
|
-
|
|
434
|
+
var _loop = function _loop(currentDate) {
|
|
435
|
+
// Check if the current day is a weekend (Saturday or Sunday)
|
|
436
|
+
var isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
|
|
431
437
|
|
|
432
|
-
|
|
433
|
-
|
|
438
|
+
// Check if the current day is a holiday
|
|
439
|
+
var isHoliday = holidays.some(function (holiday) {
|
|
440
|
+
var holidayDate = new Date(holiday);
|
|
441
|
+
return currentDate.toDateString() === holidayDate.toDateString();
|
|
442
|
+
});
|
|
434
443
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
_eossElement.MessageBox.error(error.message, 5);
|
|
444
|
+
// If it's a workday (not a weekend or holiday), increment the workdays count
|
|
445
|
+
if (!isWeekend && !isHoliday) {
|
|
446
|
+
workdays++;
|
|
439
447
|
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
for (var currentDate = new Date(startDateObj); currentDate <= endDateObj; currentDate.setDate(currentDate.getDate() + 1)) {
|
|
451
|
+
_loop(currentDate);
|
|
440
452
|
}
|
|
453
|
+
|
|
454
|
+
return workdays;
|
|
441
455
|
};
|
|
442
456
|
|
|
443
457
|
/**
|
|
444
|
-
*
|
|
445
|
-
* @desc
|
|
446
|
-
* @
|
|
447
|
-
* @
|
|
448
|
-
* @
|
|
449
|
-
* @param {
|
|
458
|
+
* concatenate
|
|
459
|
+
* @desc 指定连接符合并文本
|
|
460
|
+
* @desc 使用指定的连接符合并文本字符串
|
|
461
|
+
* @author SuTao
|
|
462
|
+
* @date 2023年12月14日
|
|
463
|
+
* @param {string} separator - 指定的连接符
|
|
464
|
+
* @param {...string} strings - 多个文本字符串
|
|
465
|
+
* @return {string} 合并后的字符串
|
|
450
466
|
**/
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var d1 = new Date(date1);
|
|
456
|
-
var d2 = new Date(date2);
|
|
467
|
+
var concatenate = function concatenate(separator) {
|
|
468
|
+
for (var _len2 = arguments.length, strings = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
469
|
+
strings[_key2 - 1] = arguments[_key2];
|
|
470
|
+
}
|
|
457
471
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
472
|
+
if (typeof separator !== 'string' || !strings.every(function (str) {
|
|
473
|
+
return typeof str === 'string';
|
|
474
|
+
})) {
|
|
475
|
+
throw new Error('Invalid input. Please provide a valid separator and valid strings.');
|
|
476
|
+
}
|
|
477
|
+
return strings.join(separator);
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* dateAddDays
|
|
482
|
+
* @desc 加减日期天数
|
|
483
|
+
* @desc 在给定的日期上加上或减去指定的天数
|
|
484
|
+
* @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
|
|
485
|
+
* @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
|
|
486
|
+
* @return {string} 计算后的日期字符串
|
|
487
|
+
**/
|
|
488
|
+
var dateAddDays = function dateAddDays(start_date, days) {
|
|
489
|
+
if (typeof start_date !== 'string' || !Number.isInteger(days)) {
|
|
490
|
+
throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days.");
|
|
491
|
+
}
|
|
462
492
|
|
|
463
|
-
|
|
464
|
-
|
|
493
|
+
var startDateObj = new Date(start_date);
|
|
494
|
+
if (isNaN(startDateObj.getTime())) {
|
|
495
|
+
throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
496
|
+
}
|
|
465
497
|
|
|
466
|
-
|
|
467
|
-
|
|
498
|
+
var resultDateObj = new Date(startDateObj);
|
|
499
|
+
resultDateObj.setDate(resultDateObj.getDate() + days);
|
|
468
500
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
501
|
+
var resultYear = resultDateObj.getFullYear();
|
|
502
|
+
var resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
|
|
503
|
+
var resultDay = String(resultDateObj.getDate()).padStart(2, '0');
|
|
504
|
+
|
|
505
|
+
return resultYear + '-' + resultMonth + '-' + resultDay;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* dateDiff
|
|
510
|
+
* @desc 计算两个日期之间的差距
|
|
511
|
+
* @author SuTao
|
|
512
|
+
* @date 2023年12月14日
|
|
513
|
+
* @param {String} start_date - 起始日期字符串
|
|
514
|
+
* @param {String} end_date - 结束日期字符串
|
|
515
|
+
* @param {String} [unit] - 计算的时间单位 ("y", "M", "d", "h", "m", "s")
|
|
516
|
+
* @return {Number} 两个日期之间的差距
|
|
517
|
+
**/
|
|
518
|
+
var dateDiff = function dateDiff(start_date, end_date, unit) {
|
|
519
|
+
// Assuming date strings are in "YYYY-MM-DD" format
|
|
520
|
+
var startDate = new Date(start_date);
|
|
521
|
+
var endDate = new Date(end_date);
|
|
522
|
+
|
|
523
|
+
// Calculate the difference in milliseconds
|
|
524
|
+
var timeDifference = endDate - startDate;
|
|
525
|
+
|
|
526
|
+
// Convert milliseconds to the specified unit
|
|
527
|
+
unit = unit || 'd'; // Set default unit to "d"
|
|
528
|
+
|
|
529
|
+
switch (unit) {
|
|
530
|
+
case 'y':
|
|
531
|
+
return endDate.getFullYear() - startDate.getFullYear();
|
|
532
|
+
case 'M':
|
|
533
|
+
return (endDate.getFullYear() - startDate.getFullYear()) * 12 + (endDate.getMonth() - startDate.getMonth());
|
|
534
|
+
case 'd':
|
|
535
|
+
return Math.floor(timeDifference / (1000 * 60 * 60 * 24));
|
|
536
|
+
case 'h':
|
|
537
|
+
return Math.floor(timeDifference / (1000 * 60 * 60));
|
|
538
|
+
case 'm':
|
|
539
|
+
return Math.floor(timeDifference / (1000 * 60));
|
|
540
|
+
case 's':
|
|
541
|
+
return Math.floor(timeDifference / 1000);
|
|
542
|
+
default:
|
|
543
|
+
throw new Error("Invalid unit. Supported units are 'y', 'M', 'd', 'h', 'm', 's'.");
|
|
474
544
|
}
|
|
475
545
|
};
|
|
476
546
|
|
|
547
|
+
/**
|
|
548
|
+
* dayOfMonth
|
|
549
|
+
* @desc 当月第几天
|
|
550
|
+
* @desc 返回给定日期是所在月的第几天
|
|
551
|
+
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
552
|
+
* @return {number} 当月的第几天
|
|
553
|
+
**/
|
|
554
|
+
var dayOfMonth = function dayOfMonth(date) {
|
|
555
|
+
if (typeof date !== 'string') {
|
|
556
|
+
throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
var dateObj = new Date(date);
|
|
560
|
+
if (isNaN(dateObj.getTime())) {
|
|
561
|
+
throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return dateObj.getDate();
|
|
565
|
+
};
|
|
566
|
+
|
|
477
567
|
/**
|
|
478
568
|
* debounce
|
|
479
569
|
* @desc:添加js内容
|
|
@@ -719,18 +809,18 @@ var exportXls = function exportXls(_ref6) {
|
|
|
719
809
|
aligns.splice(_i2, 0, others[_i2][1]);
|
|
720
810
|
}
|
|
721
811
|
|
|
722
|
-
var
|
|
812
|
+
var _loop2 = function _loop2(_i3) {
|
|
723
813
|
tbody += '<tr>';
|
|
724
814
|
|
|
725
|
-
var
|
|
815
|
+
var _loop3 = function _loop3(_x2) {
|
|
726
816
|
var field = '';
|
|
727
|
-
var valueKey = keys[fields[
|
|
728
|
-
var labelKey = keys[fields[
|
|
729
|
-
if (option[fields[
|
|
730
|
-
if (Array.isArray(data[_i3][fields[
|
|
817
|
+
var valueKey = keys[fields[_x2]] && keys[fields[_x2]].valueKey ? keys[fields[_x2]].valueKey : 'value';
|
|
818
|
+
var labelKey = keys[fields[_x2]] && keys[fields[_x2]].labelKey ? keys[fields[_x2]].labelKey : 'name';
|
|
819
|
+
if (option[fields[_x2]]) {
|
|
820
|
+
if (Array.isArray(data[_i3][fields[_x2]])) {
|
|
731
821
|
field = [];
|
|
732
|
-
data[_i3][fields[
|
|
733
|
-
option[fields[
|
|
822
|
+
data[_i3][fields[_x2]].forEach(function (ele) {
|
|
823
|
+
option[fields[_x2]].forEach(function (item) {
|
|
734
824
|
// eslint-disable-next-line eqeqeq
|
|
735
825
|
if (item[valueKey] == ele) {
|
|
736
826
|
field.push(item[labelKey]);
|
|
@@ -739,10 +829,10 @@ var exportXls = function exportXls(_ref6) {
|
|
|
739
829
|
});
|
|
740
830
|
});
|
|
741
831
|
field = field.join(' ');
|
|
742
|
-
} else if (typeof data[_i3][fields[
|
|
832
|
+
} else if (typeof data[_i3][fields[_x2]] === 'string' && keys[fields[_x2]] && keys[fields[_x2]].multiple) {
|
|
743
833
|
field = [];
|
|
744
|
-
data[_i3][fields[
|
|
745
|
-
option[fields[
|
|
834
|
+
data[_i3][fields[_x2]].split(',').forEach(function (ele) {
|
|
835
|
+
option[fields[_x2]].forEach(function (item) {
|
|
746
836
|
// eslint-disable-next-line eqeqeq
|
|
747
837
|
if (item[valueKey] == ele) {
|
|
748
838
|
field.push(item[labelKey]);
|
|
@@ -752,38 +842,38 @@ var exportXls = function exportXls(_ref6) {
|
|
|
752
842
|
});
|
|
753
843
|
field = field.join(' ');
|
|
754
844
|
} else {
|
|
755
|
-
option[fields[
|
|
845
|
+
option[fields[_x2]].forEach(function (item) {
|
|
756
846
|
// eslint-disable-next-line eqeqeq
|
|
757
|
-
if (item[valueKey] == data[_i3][fields[
|
|
847
|
+
if (item[valueKey] == data[_i3][fields[_x2]]) {
|
|
758
848
|
field = item[labelKey];
|
|
759
849
|
return;
|
|
760
850
|
}
|
|
761
851
|
});
|
|
762
852
|
}
|
|
763
|
-
} else if (_typeof(data[_i3][fields[
|
|
764
|
-
if (Array.isArray(data[_i3][fields[
|
|
765
|
-
data[_i3][fields[
|
|
853
|
+
} else if (_typeof(data[_i3][fields[_x2]]) === 'object' && keys[fields[_x2]]) {
|
|
854
|
+
if (Array.isArray(data[_i3][fields[_x2]])) {
|
|
855
|
+
data[_i3][fields[_x2]].forEach(function (item) {
|
|
766
856
|
field = [];
|
|
767
857
|
field.push({}.toString.call(item) === '[object Object]' ? item[labelKey] : item);
|
|
768
858
|
});
|
|
769
859
|
field = field.join(' ');
|
|
770
860
|
} else {
|
|
771
|
-
field = data[_i3][fields[
|
|
861
|
+
field = data[_i3][fields[_x2]][labelKey];
|
|
772
862
|
}
|
|
773
863
|
} else {
|
|
774
|
-
field = data[_i3][fields[
|
|
864
|
+
field = data[_i3][fields[_x2]];
|
|
775
865
|
}
|
|
776
|
-
tbody += '<td align="' + aligns[
|
|
866
|
+
tbody += '<td align="' + aligns[_x2] + '">' + field + '</td>';
|
|
777
867
|
};
|
|
778
868
|
|
|
779
|
-
for (var
|
|
780
|
-
|
|
869
|
+
for (var _x2 in fields) {
|
|
870
|
+
_loop3(_x2);
|
|
781
871
|
}
|
|
782
872
|
tbody += '</tr>';
|
|
783
873
|
};
|
|
784
874
|
|
|
785
875
|
for (var _i3 = 0; _i3 < data.length; _i3++) {
|
|
786
|
-
|
|
876
|
+
_loop2(_i3);
|
|
787
877
|
}
|
|
788
878
|
if (!name) {
|
|
789
879
|
name = 'table_' + new Date().getTime();
|
|
@@ -924,6 +1014,116 @@ var getHue = function getHue($h, $i, $isLight) {
|
|
|
924
1014
|
return Math.round($hue);
|
|
925
1015
|
};
|
|
926
1016
|
|
|
1017
|
+
/**
|
|
1018
|
+
* getCurrentDate
|
|
1019
|
+
* @desc 获取今天
|
|
1020
|
+
* @desc 返回当前日期
|
|
1021
|
+
* @return {string} 当前日期字符串,格式为 "YYYY-MM-DD"
|
|
1022
|
+
**/
|
|
1023
|
+
var getCurrentDate = function getCurrentDate() {
|
|
1024
|
+
var today = new Date();
|
|
1025
|
+
|
|
1026
|
+
var year = today.getFullYear();
|
|
1027
|
+
var month = String(today.getMonth() + 1).padStart(2, '0');
|
|
1028
|
+
var day = String(today.getDate()).padStart(2, '0');
|
|
1029
|
+
|
|
1030
|
+
return year + '-' + month + '-' + day;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* getCurrentDateTime
|
|
1035
|
+
* @desc 获取当前时间
|
|
1036
|
+
* @desc 返回当前日期和时间
|
|
1037
|
+
* @return {string} 当前日期和时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
|
|
1038
|
+
**/
|
|
1039
|
+
var getCurrentDateTime = function getCurrentDateTime() {
|
|
1040
|
+
var currentDateTime = new Date();
|
|
1041
|
+
|
|
1042
|
+
var year = currentDateTime.getFullYear();
|
|
1043
|
+
var month = String(currentDateTime.getMonth() + 1).padStart(2, '0');
|
|
1044
|
+
var day = String(currentDateTime.getDate()).padStart(2, '0');
|
|
1045
|
+
var hours = String(currentDateTime.getHours()).padStart(2, '0');
|
|
1046
|
+
var minutes = String(currentDateTime.getMinutes()).padStart(2, '0');
|
|
1047
|
+
var seconds = String(currentDateTime.getSeconds()).padStart(2, '0');
|
|
1048
|
+
|
|
1049
|
+
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* getHour
|
|
1054
|
+
* @desc 获取小时
|
|
1055
|
+
* @desc 返回给定日期或时间的小时部分
|
|
1056
|
+
* @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
|
|
1057
|
+
* @return {number} 给定日期或时间的小时部分
|
|
1058
|
+
**/
|
|
1059
|
+
var getHour = function getHour(datetime) {
|
|
1060
|
+
if (typeof datetime !== 'string') {
|
|
1061
|
+
throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
var datetimeObj = new Date(datetime);
|
|
1065
|
+
if (isNaN(datetimeObj.getTime())) {
|
|
1066
|
+
throw new Error("Invalid datetime format. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
return datetimeObj.getHours();
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* getWeekNumber
|
|
1074
|
+
* @desc 当年第几周
|
|
1075
|
+
* @desc 返回给定日期属于所在年的第几周
|
|
1076
|
+
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
1077
|
+
* @param {number} type - 可选参数,表示周的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
|
|
1078
|
+
* @return {number} 给定日期属于所在年的第几周
|
|
1079
|
+
**/
|
|
1080
|
+
var getWeekNumber = function getWeekNumber(date) {
|
|
1081
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
1082
|
+
|
|
1083
|
+
if (typeof date !== 'string') {
|
|
1084
|
+
throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
var dateObj = new Date(date);
|
|
1088
|
+
if (isNaN(dateObj.getTime())) {
|
|
1089
|
+
throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// Copy the date object to avoid modifying the original
|
|
1093
|
+
var clonedDate = new Date(dateObj);
|
|
1094
|
+
|
|
1095
|
+
// Set the time to the beginning of the year
|
|
1096
|
+
clonedDate.setMonth(0, 1);
|
|
1097
|
+
clonedDate.setHours(0, 0, 0, 0);
|
|
1098
|
+
|
|
1099
|
+
// Find the first day of the week
|
|
1100
|
+
var dayOfWeek = clonedDate.getDay();
|
|
1101
|
+
var firstDay = (dayOfWeek - type + 7) % 7;
|
|
1102
|
+
|
|
1103
|
+
// Adjust for days until the first Sunday/Monday
|
|
1104
|
+
clonedDate.setDate(1 + (type === 0 ? 7 - firstDay : 1 - firstDay));
|
|
1105
|
+
|
|
1106
|
+
// Calculate the week number
|
|
1107
|
+
var weekNumber = Math.ceil((dateObj - clonedDate) / (7 * 24 * 60 * 60 * 1000));
|
|
1108
|
+
|
|
1109
|
+
return weekNumber;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* getLength
|
|
1114
|
+
* @desc 计算字符个数
|
|
1115
|
+
* @desc 计算给定文本字符串的字符个数
|
|
1116
|
+
* @param {string} text - 要计算字符个数的文本字符串
|
|
1117
|
+
* @return {number} 文本字符串的字符个数
|
|
1118
|
+
**/
|
|
1119
|
+
var getLength = function getLength(text) {
|
|
1120
|
+
if (typeof text !== 'string') {
|
|
1121
|
+
throw new Error('Invalid input. Please provide a valid text string.');
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
return text.length;
|
|
1125
|
+
};
|
|
1126
|
+
|
|
927
1127
|
/**
|
|
928
1128
|
* getLightness
|
|
929
1129
|
* @desc:转换明度
|
|
@@ -936,6 +1136,46 @@ var getLightness = function getLightness($v, $i, $isLight) {
|
|
|
936
1136
|
return toFixed($value, 2);
|
|
937
1137
|
};
|
|
938
1138
|
|
|
1139
|
+
/**
|
|
1140
|
+
* getMinute
|
|
1141
|
+
* @desc 获取分钟
|
|
1142
|
+
* @desc 返回给定日期或时间的分钟部分
|
|
1143
|
+
* @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
|
|
1144
|
+
* @return {number} 给定日期或时间的分钟部分
|
|
1145
|
+
**/
|
|
1146
|
+
var getMinute = function getMinute(datetime) {
|
|
1147
|
+
if (typeof datetime !== 'string') {
|
|
1148
|
+
throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
var datetimeObj = new Date(datetime);
|
|
1152
|
+
if (isNaN(datetimeObj.getTime())) {
|
|
1153
|
+
throw new Error("Invalid datetime format. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
return datetimeObj.getMinutes();
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* getMonth
|
|
1161
|
+
* @desc 获取月份
|
|
1162
|
+
* @desc 返回给定日期的月份
|
|
1163
|
+
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
1164
|
+
* @return {number} 给定日期的月份
|
|
1165
|
+
**/
|
|
1166
|
+
var getMonth = function getMonth(date) {
|
|
1167
|
+
if (typeof date !== 'string') {
|
|
1168
|
+
throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
var dateObj = new Date(date);
|
|
1172
|
+
if (isNaN(dateObj.getTime())) {
|
|
1173
|
+
throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
return dateObj.getMonth() + 1; // Months are zero-indexed in JavaScript (0 is January)
|
|
1177
|
+
};
|
|
1178
|
+
|
|
939
1179
|
/**
|
|
940
1180
|
* getObjectType
|
|
941
1181
|
* @desc:获取数据类型
|
|
@@ -1129,6 +1369,26 @@ var getScript = function getScript(url, callback) {
|
|
|
1129
1369
|
});
|
|
1130
1370
|
};
|
|
1131
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* getSecond
|
|
1374
|
+
* @desc 获取秒数
|
|
1375
|
+
* @desc 返回给定日期或时间的秒钟部分
|
|
1376
|
+
* @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
|
|
1377
|
+
* @return {number} 给定日期或时间的秒钟部分
|
|
1378
|
+
**/
|
|
1379
|
+
var getSecond = function getSecond(datetime) {
|
|
1380
|
+
if (typeof datetime !== 'string') {
|
|
1381
|
+
throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
var datetimeObj = new Date(datetime);
|
|
1385
|
+
if (isNaN(datetimeObj.getTime())) {
|
|
1386
|
+
throw new Error("Invalid datetime format. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
return datetimeObj.getSeconds();
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1132
1392
|
/**
|
|
1133
1393
|
* getStorage
|
|
1134
1394
|
* @desc:获取本地储存数据
|
|
@@ -1298,6 +1558,35 @@ var getValues = function getValues(obj, flag) {
|
|
|
1298
1558
|
return val;
|
|
1299
1559
|
};
|
|
1300
1560
|
|
|
1561
|
+
/**
|
|
1562
|
+
* getWeekday
|
|
1563
|
+
* @desc 获取星期数
|
|
1564
|
+
* @desc 返回给定日期是所在星期的第几天
|
|
1565
|
+
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
1566
|
+
* @param {number} type - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
|
|
1567
|
+
* @return {number} 给定日期是所在星期的第几天
|
|
1568
|
+
**/
|
|
1569
|
+
var getWeekday = function getWeekday(date) {
|
|
1570
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1571
|
+
|
|
1572
|
+
if (typeof date !== 'string') {
|
|
1573
|
+
throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
var dateObj = new Date(date);
|
|
1577
|
+
if (isNaN(dateObj.getTime())) {
|
|
1578
|
+
throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
var dayOfWeek = dateObj.getDay();
|
|
1582
|
+
|
|
1583
|
+
// Calculate weekday based on the specified starting day
|
|
1584
|
+
var adjustedDay = (dayOfWeek - type + 7) % 7;
|
|
1585
|
+
|
|
1586
|
+
// Adjust for JavaScript's day numbering (0 is Sunday, 1 is Monday, etc.)
|
|
1587
|
+
return adjustedDay === 0 ? 7 : adjustedDay;
|
|
1588
|
+
};
|
|
1589
|
+
|
|
1301
1590
|
/**
|
|
1302
1591
|
* handlerUrl
|
|
1303
1592
|
* @desc:更新url参数中的时间戳
|
|
@@ -1737,6 +2026,21 @@ var loading = function loading($loading, res) {
|
|
|
1737
2026
|
}
|
|
1738
2027
|
};
|
|
1739
2028
|
|
|
2029
|
+
/**
|
|
2030
|
+
* lowerCase
|
|
2031
|
+
* @desc 大写转小写
|
|
2032
|
+
* @desc 将文本字符串中的大写字母转换为小写字母
|
|
2033
|
+
* @param {string} text - 要转换的文本字符串
|
|
2034
|
+
* @return {string} 转换为小写字母后的字符串
|
|
2035
|
+
**/
|
|
2036
|
+
var lowerCase = function lowerCase(text) {
|
|
2037
|
+
if (typeof text !== 'string') {
|
|
2038
|
+
throw new Error('Invalid input. Please provide a valid text string.');
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
return text.toLowerCase();
|
|
2042
|
+
};
|
|
2043
|
+
|
|
1740
2044
|
/**
|
|
1741
2045
|
* mixColor
|
|
1742
2046
|
* @desc:生成混合色
|
|
@@ -1898,6 +2202,74 @@ var rgbToHsv = function rgbToHsv($color) {
|
|
|
1898
2202
|
return [$h, $s, $v];
|
|
1899
2203
|
};
|
|
1900
2204
|
|
|
2205
|
+
/**
|
|
2206
|
+
* rmbToCapital
|
|
2207
|
+
* @desc 人民币大写
|
|
2208
|
+
* @desc 将人民币金额转换为大写形式
|
|
2209
|
+
* @param {number} number - 人民币金额
|
|
2210
|
+
* @return {string} 人民币大写形式
|
|
2211
|
+
**/
|
|
2212
|
+
var rmbToCapital = function rmbToCapital(number) {
|
|
2213
|
+
if (!Number.isFinite(number)) {
|
|
2214
|
+
throw new Error('Invalid input. Please provide a valid number for the RMB amount.');
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
var capitalUnits = ['', '万', '亿', '万亿'];
|
|
2218
|
+
var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
2219
|
+
|
|
2220
|
+
var result = '';
|
|
2221
|
+
var unitIndex = 0;
|
|
2222
|
+
|
|
2223
|
+
// 处理小数部分
|
|
2224
|
+
var decimalPart = Math.round(number % 1 * 100);
|
|
2225
|
+
if (decimalPart > 0) {
|
|
2226
|
+
result += '元';
|
|
2227
|
+
result += numberToChinese[Math.floor(decimalPart / 10)] + '角';
|
|
2228
|
+
result += numberToChinese[decimalPart % 10] + '分';
|
|
2229
|
+
} else {
|
|
2230
|
+
result += '元整';
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
// 处理整数部分
|
|
2234
|
+
var integerPart = Math.floor(number);
|
|
2235
|
+
while (integerPart > 0) {
|
|
2236
|
+
var chunk = integerPart % 10000;
|
|
2237
|
+
if (chunk > 0) {
|
|
2238
|
+
result = capitalUnits[unitIndex] + result;
|
|
2239
|
+
result = chunkToChinese(chunk) + result;
|
|
2240
|
+
}
|
|
2241
|
+
integerPart = Math.floor(integerPart / 10000);
|
|
2242
|
+
unitIndex++;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
return result;
|
|
2246
|
+
};
|
|
2247
|
+
|
|
2248
|
+
// 辅助函数,将四位数的整数转换为中文大写
|
|
2249
|
+
function chunkToChinese(chunk) {
|
|
2250
|
+
var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
2251
|
+
var capitalDigits = ['', '拾', '佰', '仟'];
|
|
2252
|
+
|
|
2253
|
+
var result = '';
|
|
2254
|
+
var digitIndex = 0;
|
|
2255
|
+
|
|
2256
|
+
while (chunk > 0) {
|
|
2257
|
+
var digit = chunk % 10;
|
|
2258
|
+
if (digit > 0) {
|
|
2259
|
+
result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
|
|
2260
|
+
} else {
|
|
2261
|
+
// 当前数字是零,需要判断是否需要添加零
|
|
2262
|
+
if (result.charAt(0) !== '零') {
|
|
2263
|
+
result = '零' + result;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
chunk = Math.floor(chunk / 10);
|
|
2267
|
+
digitIndex++;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
return result;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
1901
2273
|
/**
|
|
1902
2274
|
* sendMessage
|
|
1903
2275
|
* @desc:向iframe发送信息
|
|
@@ -1989,6 +2361,33 @@ var setStorage = function setStorage(_ref14) {
|
|
|
1989
2361
|
}
|
|
1990
2362
|
}
|
|
1991
2363
|
};
|
|
2364
|
+
|
|
2365
|
+
/**
|
|
2366
|
+
* sum
|
|
2367
|
+
* @desc 求和
|
|
2368
|
+
* @author SuTao
|
|
2369
|
+
* @date 2023年12月14日
|
|
2370
|
+
* @param {...number} numbers - 一列或多列数字
|
|
2371
|
+
* @return {number} 计算结果的总和
|
|
2372
|
+
**/
|
|
2373
|
+
function sum() {
|
|
2374
|
+
for (var _len3 = arguments.length, numbers = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
2375
|
+
numbers[_key3] = arguments[_key3];
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
// Ensure that all arguments are valid numbers
|
|
2379
|
+
if (!numbers.every(Number.isFinite)) {
|
|
2380
|
+
throw new Error('Invalid input. Please provide valid numbers.');
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
// Calculate the sum of the numbers
|
|
2384
|
+
var result = numbers.reduce(function (acc, num) {
|
|
2385
|
+
return acc + num;
|
|
2386
|
+
}, 0);
|
|
2387
|
+
|
|
2388
|
+
return result;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
1992
2391
|
/**
|
|
1993
2392
|
* startWith
|
|
1994
2393
|
* @desc:判断值是否以指定字符开头
|
|
@@ -2019,6 +2418,38 @@ var startWith = function startWith(value, reg) {
|
|
|
2019
2418
|
return false;
|
|
2020
2419
|
};
|
|
2021
2420
|
|
|
2421
|
+
/**
|
|
2422
|
+
* takeLeft
|
|
2423
|
+
* @desc 从左侧提取指定数量的字符
|
|
2424
|
+
* @desc 返回文本字符串的左侧指定数量的字符
|
|
2425
|
+
* @param {string} text - 要提取字符的文本字符串
|
|
2426
|
+
* @param {number} num_chars - 要返回的字符数量
|
|
2427
|
+
* @return {string} 从左侧提取的字符
|
|
2428
|
+
**/
|
|
2429
|
+
var takeLeft = function takeLeft(text, num_chars) {
|
|
2430
|
+
if (typeof text !== 'string' || !Number.isInteger(num_chars) || num_chars < 0) {
|
|
2431
|
+
throw new Error('Invalid input. Please provide a valid text string and a non-negative integer for the number of characters.');
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
return text.slice(0, num_chars);
|
|
2435
|
+
};
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* takeRight
|
|
2439
|
+
* @desc 从右返回指定个字符
|
|
2440
|
+
* @desc 返回文本字符串的右侧指定数量的字符
|
|
2441
|
+
* @param {string} text - 要提取字符的文本字符串
|
|
2442
|
+
* @param {number} num_chars - 要返回的字符数量
|
|
2443
|
+
* @return {string} 从右侧提取的字符
|
|
2444
|
+
**/
|
|
2445
|
+
var takeRight = function takeRight(text, num_chars) {
|
|
2446
|
+
if (typeof text !== 'string' || !Number.isInteger(num_chars) || num_chars < 0) {
|
|
2447
|
+
throw new Error('Invalid input. Please provide a valid text string and a non-negative integer for the number of characters.');
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
return text.slice(-num_chars);
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2022
2453
|
/**
|
|
2023
2454
|
* throttle
|
|
2024
2455
|
* @desc:添加js内容
|
|
@@ -2065,6 +2496,21 @@ var timeCycle = function timeCycle(date) {
|
|
|
2065
2496
|
return period;
|
|
2066
2497
|
};
|
|
2067
2498
|
|
|
2499
|
+
/**
|
|
2500
|
+
* trimWhitespace
|
|
2501
|
+
* @desc 删除首尾空格
|
|
2502
|
+
* @desc 删除文本字符串首尾的空格
|
|
2503
|
+
* @param {string} text - 要处理的文本字符串
|
|
2504
|
+
* @return {string} 删除首尾空格后的字符串
|
|
2505
|
+
**/
|
|
2506
|
+
var trimWhitespace = function trimWhitespace(text) {
|
|
2507
|
+
if (typeof text !== 'string') {
|
|
2508
|
+
throw new Error('Invalid input. Please provide a valid text string.');
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
return text.trim();
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2068
2514
|
/**
|
|
2069
2515
|
* toFixed
|
|
2070
2516
|
* @desc:浮点数保留小数位
|
|
@@ -2130,6 +2576,21 @@ var updateTheme = function updateTheme($color, send) {
|
|
|
2130
2576
|
}
|
|
2131
2577
|
};
|
|
2132
2578
|
|
|
2579
|
+
/**
|
|
2580
|
+
* upperCase
|
|
2581
|
+
* @desc 小写转大写
|
|
2582
|
+
* @desc 将文本字符串中的小写字母转换为大写字母
|
|
2583
|
+
* @param {string} text - 要转换的文本字符串
|
|
2584
|
+
* @return {string} 转换为大写字母后的字符串
|
|
2585
|
+
**/
|
|
2586
|
+
var upperCase = function upperCase(text) {
|
|
2587
|
+
if (typeof text !== 'string') {
|
|
2588
|
+
throw new Error('Invalid input. Please provide a valid text string.');
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
return text.toUpperCase();
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2133
2594
|
/**
|
|
2134
2595
|
* urlJoinParams
|
|
2135
2596
|
* @desc:对象转url拼接参数
|
|
@@ -2261,10 +2722,13 @@ var watermark = function watermark(option) {
|
|
|
2261
2722
|
exports.default = {
|
|
2262
2723
|
ajax: ajax,
|
|
2263
2724
|
arrUnique: arrUnique,
|
|
2725
|
+
average: average,
|
|
2264
2726
|
browser: browser,
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2727
|
+
calculateNetworkDays: calculateNetworkDays,
|
|
2728
|
+
concatenate: concatenate,
|
|
2729
|
+
dateAddDays: dateAddDays,
|
|
2730
|
+
dateDiff: dateDiff,
|
|
2731
|
+
dayOfMonth: dayOfMonth,
|
|
2268
2732
|
debounce: debounce,
|
|
2269
2733
|
delUrlParam: delUrlParam,
|
|
2270
2734
|
domEval: domEval,
|
|
@@ -2276,14 +2740,23 @@ exports.default = {
|
|
|
2276
2740
|
exportXls: exportXls,
|
|
2277
2741
|
extend: extend,
|
|
2278
2742
|
formatDate: formatDate,
|
|
2743
|
+
getCurrentDate: getCurrentDate,
|
|
2744
|
+
getCurrentDateTime: getCurrentDateTime,
|
|
2745
|
+
getHour: getHour,
|
|
2746
|
+
getWeekNumber: getWeekNumber,
|
|
2747
|
+
getLength: getLength,
|
|
2748
|
+
getMinute: getMinute,
|
|
2749
|
+
getMonth: getMonth,
|
|
2279
2750
|
getObjectType: getObjectType,
|
|
2280
2751
|
getParams: getParams,
|
|
2281
2752
|
getRgb: getRgb,
|
|
2282
2753
|
getScript: getScript,
|
|
2754
|
+
getSecond: getSecond,
|
|
2283
2755
|
getStorage: getStorage,
|
|
2284
2756
|
getStyle: getStyle,
|
|
2285
2757
|
getTypeName: getTypeName,
|
|
2286
2758
|
getValues: getValues,
|
|
2759
|
+
getWeekday: getWeekday,
|
|
2287
2760
|
handlerUrl: handlerUrl,
|
|
2288
2761
|
hasChars: hasChars,
|
|
2289
2762
|
hasClass: hasClass,
|
|
@@ -2297,6 +2770,7 @@ exports.default = {
|
|
|
2297
2770
|
jointUrl: jointUrl,
|
|
2298
2771
|
loadJs: loadJs,
|
|
2299
2772
|
loading: loading,
|
|
2773
|
+
lowerCase: lowerCase,
|
|
2300
2774
|
mixColor: mixColor,
|
|
2301
2775
|
overbrim: overbrim,
|
|
2302
2776
|
queryParams: queryParams,
|
|
@@ -2304,15 +2778,21 @@ exports.default = {
|
|
|
2304
2778
|
removeStorage: removeStorage,
|
|
2305
2779
|
replenish: replenish,
|
|
2306
2780
|
rgbToHsv: rgbToHsv,
|
|
2781
|
+
rmbToCapital: rmbToCapital,
|
|
2307
2782
|
sendMessage: sendMessage,
|
|
2308
2783
|
setFavicon: setFavicon,
|
|
2309
2784
|
setStorage: setStorage,
|
|
2310
2785
|
startWith: startWith,
|
|
2786
|
+
sum: sum,
|
|
2787
|
+
takeLeft: takeLeft,
|
|
2788
|
+
takeRight: takeRight,
|
|
2311
2789
|
throttle: throttle,
|
|
2312
2790
|
timeCycle: timeCycle,
|
|
2791
|
+
trimWhitespace: trimWhitespace,
|
|
2313
2792
|
toFixed: toFixed,
|
|
2314
2793
|
toFunction: toFunction,
|
|
2315
2794
|
updateTheme: updateTheme,
|
|
2795
|
+
upperCase: upperCase,
|
|
2316
2796
|
urlJoinParams: urlJoinParams,
|
|
2317
2797
|
uuid: uuid,
|
|
2318
2798
|
watermark: watermark,
|