eoss-ui 0.4.94 → 0.4.96

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.
Files changed (51) hide show
  1. package/lib/button-group.js +32 -25
  2. package/lib/button.js +32 -25
  3. package/lib/checkbox-group.js +32 -25
  4. package/lib/data-table-form.js +32 -25
  5. package/lib/data-table.js +32 -25
  6. package/lib/date-picker.js +32 -25
  7. package/lib/dialog.js +32 -25
  8. package/lib/eoss-ui.common.js +106 -107
  9. package/lib/flow-group.js +32 -25
  10. package/lib/flow-list.js +32 -25
  11. package/lib/flow.js +41 -29
  12. package/lib/form.js +32 -25
  13. package/lib/handle-user.js +32 -25
  14. package/lib/handler.js +32 -25
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +32 -25
  17. package/lib/input.js +32 -25
  18. package/lib/login.js +32 -25
  19. package/lib/main.js +86 -92
  20. package/lib/nav.js +32 -25
  21. package/lib/page.js +32 -25
  22. package/lib/player.js +32 -25
  23. package/lib/qr-code.js +32 -25
  24. package/lib/radio-group.js +32 -25
  25. package/lib/retrial-auth.js +32 -25
  26. package/lib/select-ganged.js +32 -25
  27. package/lib/select.js +32 -25
  28. package/lib/selector-panel.js +32 -25
  29. package/lib/selector.js +32 -25
  30. package/lib/sizer.js +32 -25
  31. package/lib/steps.js +32 -25
  32. package/lib/switch.js +32 -25
  33. package/lib/table-form.js +32 -25
  34. package/lib/tabs.js +32 -25
  35. package/lib/theme-chalk/index.css +1 -1
  36. package/lib/theme-chalk/toolbar.css +1 -1
  37. package/lib/tips.js +32 -25
  38. package/lib/tree-group.js +32 -25
  39. package/lib/tree.js +32 -25
  40. package/lib/upload.js +32 -25
  41. package/lib/utils/util.js +32 -25
  42. package/lib/wujie.js +32 -25
  43. package/lib/wxlogin.js +32 -25
  44. package/package.json +1 -1
  45. package/packages/flow/src/main.vue +58 -51
  46. package/packages/main/src/main.vue +36 -39
  47. package/packages/theme-chalk/lib/index.css +1 -1
  48. package/packages/theme-chalk/lib/toolbar.css +1 -1
  49. package/packages/theme-chalk/src/toolbar.scss +7 -0
  50. package/src/index.js +1 -1
  51. package/src/utils/util.js +64 -57
@@ -1 +1 @@
1
- @charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:12px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}.es-toolbar .el-form-item__content,.es-toolbar .el-form-item__label{line-height:32px!important}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}
1
+ @charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:12px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange{max-width:300px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-input__icon,.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-range-separator{line-height:24px}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}.es-toolbar .el-form-item__content,.es-toolbar .el-form-item__label{line-height:32px!important}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}
@@ -83,6 +83,13 @@
83
83
  .el-input__inner {
84
84
  width: 100%;
85
85
  max-width: 156px;
86
+ &.el-date-editor--daterange {
87
+ max-width: 300px;
88
+ .el-input__icon,
89
+ .el-range-separator {
90
+ line-height: 24px;
91
+ }
92
+ }
86
93
  }
87
94
  }
88
95
  }
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.94',
120
+ version: '0.4.96',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -448,7 +448,7 @@ const arrUnique = function (data, key) {
448
448
  * @param {...number} numbers - 一组数字
449
449
  * @return {number} 数组中数字的平均值
450
450
  **/
451
- const average = function(...numbers) {
451
+ const average = function (...numbers) {
452
452
  // Ensure that all arguments are valid numbers
453
453
  if (!numbers.every(Number.isFinite)) {
454
454
  throw new Error('Invalid input. Please provide valid numbers.');
@@ -485,7 +485,7 @@ const browser = function () {
485
485
  * @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
486
486
  * @return {number} 工作日天数
487
487
  **/
488
- const calculateNetworkDays = function(start_date, end_date, holidays = []) {
488
+ const calculateNetworkDays = function (start_date, end_date, holidays = []) {
489
489
  if (typeof start_date !== 'string' || typeof end_date !== 'string') {
490
490
  throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
491
491
  }
@@ -533,7 +533,7 @@ const calculateNetworkDays = function(start_date, end_date, holidays = []) {
533
533
  * @param {...string} strings - 多个文本字符串
534
534
  * @return {string} 合并后的字符串
535
535
  **/
536
- const concatenate = function(separator, ...strings) {
536
+ const concatenate = function (separator, ...strings) {
537
537
  if (typeof separator !== 'string' || !strings.every(str => typeof str === 'string')) {
538
538
  throw new Error('Invalid input. Please provide a valid separator and valid strings.');
539
539
  }
@@ -548,7 +548,7 @@ const concatenate = function(separator, ...strings) {
548
548
  * @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
549
549
  * @return {string} 计算后的日期字符串
550
550
  **/
551
- const dateAddDays = function(start_date, days) {
551
+ const dateAddDays = function (start_date, days) {
552
552
  if (typeof start_date !== 'string' || !Number.isInteger(days)) {
553
553
  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.");
554
554
  }
@@ -578,7 +578,7 @@ const dateAddDays = function(start_date, days) {
578
578
  * @param {String} [unit] - 计算的时间单位 ("y", "M", "d", "h", "m", "s")
579
579
  * @return {Number} 两个日期之间的差距
580
580
  **/
581
- const dateDiff = function(start_date, end_date, unit) {
581
+ const dateDiff = function (start_date, end_date, unit) {
582
582
  // Assuming date strings are in "YYYY-MM-DD" format
583
583
  var startDate = new Date(start_date);
584
584
  var endDate = new Date(end_date);
@@ -614,7 +614,7 @@ const dateDiff = function(start_date, end_date, unit) {
614
614
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
615
615
  * @return {number} 当月的第几天
616
616
  **/
617
- const dayOfMonth = function(date) {
617
+ const dayOfMonth = function (date) {
618
618
  if (typeof date !== 'string') {
619
619
  throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
620
620
  }
@@ -651,22 +651,42 @@ const debounce = function (callback, delay) {
651
651
  * @author huangbo
652
652
  * @date 2022年5月7日
653
653
  * @param {String} [url] - url地址
654
- * @param {String} [key] - 参数名
654
+ * @param {String,Array} [key] - 参数名
655
655
  **/
656
656
  const delUrlParam = function ({ url, key }) {
657
657
  let src = url ? decodeURI(url) : decodeURI(win.top.location.href);
658
658
  let param = getParams({ url: src });
659
- if (param && param.hasOwnProperty(key)) {
660
- let reg = `${key}=${param[key]}`;
661
- if (Object.keys(param).length > 1) {
662
- if (src.indexOf(reg + '&') > -1) {
663
- src = src.replace(reg + '&', '');
664
- }
665
- if (src.indexOf('&' + reg) > -1) {
666
- src = src.replace('&' + reg, '');
667
- }
659
+ if (param && key.length) {
660
+ if (Array.isArray(key)) {
661
+ key.forEach(item => {
662
+ if (param.hasOwnProperty(item)) {
663
+ let reg = `${item}=${param[item]}`;
664
+ if (src.indexOf(reg + '&') > -1) {
665
+ src = src.replace(reg + '&', '');
666
+ } else if (src.indexOf('&' + reg) > -1) {
667
+ src = src.replace('&' + reg, '');
668
+ } else {
669
+ src = src.replace(reg, '');
670
+ }
671
+ }
672
+ if (Object.keys(param).length === key.length) {
673
+ src = src.replace('?', '');
674
+ }
675
+ });
668
676
  } else {
669
- src = src.replace('?' + reg, '');
677
+ if (param.hasOwnProperty(key)) {
678
+ let reg = `${key}=${param[key]}`;
679
+ if (Object.keys(param).length > 1) {
680
+ if (src.indexOf(reg + '&') > -1) {
681
+ src = src.replace(reg + '&', '');
682
+ }
683
+ if (src.indexOf('&' + reg) > -1) {
684
+ src = src.replace('&' + reg, '');
685
+ }
686
+ } else {
687
+ src = src.replace('?' + reg, '');
688
+ }
689
+ }
670
690
  }
671
691
  }
672
692
  return src;
@@ -1069,7 +1089,7 @@ const getHue = function ($h, $i, $isLight) {
1069
1089
  * @desc 返回当前日期
1070
1090
  * @return {string} 当前日期字符串,格式为 "YYYY-MM-DD"
1071
1091
  **/
1072
- const getCurrentDate = function() {
1092
+ const getCurrentDate = function () {
1073
1093
  const today = new Date();
1074
1094
 
1075
1095
  const year = today.getFullYear();
@@ -1085,7 +1105,7 @@ const getCurrentDate = function() {
1085
1105
  * @desc 返回当前日期和时间
1086
1106
  * @return {string} 当前日期和时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
1087
1107
  **/
1088
- const getCurrentDateTime = function() {
1108
+ const getCurrentDateTime = function () {
1089
1109
  const currentDateTime = new Date();
1090
1110
 
1091
1111
  const year = currentDateTime.getFullYear();
@@ -1105,7 +1125,7 @@ const getCurrentDateTime = function() {
1105
1125
  * @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
1106
1126
  * @return {number} 给定日期或时间的小时部分
1107
1127
  **/
1108
- const getHour = function(datetime) {
1128
+ const getHour = function (datetime) {
1109
1129
  if (typeof datetime !== 'string') {
1110
1130
  throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
1111
1131
  }
@@ -1126,7 +1146,7 @@ const getHour = function(datetime) {
1126
1146
  * @param {number} type - 可选参数,表示周的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
1127
1147
  * @return {number} 给定日期属于所在年的第几周
1128
1148
  **/
1129
- const getWeekNumber = function(date, type = 1) {
1149
+ const getWeekNumber = function (date, type = 1) {
1130
1150
  if (typeof date !== 'string') {
1131
1151
  throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
1132
1152
  }
@@ -1163,7 +1183,7 @@ const getWeekNumber = function(date, type = 1) {
1163
1183
  * @param {string} text - 要计算字符个数的文本字符串
1164
1184
  * @return {number} 文本字符串的字符个数
1165
1185
  **/
1166
- const getLength = function(text) {
1186
+ const getLength = function (text) {
1167
1187
  if (typeof text !== 'string') {
1168
1188
  throw new Error('Invalid input. Please provide a valid text string.');
1169
1189
  }
@@ -1192,7 +1212,7 @@ const getLightness = function ($v, $i, $isLight) {
1192
1212
  * @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
1193
1213
  * @return {number} 给定日期或时间的分钟部分
1194
1214
  **/
1195
- const getMinute = function(datetime) {
1215
+ const getMinute = function (datetime) {
1196
1216
  if (typeof datetime !== 'string') {
1197
1217
  throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
1198
1218
  }
@@ -1212,7 +1232,7 @@ const getMinute = function(datetime) {
1212
1232
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
1213
1233
  * @return {number} 给定日期的月份
1214
1234
  **/
1215
- const getMonth = function(date) {
1235
+ const getMonth = function (date) {
1216
1236
  if (typeof date !== 'string') {
1217
1237
  throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
1218
1238
  }
@@ -1432,7 +1452,7 @@ const getScript = function (url, callback) {
1432
1452
  * @param {string} datetime - 日期时间字符串,格式为 "YYYY-MM-DD HH:mm:ss"
1433
1453
  * @return {number} 给定日期或时间的秒钟部分
1434
1454
  **/
1435
- const getSecond = function(datetime) {
1455
+ const getSecond = function (datetime) {
1436
1456
  if (typeof datetime !== 'string') {
1437
1457
  throw new Error("Invalid input. Please provide a valid datetime string in the format 'YYYY-MM-DD HH:mm:ss'.");
1438
1458
  }
@@ -1638,7 +1658,7 @@ const getValues = function (obj, flag) {
1638
1658
  * @param {number} type - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
1639
1659
  * @return {number} 给定日期是所在星期的第几天
1640
1660
  **/
1641
- const getWeekday = function(date, type = 0) {
1661
+ const getWeekday = function (date, type = 0) {
1642
1662
  if (typeof date !== 'string') {
1643
1663
  throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
1644
1664
  }
@@ -1863,17 +1883,17 @@ const isLogined = function ({
1863
1883
  if (logined || cookie == true || cookie == 1) {
1864
1884
  if (loginPage) {
1865
1885
  sessionStorage.setItem('loginPage', loginPage);
1866
- if (!startWith(loginPage, ['http', '/'], true)) {
1867
- let pathname = win.top.location.pathname;
1868
- if (pathname !== '/') {
1869
- pathname = pathname.split('/');
1870
- pathname.splice(pathname.length - 1);
1871
- pathname = pathname.join('/');
1872
- loginPage = pathname + '/' + loginPage.replace('./', '');
1873
- } else {
1874
- loginPage = pathname + loginPage.replace('./', '');
1875
- }
1886
+ if (!startWith(loginPage, ['http', '/'], true)) {
1887
+ let pathname = win.top.location.pathname;
1888
+ if (pathname !== '/') {
1889
+ pathname = pathname.split('/');
1890
+ pathname.splice(pathname.length - 1);
1891
+ pathname = pathname.join('/');
1892
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1893
+ } else {
1894
+ loginPage = pathname + loginPage.replace('./', '');
1876
1895
  }
1896
+ }
1877
1897
  }
1878
1898
  next();
1879
1899
  } else {
@@ -1882,20 +1902,6 @@ const isLogined = function ({
1882
1902
  !token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') &&
1883
1903
  Object.prototype.hasOwnProperty.call(to.query, 'authType')
1884
1904
  ) {
1885
- let url = win.top.location.href;
1886
- if (to.query.openType) {
1887
- switch (to.query.openType) {
1888
- case 'self':
1889
- url = win.location.href;
1890
- break;
1891
- case 'blank':
1892
- url = win.open(url);
1893
- break;
1894
- case 'parent':
1895
- url = win.parent.location.href;
1896
- break;
1897
- }
1898
- }
1899
1905
  ajax({
1900
1906
  method: 'post',
1901
1907
  url: authCenter,
@@ -1922,6 +1928,7 @@ const isLogined = function ({
1922
1928
  case 2:
1923
1929
  break;
1924
1930
  case 3:
1931
+ let url = win.top.location.href;
1925
1932
  const href = results.authorizeUrl.replace(
1926
1933
  '{redirectUri}',
1927
1934
  encodeURIComponent(url)
@@ -2154,7 +2161,7 @@ const loading = function ($loading, res) {
2154
2161
  * @param {string} text - 要转换的文本字符串
2155
2162
  * @return {string} 转换为小写字母后的字符串
2156
2163
  **/
2157
- const lowerCase = function(text) {
2164
+ const lowerCase = function (text) {
2158
2165
  if (typeof text !== 'string') {
2159
2166
  throw new Error('Invalid input. Please provide a valid text string.');
2160
2167
  }
@@ -2322,7 +2329,7 @@ const rgbToHsv = function ($color) {
2322
2329
  * @param {number} number - 人民币金额
2323
2330
  * @return {string} 人民币大写形式
2324
2331
  **/
2325
- const rmbToCapital = function(number) {
2332
+ const rmbToCapital = function (number) {
2326
2333
  if (!Number.isFinite(number)) {
2327
2334
  throw new Error('Invalid input. Please provide a valid number for the RMB amount.');
2328
2335
  }
@@ -2523,7 +2530,7 @@ const startWith = function (value, reg, or = true) {
2523
2530
  * @param {number} num_chars - 要返回的字符数量
2524
2531
  * @return {string} 从左侧提取的字符
2525
2532
  **/
2526
- const takeLeft = function(text, num_chars) {
2533
+ const takeLeft = function (text, num_chars) {
2527
2534
  if (typeof text !== 'string' || !Number.isInteger(num_chars) || num_chars < 0) {
2528
2535
  throw new Error('Invalid input. Please provide a valid text string and a non-negative integer for the number of characters.');
2529
2536
  }
@@ -2539,7 +2546,7 @@ const takeLeft = function(text, num_chars) {
2539
2546
  * @param {number} num_chars - 要返回的字符数量
2540
2547
  * @return {string} 从右侧提取的字符
2541
2548
  **/
2542
- const takeRight = function(text, num_chars) {
2549
+ const takeRight = function (text, num_chars) {
2543
2550
  if (typeof text !== 'string' || !Number.isInteger(num_chars) || num_chars < 0) {
2544
2551
  throw new Error('Invalid input. Please provide a valid text string and a non-negative integer for the number of characters.');
2545
2552
  }
@@ -2600,7 +2607,7 @@ const timeCycle = function (date) {
2600
2607
  * @param {string} text - 要处理的文本字符串
2601
2608
  * @return {string} 删除首尾空格后的字符串
2602
2609
  **/
2603
- const trimWhitespace = function(text) {
2610
+ const trimWhitespace = function (text) {
2604
2611
  if (typeof text !== 'string') {
2605
2612
  throw new Error('Invalid input. Please provide a valid text string.');
2606
2613
  }
@@ -2691,7 +2698,7 @@ const updateTheme = function ($color, send) {
2691
2698
  * @param {string} text - 要转换的文本字符串
2692
2699
  * @return {string} 转换为大写字母后的字符串
2693
2700
  **/
2694
- const upperCase = function(text) {
2701
+ const upperCase = function (text) {
2695
2702
  if (typeof text !== 'string') {
2696
2703
  throw new Error('Invalid input. Please provide a valid text string.');
2697
2704
  }
@@ -2755,7 +2762,7 @@ const uuid = function (len) {
2755
2762
  **/
2756
2763
  const watermark = function (option) {
2757
2764
  // 默认设置
2758
- let _width = parseInt(option.width || 480, 10) ;
2765
+ let _width = parseInt(option.width || 480, 10);
2759
2766
  let _height = parseInt(option.width || 180, 10);
2760
2767
  let _rows = Math.round(document.body.clientHeight / _height);
2761
2768
  let _cols = Math.round(document.body.clientWidth / _width);