eoss 0.1.0-alpha.35 → 0.1.0-alpha.37

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 (228) hide show
  1. package/lib/0.js +1 -1
  2. package/lib/1.js +1 -1
  3. package/lib/10.js +1 -1
  4. package/lib/11.js +1 -1
  5. package/lib/12.js +1 -1
  6. package/lib/13.js +1 -1
  7. package/lib/14.js +1 -1
  8. package/lib/15.js +1 -1
  9. package/lib/16.js +1 -1
  10. package/lib/17.js +1 -1
  11. package/lib/18.js +1 -1
  12. package/lib/19.js +1 -1
  13. package/lib/20.js +1 -1
  14. package/lib/21.js +1 -1
  15. package/lib/22.js +1 -1
  16. package/lib/23.js +1 -1
  17. package/lib/24.js +1 -1
  18. package/lib/25.js +1 -1
  19. package/lib/26.js +1 -1
  20. package/lib/27.js +1 -1
  21. package/lib/28.js +1 -1
  22. package/lib/29.js +1 -1
  23. package/lib/3.js +1 -1
  24. package/lib/30.js +1 -1
  25. package/lib/31.js +1 -1
  26. package/lib/32.js +1 -1
  27. package/lib/33.js +1 -1
  28. package/lib/34.js +1 -1
  29. package/lib/35.js +1 -1
  30. package/lib/36.js +1 -1
  31. package/lib/37.js +1 -1
  32. package/lib/38.js +1 -1
  33. package/lib/39.js +1 -1
  34. package/lib/4.js +1 -1
  35. package/lib/40.js +1 -1
  36. package/lib/41.js +1 -1
  37. package/lib/42.js +1 -1
  38. package/lib/43.js +1 -1
  39. package/lib/44.js +1 -1
  40. package/lib/45.js +1 -1
  41. package/lib/46.js +1 -1
  42. package/lib/47.js +1 -1
  43. package/lib/48.js +1 -1
  44. package/lib/49.js +1 -1
  45. package/lib/5.js +1 -1
  46. package/lib/50.js +1 -1
  47. package/lib/51.js +1 -1
  48. package/lib/52.js +1 -1
  49. package/lib/53.js +1 -1
  50. package/lib/54.js +1 -1
  51. package/lib/55.js +1 -1
  52. package/lib/56.js +1 -1
  53. package/lib/57.js +1 -1
  54. package/lib/58.js +1 -1
  55. package/lib/59.js +1 -1
  56. package/lib/6.js +1 -1
  57. package/lib/60.js +1 -1
  58. package/lib/61.js +1 -1
  59. package/lib/62.js +1 -1
  60. package/lib/63.js +1 -1
  61. package/lib/64.js +1 -1
  62. package/lib/65.js +1 -1
  63. package/lib/66.js +1 -1
  64. package/lib/67.js +1 -1
  65. package/lib/68.js +1 -1
  66. package/lib/69.js +1 -1
  67. package/lib/7.js +1 -1
  68. package/lib/70.js +1 -1
  69. package/lib/71.js +1 -1
  70. package/lib/72.js +1 -1
  71. package/lib/73.js +1 -1
  72. package/lib/74.js +1 -1
  73. package/lib/75.js +1 -1
  74. package/lib/76.js +1 -1
  75. package/lib/77.js +1 -1
  76. package/lib/78.js +1 -1
  77. package/lib/79.js +1 -1
  78. package/lib/8.js +1 -1
  79. package/lib/80.js +1 -1
  80. package/lib/81.js +1 -1
  81. package/lib/9.js +1 -1
  82. package/lib/account-login.js +1101 -1035
  83. package/lib/alert.js +2 -2
  84. package/lib/aside.js +2 -2
  85. package/lib/audit-trajectory.js +150 -150
  86. package/lib/autocomplete.js +2095 -1871
  87. package/lib/avatar.js +2 -2
  88. package/lib/backtop.js +2 -2
  89. package/lib/badge.js +2 -2
  90. package/lib/breadcrumb-item.js +4 -4
  91. package/lib/breadcrumb.js +4 -4
  92. package/lib/button-group.js +4 -4
  93. package/lib/button.js +2 -2
  94. package/lib/ca-login.js +862 -837
  95. package/lib/calendar.js +864 -839
  96. package/lib/card.js +2 -2
  97. package/lib/carousel-item.js +864 -839
  98. package/lib/carousel.js +866 -841
  99. package/lib/cascader-panel.js +878 -853
  100. package/lib/cascader.js +2325 -2101
  101. package/lib/checkbox-button.js +4 -4
  102. package/lib/checkbox-group.js +1060 -1025
  103. package/lib/checkbox.js +6 -6
  104. package/lib/col.js +2 -2
  105. package/lib/collapse-item.js +920 -895
  106. package/lib/collapse.js +913 -888
  107. package/lib/color-picker.js +1155 -956
  108. package/lib/container.js +2 -2
  109. package/lib/cron.js +18 -18
  110. package/lib/data-table.js +1053 -1018
  111. package/lib/date-picker.js +2094 -1870
  112. package/lib/descriptions-item.js +144 -0
  113. package/lib/descriptions.js +561 -0
  114. package/lib/dialog.js +943 -918
  115. package/lib/divider.js +2 -2
  116. package/lib/drawer.js +12 -12
  117. package/lib/dropdown-item.js +6 -6
  118. package/lib/dropdown-menu.js +1157 -958
  119. package/lib/dropdown.js +870 -845
  120. package/lib/email-login.js +1047 -1012
  121. package/lib/empty.js +2 -2
  122. package/lib/eoss.common.js +3493 -2313
  123. package/lib/flip.js +2 -2
  124. package/lib/flow-group.js +876 -851
  125. package/lib/flow.js +1184 -1149
  126. package/lib/flows.js +1080 -1045
  127. package/lib/footer.js +2 -2
  128. package/lib/form-item.js +877 -852
  129. package/lib/form.js +1123 -1087
  130. package/lib/guide.js +2 -2
  131. package/lib/header.js +2 -2
  132. package/lib/icon.js +1009 -984
  133. package/lib/icons.js +6 -6
  134. package/lib/image-viewer.js +862 -837
  135. package/lib/image.js +4 -4
  136. package/lib/index.js +1 -1
  137. package/lib/infinite-scroll.js +2 -2
  138. package/lib/input-number.js +6 -6
  139. package/lib/input.js +870 -845
  140. package/lib/link.js +2 -2
  141. package/lib/loading.js +13 -13
  142. package/lib/login.js +1116 -1066
  143. package/lib/lowcode-view.js +1078 -1043
  144. package/lib/lowcode.js +1131 -1096
  145. package/lib/main.js +1185 -1148
  146. package/lib/marquee.js +862 -837
  147. package/lib/menu-item-group.js +20 -17
  148. package/lib/menu-item.js +8 -8
  149. package/lib/menu.js +2390 -2164
  150. package/lib/message-box.js +950 -925
  151. package/lib/message.js +941 -916
  152. package/lib/notification.js +962 -937
  153. package/lib/option-group.js +4 -4
  154. package/lib/option.js +871 -846
  155. package/lib/page-header.js +2 -2
  156. package/lib/pagination.js +866 -841
  157. package/lib/phone-login.js +1049 -1014
  158. package/lib/popconfirm.js +4 -4
  159. package/lib/popover.js +2100 -1876
  160. package/lib/process-config.js +1065 -1030
  161. package/lib/process-module.js +1053 -1018
  162. package/lib/process-rule.js +1062 -1027
  163. package/lib/progress.js +2 -2
  164. package/lib/qr-code.js +4 -4
  165. package/lib/qrcode-login.js +1052 -1017
  166. package/lib/radio-button.js +4 -4
  167. package/lib/radio-group.js +2608 -2573
  168. package/lib/radio.js +6 -6
  169. package/lib/rate.js +864 -839
  170. package/lib/retrial-auth.js +7063 -0
  171. package/lib/row.js +2 -2
  172. package/lib/scrollbar.js +868 -843
  173. package/lib/select.js +2591 -2357
  174. package/lib/selector-panel.js +2659 -2624
  175. package/lib/selector.js +1068 -1033
  176. package/lib/slider.js +6 -6
  177. package/lib/step.js +44 -44
  178. package/lib/steps.js +911 -886
  179. package/lib/submenu.js +1439 -1236
  180. package/lib/switch.js +866 -841
  181. package/lib/tab-pane.js +4 -4
  182. package/lib/table-column.js +936 -911
  183. package/lib/table.js +2318 -2084
  184. package/lib/tabs.js +866 -841
  185. package/lib/tag.js +2 -2
  186. package/lib/theme-chalk/base.css +1 -1
  187. package/lib/theme-chalk/descriptions.css +1 -1
  188. package/lib/theme-chalk/index.css +1 -1
  189. package/lib/theme-chalk/main.css +1 -1
  190. package/lib/theme-chalk/retrial-auth.css +1 -0
  191. package/lib/time-picker.js +2047 -1823
  192. package/lib/time-select.js +2041 -1817
  193. package/lib/timeline-item.js +2 -2
  194. package/lib/timeline.js +2 -2
  195. package/lib/tips.js +1047 -1012
  196. package/lib/toolbar.js +36 -17
  197. package/lib/tooltip.js +2080 -1856
  198. package/lib/transfer.js +881 -856
  199. package/lib/tree-group.js +1020 -995
  200. package/lib/tree.js +1062 -1027
  201. package/lib/update-history.js +151 -151
  202. package/lib/upload.js +1082 -1047
  203. package/lib/utils/ajax.js +5 -1
  204. package/lib/utils/popper.js +97 -48
  205. package/lib/wujie.js +866 -841
  206. package/package.json +1 -1
  207. package/packages/account-login/src/account-login.vue +29 -0
  208. package/packages/descriptions/index.js +8 -0
  209. package/packages/descriptions/src/index.js +181 -0
  210. package/packages/descriptions/src/item.js +30 -0
  211. package/packages/descriptions/src/row.js +120 -0
  212. package/packages/descriptions-item/index.js +8 -0
  213. package/packages/login/src/login.vue +8 -0
  214. package/packages/login/src/mixins.js +3 -1
  215. package/packages/main/src/minxs.js +1 -0
  216. package/packages/menu/src/menu.vue +0 -1
  217. package/packages/menu/src/mixins.js +4 -3
  218. package/packages/menu/src/submenu.vue +4 -4
  219. package/packages/retrial-auth/index.js +5 -0
  220. package/packages/retrial-auth/src/main.vue +300 -0
  221. package/packages/theme-chalk/src/base.scss +2 -1
  222. package/packages/theme-chalk/src/descriptions.scss +0 -1
  223. package/packages/theme-chalk/src/index.scss +3 -0
  224. package/packages/theme-chalk/src/retrial-auth.scss +38 -0
  225. package/packages/toolbar/src/toolbar.vue +5 -0
  226. package/src/index.js +336 -327
  227. package/src/utils/ajax.js +2 -1
  228. package/src/utils/popper.js +109 -70
package/lib/steps.js CHANGED
@@ -37,7 +37,7 @@ module.exports =
37
37
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
38
38
  /******/ // Promise = chunk loading, 0 = chunk loaded
39
39
  /******/ var installedChunks = {
40
- /******/ 91: 0
40
+ /******/ 94: 0
41
41
  /******/ };
42
42
  /******/
43
43
  /******/
@@ -136,7 +136,7 @@ module.exports =
136
136
  /******/
137
137
  /******/
138
138
  /******/ // Load entry module and return exports
139
- /******/ return __webpack_require__(__webpack_require__.s = 254);
139
+ /******/ return __webpack_require__(__webpack_require__.s = 258);
140
140
  /******/ })
141
141
  /************************************************************************/
142
142
  /******/ ({
@@ -3339,7 +3339,7 @@ var warning = function warning(content, _callback3) {
3339
3339
 
3340
3340
  /***/ }),
3341
3341
 
3342
- /***/ 110:
3342
+ /***/ 112:
3343
3343
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3344
3344
 
3345
3345
  "use strict";
@@ -3653,7 +3653,7 @@ var icon_ = __webpack_require__(26);
3653
3653
  var icon_default = /*#__PURE__*/__webpack_require__.n(icon_);
3654
3654
 
3655
3655
  // EXTERNAL MODULE: ./src/components/field-render.vue + 4 modules
3656
- var field_render = __webpack_require__(76);
3656
+ var field_render = __webpack_require__(77);
3657
3657
 
3658
3658
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/step.vue?vue&type=script&lang=js&
3659
3659
  //
@@ -4277,7 +4277,7 @@ module.exports = require("vue");
4277
4277
 
4278
4278
  /***/ }),
4279
4279
 
4280
- /***/ 254:
4280
+ /***/ 258:
4281
4281
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4282
4282
 
4283
4283
  "use strict";
@@ -4331,10 +4331,10 @@ render._withStripped = true
4331
4331
  // CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=template&id=0ff3703a&
4332
4332
 
4333
4333
  // EXTERNAL MODULE: ./src/mixins/migrating.js
4334
- var migrating = __webpack_require__(45);
4334
+ var migrating = __webpack_require__(46);
4335
4335
 
4336
4336
  // EXTERNAL MODULE: ./packages/steps/src/step.vue + 4 modules
4337
- var step = __webpack_require__(110);
4337
+ var step = __webpack_require__(112);
4338
4338
 
4339
4339
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/steps.vue?vue&type=script&lang=js&
4340
4340
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -4663,13 +4663,6 @@ function isDefined(val) {
4663
4663
 
4664
4664
  /***/ }),
4665
4665
 
4666
- /***/ 39:
4667
- /***/ (function(module, exports) {
4668
-
4669
- module.exports = require("eoss/lib/checkbox-group");
4670
-
4671
- /***/ }),
4672
-
4673
4666
  /***/ 4:
4674
4667
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4675
4668
 
@@ -4778,18 +4771,25 @@ function normalizeComponent(
4778
4771
  /***/ 40:
4779
4772
  /***/ (function(module, exports) {
4780
4773
 
4774
+ module.exports = require("eoss/lib/checkbox-group");
4775
+
4776
+ /***/ }),
4777
+
4778
+ /***/ 41:
4779
+ /***/ (function(module, exports) {
4780
+
4781
4781
  module.exports = require("eoss/lib/select");
4782
4782
 
4783
4783
  /***/ }),
4784
4784
 
4785
- /***/ 43:
4785
+ /***/ 44:
4786
4786
  /***/ (function(module, exports) {
4787
4787
 
4788
4788
  module.exports = require("eoss/lib/radio-group");
4789
4789
 
4790
4790
  /***/ }),
4791
4791
 
4792
- /***/ 45:
4792
+ /***/ 46:
4793
4793
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4794
4794
 
4795
4795
  "use strict";
@@ -4861,55 +4861,48 @@ module.exports = require("eoss/lib/radio-group");
4861
4861
 
4862
4862
  /***/ }),
4863
4863
 
4864
- /***/ 48:
4864
+ /***/ 49:
4865
4865
  /***/ (function(module, exports) {
4866
4866
 
4867
4867
  module.exports = require("eoss/lib/upload");
4868
4868
 
4869
4869
  /***/ }),
4870
4870
 
4871
- /***/ 49:
4871
+ /***/ 50:
4872
4872
  /***/ (function(module, exports) {
4873
4873
 
4874
4874
  module.exports = require("eoss/lib/tree");
4875
4875
 
4876
4876
  /***/ }),
4877
4877
 
4878
- /***/ 53:
4878
+ /***/ 54:
4879
4879
  /***/ (function(module, exports) {
4880
4880
 
4881
4881
  module.exports = require("eoss/lib/input-number");
4882
4882
 
4883
4883
  /***/ }),
4884
4884
 
4885
- /***/ 63:
4885
+ /***/ 64:
4886
4886
  /***/ (function(module, exports) {
4887
4887
 
4888
4888
  module.exports = require("eoss/lib/switch");
4889
4889
 
4890
4890
  /***/ }),
4891
4891
 
4892
- /***/ 64:
4892
+ /***/ 65:
4893
4893
  /***/ (function(module, exports) {
4894
4894
 
4895
4895
  module.exports = require("eoss/lib/color-picker");
4896
4896
 
4897
4897
  /***/ }),
4898
4898
 
4899
- /***/ 65:
4899
+ /***/ 66:
4900
4900
  /***/ (function(module, exports) {
4901
4901
 
4902
4902
  module.exports = require("eoss/lib/selector");
4903
4903
 
4904
4904
  /***/ }),
4905
4905
 
4906
- /***/ 69:
4907
- /***/ (function(module, exports) {
4908
-
4909
- module.exports = require("eoss/lib/cascader");
4910
-
4911
- /***/ }),
4912
-
4913
4906
  /***/ 7:
4914
4907
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4915
4908
 
@@ -4960,736 +4953,759 @@ module.exports = require("eoss/lib/cascader");
4960
4953
  /* unused harmony export getSecond */
4961
4954
  /* unused harmony export getWeekday */
4962
4955
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
4963
-
4964
-
4956
+ /* Modified from https://github.com/taylorhakes/fecha
4957
+ *
4958
+ * The MIT License (MIT)
4959
+ *
4960
+ * Copyright (c) 2015 Taylor Hakes
4961
+ *
4962
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4963
+ * of this software and associated documentation files (the "Software"), to deal
4964
+ * in the Software without restriction, including without limitation the rights
4965
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4966
+ * copies of the Software, and to permit persons to whom the Software is
4967
+ * furnished to do so, subject to the following conditions:
4968
+ *
4969
+ * The above copyright notice and this permission notice shall be included in all
4970
+ * copies or substantial portions of the Software.
4971
+ *
4972
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4973
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4974
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4975
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4976
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4977
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4978
+ * SOFTWARE.
4979
+ */
4980
+
4981
+ /*eslint-disable*/
4982
+ // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
4983
+
4984
+
4965
4985
  /**
4966
4986
  * Parse or format dates
4967
4987
  * @class fecha
4968
- */
4969
- var fecha = {};
4970
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
4971
- var twoDigits = '\\d\\d?';
4972
- var threeDigits = '\\d{3}';
4973
- var fourDigits = '\\d{4}';
4974
- var word = '[^\\s]+';
4975
- var literal = /\[([^]*?)\]/gm;
4976
- var noop = function noop() {};
4977
-
4978
- function regexEscape(str) {
4979
- return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
4980
- }
4981
-
4982
- function shorten(arr, sLen) {
4983
- var newArr = [];
4984
- for (var i = 0, len = arr.length; i < len; i++) {
4985
- newArr.push(arr[i].substr(0, sLen));
4986
- }
4987
- return newArr;
4988
- }
4989
-
4990
- function monthUpdate() {
4991
- return function (d, v) {
4992
- var index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
4993
- if (~index) {
4994
- d.month = index;
4995
- }
4996
- };
4997
- }
4998
-
4999
- function pad(val, len) {
5000
- val = String(val);
5001
- len = len || 2;
5002
- while (val.length < len) {
5003
- val = '0' + val;
5004
- }
5005
- return val;
5006
- }
5007
-
5008
- // 直接使用中文日期名称常量
5009
- var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
5010
- var monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
5011
- var monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
5012
- var dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
5013
- var amPm = ['上午', '下午'];
5014
- var DoFn = function DoFn(D) {
5015
- return D + '日';
5016
- };
5017
-
5018
- var formatFlags = {
5019
- D: function D(dateObj) {
5020
- return dateObj.getDay();
5021
- },
5022
- DD: function DD(dateObj) {
5023
- return pad(dateObj.getDay());
5024
- },
5025
- Do: function Do(dateObj) {
5026
- return DoFn(dateObj.getDate());
5027
- },
5028
- d: function d(dateObj) {
5029
- return dateObj.getDate();
5030
- },
5031
- dd: function dd(dateObj) {
5032
- return pad(dateObj.getDate());
5033
- },
5034
- ddd: function ddd(dateObj) {
5035
- return dayNamesShort[dateObj.getDay()];
5036
- },
5037
- dddd: function dddd(dateObj) {
5038
- return dayNames[dateObj.getDay()];
5039
- },
5040
- M: function M(dateObj) {
5041
- return dateObj.getMonth() + 1;
5042
- },
5043
- MM: function MM(dateObj) {
5044
- return pad(dateObj.getMonth() + 1);
5045
- },
5046
- MMM: function MMM(dateObj) {
5047
- return monthNamesShort[dateObj.getMonth()];
5048
- },
5049
- MMMM: function MMMM(dateObj) {
5050
- return monthNames[dateObj.getMonth()];
5051
- },
5052
- yy: function yy(dateObj) {
5053
- return pad(String(dateObj.getFullYear()), 4).substr(2);
5054
- },
5055
- yyyy: function yyyy(dateObj) {
5056
- return pad(dateObj.getFullYear(), 4);
5057
- },
5058
- h: function h(dateObj) {
5059
- return dateObj.getHours() % 12 || 12;
5060
- },
5061
- hh: function hh(dateObj) {
5062
- return pad(dateObj.getHours() % 12 || 12);
5063
- },
5064
- H: function H(dateObj) {
5065
- return dateObj.getHours();
5066
- },
5067
- HH: function HH(dateObj) {
5068
- return pad(dateObj.getHours());
5069
- },
5070
- m: function m(dateObj) {
5071
- return dateObj.getMinutes();
5072
- },
5073
- mm: function mm(dateObj) {
5074
- return pad(dateObj.getMinutes());
5075
- },
5076
- s: function s(dateObj) {
5077
- return dateObj.getSeconds();
5078
- },
5079
- ss: function ss(dateObj) {
5080
- return pad(dateObj.getSeconds());
5081
- },
5082
- S: function S(dateObj) {
5083
- return Math.round(dateObj.getMilliseconds() / 100);
5084
- },
5085
- SS: function SS(dateObj) {
5086
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
5087
- },
5088
- SSS: function SSS(dateObj) {
5089
- return pad(dateObj.getMilliseconds(), 3);
5090
- },
5091
- a: function a(dateObj) {
5092
- return dateObj.getHours() < 12 ? '上午' : '下午';
5093
- },
5094
- A: function A(dateObj) {
5095
- return dateObj.getHours() < 12 ? '上午' : '下午';
5096
- },
5097
- ZZ: function ZZ(dateObj) {
5098
- var o = dateObj.getTimezoneOffset();
5099
- return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
5100
- }
5101
- };
5102
-
5103
- var parseFlags = {
5104
- d: [twoDigits, function (d, v) {
5105
- d.day = v;
5106
- }],
5107
- Do: [twoDigits + word, function (d, v) {
5108
- d.day = parseInt(v, 10);
5109
- }],
5110
- M: [twoDigits, function (d, v) {
5111
- d.month = v - 1;
5112
- }],
5113
- yy: [twoDigits, function (d, v) {
5114
- var da = new Date(),
5115
- cent = +('' + da.getFullYear()).substr(0, 2);
5116
- d.year = '' + (v > 68 ? cent - 1 : cent) + v;
5117
- }],
5118
- h: [twoDigits, function (d, v) {
5119
- d.hour = v;
5120
- }],
5121
- m: [twoDigits, function (d, v) {
5122
- d.minute = v;
5123
- }],
5124
- s: [twoDigits, function (d, v) {
5125
- d.second = v;
5126
- }],
5127
- yyyy: [fourDigits, function (d, v) {
5128
- d.year = v;
5129
- }],
5130
- S: ['\\d', function (d, v) {
5131
- d.millisecond = v * 100;
5132
- }],
5133
- SS: ['\\d{2}', function (d, v) {
5134
- d.millisecond = v * 10;
5135
- }],
5136
- SSS: [threeDigits, function (d, v) {
5137
- d.millisecond = v;
5138
- }],
5139
- D: [twoDigits, noop],
5140
- ddd: [word, noop],
5141
- MMM: [word, monthUpdate('monthNamesShort')],
5142
- MMMM: [word, monthUpdate('monthNames')],
5143
- a: [word, function (d, v) {
5144
- var val = v.toLowerCase();
5145
- if (val === '上午') {
5146
- d.isPm = false;
5147
- } else if (val === '下午') {
5148
- d.isPm = true;
5149
- }
5150
- }],
5151
- ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
5152
- var parts = (v + '').match(/([+-]|\d\d)/gi),
5153
- minutes = void 0;
5154
-
5155
- if (parts) {
5156
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
5157
- d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
5158
- }
5159
- }]
5160
- };
5161
- parseFlags.dd = parseFlags.d;
5162
- parseFlags.dddd = parseFlags.ddd;
5163
- parseFlags.DD = parseFlags.D;
5164
- parseFlags.mm = parseFlags.m;
5165
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
5166
- parseFlags.MM = parseFlags.M;
5167
- parseFlags.ss = parseFlags.s;
5168
- parseFlags.A = parseFlags.a;
5169
-
5170
- // Some common format strings
5171
- fecha.masks = {
5172
- default: 'ddd MMM dd yyyy HH:mm:ss',
5173
- shortDate: 'M/D/yy',
5174
- mediumDate: 'MMM d, yyyy',
5175
- longDate: 'MMMM d, yyyy',
5176
- fullDate: 'dddd, MMMM d, yyyy',
5177
- shortTime: 'HH:mm',
5178
- mediumTime: 'HH:mm:ss',
5179
- longTime: 'HH:mm:ss.SSS'
5180
- };
5181
-
4988
+ */
4989
+ const fecha = {};
4990
+ const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
4991
+ const twoDigits = '\\d\\d?';
4992
+ const threeDigits = '\\d{3}';
4993
+ const fourDigits = '\\d{4}';
4994
+ const word = '[^\\s]+';
4995
+ const literal = /\[([^]*?)\]/gm;
4996
+ const noop = function () {};
4997
+
4998
+ function regexEscape(str) {
4999
+ return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
5000
+ }
5001
+
5002
+ function shorten(arr, sLen) {
5003
+ const newArr = [];
5004
+ for (let i = 0, len = arr.length; i < len; i++) {
5005
+ newArr.push(arr[i].substr(0, sLen));
5006
+ }
5007
+ return newArr;
5008
+ }
5009
+
5010
+ function monthUpdate() {
5011
+ return function (d, v) {
5012
+ const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
5013
+ if (~index) {
5014
+ d.month = index;
5015
+ }
5016
+ };
5017
+ }
5018
+
5019
+ function pad(val, len) {
5020
+ val = String(val);
5021
+ len = len || 2;
5022
+ while (val.length < len) {
5023
+ val = '0' + val;
5024
+ }
5025
+ return val;
5026
+ }
5027
+
5028
+ // 直接使用中文日期名称常量
5029
+ const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
5030
+ const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
5031
+ const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
5032
+ const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
5033
+ const amPm = ['上午', '下午'];
5034
+ const DoFn = function DoFn(D) {
5035
+ return D + '日';
5036
+ };
5037
+
5038
+ const formatFlags = {
5039
+ D: function(dateObj) {
5040
+ return dateObj.getDay();
5041
+ },
5042
+ DD: function(dateObj) {
5043
+ return pad(dateObj.getDay());
5044
+ },
5045
+ Do: function(dateObj) {
5046
+ return DoFn(dateObj.getDate());
5047
+ },
5048
+ d: function(dateObj) {
5049
+ return dateObj.getDate();
5050
+ },
5051
+ dd: function(dateObj) {
5052
+ return pad(dateObj.getDate());
5053
+ },
5054
+ ddd: function(dateObj) {
5055
+ return dayNamesShort[dateObj.getDay()];
5056
+ },
5057
+ dddd: function(dateObj) {
5058
+ return dayNames[dateObj.getDay()];
5059
+ },
5060
+ M: function(dateObj) {
5061
+ return dateObj.getMonth() + 1;
5062
+ },
5063
+ MM: function(dateObj) {
5064
+ return pad(dateObj.getMonth() + 1);
5065
+ },
5066
+ MMM: function(dateObj) {
5067
+ return monthNamesShort[dateObj.getMonth()];
5068
+ },
5069
+ MMMM: function(dateObj) {
5070
+ return monthNames[dateObj.getMonth()];
5071
+ },
5072
+ yy: function(dateObj) {
5073
+ return pad(String(dateObj.getFullYear()), 4).substr(2);
5074
+ },
5075
+ yyyy: function(dateObj) {
5076
+ return pad(dateObj.getFullYear(), 4);
5077
+ },
5078
+ h: function(dateObj) {
5079
+ return dateObj.getHours() % 12 || 12;
5080
+ },
5081
+ hh: function(dateObj) {
5082
+ return pad(dateObj.getHours() % 12 || 12);
5083
+ },
5084
+ H: function(dateObj) {
5085
+ return dateObj.getHours();
5086
+ },
5087
+ HH: function(dateObj) {
5088
+ return pad(dateObj.getHours());
5089
+ },
5090
+ m: function(dateObj) {
5091
+ return dateObj.getMinutes();
5092
+ },
5093
+ mm: function(dateObj) {
5094
+ return pad(dateObj.getMinutes());
5095
+ },
5096
+ s: function(dateObj) {
5097
+ return dateObj.getSeconds();
5098
+ },
5099
+ ss: function(dateObj) {
5100
+ return pad(dateObj.getSeconds());
5101
+ },
5102
+ S: function(dateObj) {
5103
+ return Math.round(dateObj.getMilliseconds() / 100);
5104
+ },
5105
+ SS: function(dateObj) {
5106
+ return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
5107
+ },
5108
+ SSS: function(dateObj) {
5109
+ return pad(dateObj.getMilliseconds(), 3);
5110
+ },
5111
+ a: function(dateObj) {
5112
+ return dateObj.getHours() < 12 ? '上午' : '下午';
5113
+ },
5114
+ A: function(dateObj) {
5115
+ return dateObj.getHours() < 12 ? '上午' : '下午';
5116
+ },
5117
+ ZZ: function(dateObj) {
5118
+ const o = dateObj.getTimezoneOffset();
5119
+ return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
5120
+ }
5121
+ };
5122
+
5123
+ const parseFlags = {
5124
+ d: [twoDigits, function (d, v) {
5125
+ d.day = v;
5126
+ }],
5127
+ Do: [twoDigits + word, function (d, v) {
5128
+ d.day = parseInt(v, 10);
5129
+ }],
5130
+ M: [twoDigits, function (d, v) {
5131
+ d.month = v - 1;
5132
+ }],
5133
+ yy: [twoDigits, function (d, v) {
5134
+ const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
5135
+ d.year = '' + (v > 68 ? cent - 1 : cent) + v;
5136
+ }],
5137
+ h: [twoDigits, function (d, v) {
5138
+ d.hour = v;
5139
+ }],
5140
+ m: [twoDigits, function (d, v) {
5141
+ d.minute = v;
5142
+ }],
5143
+ s: [twoDigits, function (d, v) {
5144
+ d.second = v;
5145
+ }],
5146
+ yyyy: [fourDigits, function (d, v) {
5147
+ d.year = v;
5148
+ }],
5149
+ S: ['\\d', function (d, v) {
5150
+ d.millisecond = v * 100;
5151
+ }],
5152
+ SS: ['\\d{2}', function (d, v) {
5153
+ d.millisecond = v * 10;
5154
+ }],
5155
+ SSS: [threeDigits, function (d, v) {
5156
+ d.millisecond = v;
5157
+ }],
5158
+ D: [twoDigits, noop],
5159
+ ddd: [word, noop],
5160
+ MMM: [word, monthUpdate('monthNamesShort')],
5161
+ MMMM: [word, monthUpdate('monthNames')],
5162
+ a: [word, function (d, v) {
5163
+ const val = v.toLowerCase();
5164
+ if (val === '上午') {
5165
+ d.isPm = false;
5166
+ } else if (val === '下午') {
5167
+ d.isPm = true;
5168
+ }
5169
+ }],
5170
+ ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
5171
+ let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
5172
+
5173
+ if (parts) {
5174
+ minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
5175
+ d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
5176
+ }
5177
+ }]
5178
+ };
5179
+ parseFlags.dd = parseFlags.d;
5180
+ parseFlags.dddd = parseFlags.ddd;
5181
+ parseFlags.DD = parseFlags.D;
5182
+ parseFlags.mm = parseFlags.m;
5183
+ parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
5184
+ parseFlags.MM = parseFlags.M;
5185
+ parseFlags.ss = parseFlags.s;
5186
+ parseFlags.A = parseFlags.a;
5187
+
5188
+
5189
+ // Some common format strings
5190
+ fecha.masks = {
5191
+ default: 'ddd MMM dd yyyy HH:mm:ss',
5192
+ shortDate: 'M/D/yy',
5193
+ mediumDate: 'MMM d, yyyy',
5194
+ longDate: 'MMMM d, yyyy',
5195
+ fullDate: 'dddd, MMMM d, yyyy',
5196
+ shortTime: 'HH:mm',
5197
+ mediumTime: 'HH:mm:ss',
5198
+ longTime: 'HH:mm:ss.SSS'
5199
+ };
5200
+
5182
5201
  /***
5183
5202
  * Format a date
5184
5203
  * @method format
5185
5204
  * @param {Date|number} dateObj
5186
5205
  * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
5187
- */
5188
- fecha.format = function (dateObj, mask) {
5189
- if (typeof dateObj === 'number') {
5190
- dateObj = new Date(dateObj);
5191
- }
5192
-
5193
- if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
5194
- throw new Error('Invalid Date in fecha.format');
5195
- }
5196
-
5197
- mask = fecha.masks[mask] || mask || fecha.masks['default'];
5198
-
5199
- var literals = [];
5200
-
5201
- // Make literals inactive by replacing them with ??
5202
- mask = mask.replace(literal, function ($0, $1) {
5203
- literals.push($1);
5204
- return '@@@';
5205
- });
5206
- // Apply formatting rules
5207
- mask = mask.replace(token, function ($0) {
5208
- return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
5209
- });
5210
- // Inline literal values back into the formatted value
5211
- return mask.replace(/@@@/g, function () {
5212
- return literals.shift();
5213
- });
5214
- };
5215
-
5206
+ */
5207
+ fecha.format = function (dateObj, mask) {
5208
+ if (typeof dateObj === 'number') {
5209
+ dateObj = new Date(dateObj);
5210
+ }
5211
+
5212
+ if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
5213
+ throw new Error('Invalid Date in fecha.format');
5214
+ }
5215
+
5216
+ mask = fecha.masks[mask] || mask || fecha.masks['default'];
5217
+
5218
+ const literals = [];
5219
+
5220
+ // Make literals inactive by replacing them with ??
5221
+ mask = mask.replace(literal, function($0, $1) {
5222
+ literals.push($1);
5223
+ return '@@@';
5224
+ });
5225
+ // Apply formatting rules
5226
+ mask = mask.replace(token, function ($0) {
5227
+ return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
5228
+ });
5229
+ // Inline literal values back into the formatted value
5230
+ return mask.replace(/@@@/g, function() {
5231
+ return literals.shift();
5232
+ });
5233
+ };
5234
+
5216
5235
  /**
5217
5236
  * Parse a date string into an object, changes - into /
5218
5237
  * @method parse
5219
5238
  * @param {string} dateStr Date string
5220
5239
  * @param {string} format Date parse format
5221
5240
  * @returns {Date|boolean}
5222
- */
5223
- fecha.parse = function (dateStr, format) {
5224
- if (typeof format !== 'string') {
5225
- throw new Error('Invalid format in fecha.parse');
5226
- }
5227
-
5228
- format = fecha.masks[format] || format;
5229
-
5230
- // Avoid regular expression denial of service, fail early for really long strings
5231
- // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
5232
- if (dateStr.length > 1000) {
5233
- return null;
5234
- }
5235
-
5236
- var dateInfo = {};
5237
- var parseInfo = [];
5238
- var literals = [];
5239
- format = format.replace(literal, function ($0, $1) {
5240
- literals.push($1);
5241
- return '@@@';
5242
- });
5243
- var newFormat = regexEscape(format).replace(token, function ($0) {
5244
- if (parseFlags[$0]) {
5245
- var info = parseFlags[$0];
5246
- parseInfo.push(info[1]);
5247
- return '(' + info[0] + ')';
5248
- }
5249
-
5250
- return $0;
5251
- });
5252
- newFormat = newFormat.replace(/@@@/g, function () {
5253
- return literals.shift();
5254
- });
5255
- var matches = dateStr.match(new RegExp(newFormat, 'i'));
5256
- if (!matches) {
5257
- return null;
5258
- }
5259
-
5260
- for (var i = 1; i < matches.length; i++) {
5261
- parseInfo[i - 1](dateInfo, matches[i]);
5262
- }
5263
-
5264
- var today = new Date();
5265
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
5266
- dateInfo.hour = +dateInfo.hour + 12;
5267
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
5268
- dateInfo.hour = 0;
5269
- }
5270
-
5271
- var date = void 0;
5272
- if (dateInfo.timezoneOffset != null) {
5273
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
5274
- date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
5275
- } else {
5276
- date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
5277
- }
5278
- return date;
5279
- };
5280
-
5281
- // 导出fecha对象
5282
-
5283
-
5284
- // 以下是从date-util.js合并的函数
5285
- var newArray = function newArray(start, end) {
5286
- var result = [];
5287
- for (var i = start; i <= end; i++) {
5288
- result.push(i);
5289
- }
5290
- return result;
5291
- };
5292
-
5293
- var getSettings = function getSettings() {
5294
- return {
5295
- dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
5296
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
5297
- monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
5298
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
5299
- amPm: ['上午', '下午']
5300
- };
5301
- };
5302
-
5303
- var toDate = function toDate(date) {
5304
- return isDate(date) ? new Date(date) : null;
5305
- };
5306
-
5307
- var isDate = function isDate(date) {
5308
- if (date === null || date === undefined) return false;
5309
- if (isNaN(new Date(date).getTime())) return false;
5310
- if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
5311
- return true;
5312
- };
5313
-
5314
- var isDateObject = function isDateObject(val) {
5315
- return val instanceof Date;
5316
- };
5317
-
5318
- var formatDate = function formatDate(date) {
5319
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-MM-dd';
5320
-
5321
- // 处理多种输入类型
5322
- if (!date) return '';
5323
-
5324
- // 如果是时间戳,转成日期对象
5325
- if (typeof date === 'number') {
5326
- date = new Date(date);
5327
- }
5328
- // 如果是字符串,转成日期对象
5329
- if (typeof date === 'string') {
5330
- date = new Date(date);
5331
- }
5332
-
5333
- // 调用toDate进一步验证和转换
5334
- date = toDate(date);
5335
- if (!date) return '';
5336
-
5337
- // 兼容大写和小写的格式标记
5338
- // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
5339
- var lowercaseFormat = format.replace(/YYYY/g, 'yyyy').replace(/D/g, 'd');
5340
-
5341
- // 使用fecha库进行格式化,支持中文配置
5342
- var str = fecha.format(date, lowercaseFormat, getSettings());
5343
- return str;
5344
- };
5345
-
5346
- var parseDate = function parseDate(string, format) {
5347
- return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
5348
- };
5349
-
5350
- var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
5351
- if (month === 3 || month === 5 || month === 8 || month === 10) {
5352
- return 30;
5353
- }
5354
-
5355
- if (month === 1) {
5356
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
5357
- return 29;
5358
- } else {
5359
- return 28;
5360
- }
5361
- }
5362
-
5363
- return 31;
5364
- };
5365
-
5366
- var getDayCountOfYear = function getDayCountOfYear(year) {
5367
- var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
5368
- return isLeapYear ? 366 : 365;
5369
- };
5370
-
5371
- var getFirstDayOfMonth = function getFirstDayOfMonth(date) {
5372
- var temp = new Date(date.getTime());
5373
- temp.setDate(1);
5374
- return temp.getDay();
5375
- };
5376
-
5377
- // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
5378
- // {prev, next} Date should work for Daylight Saving Time
5379
- // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
5380
- var prevDate = function prevDate(date) {
5381
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5382
-
5383
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
5384
- };
5385
-
5386
- var nextDate = function nextDate(date) {
5387
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5388
-
5389
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
5390
- };
5391
-
5392
- var getStartDateOfMonth = function getStartDateOfMonth(year, month) {
5393
- var result = new Date(year, month, 1);
5394
- var day = result.getDay();
5395
-
5396
- if (day === 0) {
5397
- return prevDate(result, 7);
5398
- } else {
5399
- return prevDate(result, day);
5400
- }
5401
- };
5402
-
5403
- var getWeekNumber = function getWeekNumber(date) {
5404
- // 支持多种输入类型
5405
- if (!date || !isDate(date)) {
5406
- date = new Date();
5407
- }
5408
- if (typeof date === 'string') {
5409
- date = new Date(date);
5410
- }
5411
-
5412
- // 验证日期有效性
5413
- if (!isDate(date)) return null;
5414
-
5415
- var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
5416
- // 设置为最近的星期四:当前日期 + 4 - 当前星期数
5417
- // 将星期日的星期数设为7
5418
- d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
5419
- // 获取当年的第一天
5420
- var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
5421
- // 计算到最近的星期四的完整周数
5422
- var weekNo = Math.ceil(((d - yearStart) / 86400000 + 1) / 7);
5423
- // 返回周数
5424
- return weekNo;
5425
- };
5426
-
5427
- var getRangeHours = function getRangeHours(ranges) {
5428
- var hours = [];
5429
- var disabledHours = [];
5430
-
5431
- (ranges || []).forEach(function (range) {
5432
- var value = range.map(function (date) {
5433
- return date.getHours();
5434
- });
5435
-
5436
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
5437
- });
5438
-
5439
- if (disabledHours.length) {
5440
- for (var i = 0; i < 24; i++) {
5441
- hours[i] = disabledHours.indexOf(i) === -1;
5442
- }
5443
- } else {
5444
- for (var _i = 0; _i < 24; _i++) {
5445
- hours[_i] = false;
5446
- }
5447
- }
5448
-
5449
- return hours;
5450
- };
5451
-
5452
- var getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
5453
- if (amount <= 0) return [];
5454
- var temp = new Date(date.getTime());
5455
- temp.setDate(0);
5456
- var lastDay = temp.getDate();
5457
- return range(amount).map(function (_, index) {
5458
- return lastDay - (amount - index - 1);
5459
- });
5460
- };
5461
-
5462
- var getMonthDays = function getMonthDays(date) {
5463
- var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
5464
- var days = temp.getDate();
5465
- return range(days).map(function (_, index) {
5466
- return index + 1;
5467
- });
5468
- };
5469
-
5470
- function setRangeData(arr, start, end, value) {
5471
- for (var i = start; i < end; i++) {
5472
- arr[i] = value;
5473
- }
5474
- }
5475
-
5476
- var getRangeMinutes = function getRangeMinutes(ranges, hour) {
5477
- var minutes = new Array(60);
5478
-
5479
- if (ranges.length > 0) {
5480
- ranges.forEach(function (range) {
5481
- var start = range[0];
5482
- var end = range[1];
5483
- var startHour = start.getHours();
5484
- var startMinute = start.getMinutes();
5485
- var endHour = end.getHours();
5486
- var endMinute = end.getMinutes();
5487
- if (startHour === hour && endHour !== hour) {
5488
- setRangeData(minutes, startMinute, 60, true);
5489
- } else if (startHour === hour && endHour === hour) {
5490
- setRangeData(minutes, startMinute, endMinute + 1, true);
5491
- } else if (startHour !== hour && endHour === hour) {
5492
- setRangeData(minutes, 0, endMinute + 1, true);
5493
- } else if (startHour < hour && endHour > hour) {
5494
- setRangeData(minutes, 0, 60, true);
5495
- }
5496
- });
5497
- } else {
5498
- setRangeData(minutes, 0, 60, true);
5499
- }
5500
- return minutes;
5501
- };
5502
-
5503
- var range = function range(n) {
5504
- // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
5505
- return Array.apply(null, { length: n }).map(function (_, n) {
5506
- return n;
5507
- });
5508
- };
5509
-
5510
- var modifyDate = function modifyDate(date, y, m, d) {
5511
- return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
5512
- };
5513
-
5514
- var modifyTime = function modifyTime(date, h, m, s) {
5515
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
5516
- };
5517
-
5518
- var modifyWithTimeString = function modifyWithTimeString(date, time) {
5519
- if (date == null || !time) {
5520
- return date;
5521
- }
5522
- time = parseDate(time, 'HH:mm:ss');
5523
- return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
5524
- };
5525
-
5526
- var clearTime = function clearTime(date) {
5527
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5528
- };
5529
-
5530
- var clearMilliseconds = function clearMilliseconds(date) {
5531
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
5532
- };
5533
-
5534
- var limitTimeRange = function limitTimeRange(date, ranges) {
5535
- var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
5536
-
5537
- // TODO: refactory a more elegant solution
5538
- if (ranges.length === 0) return date;
5539
- var normalizeDate = function normalizeDate(date) {
5540
- return fecha.parse(fecha.format(date, format), format);
5541
- };
5542
- var ndate = normalizeDate(date);
5543
- var nranges = ranges.map(function (range) {
5544
- return range.map(normalizeDate);
5545
- });
5546
- if (nranges.some(function (nrange) {
5547
- return ndate >= nrange[0] && ndate <= nrange[1];
5548
- })) return date;
5549
-
5550
- var minDate = nranges[0][0];
5551
- var maxDate = nranges[0][0];
5552
-
5553
- nranges.forEach(function (nrange) {
5554
- minDate = new Date(Math.min(nrange[0], minDate));
5555
- maxDate = new Date(Math.max(nrange[1], minDate));
5556
- });
5557
-
5558
- var ret = ndate < minDate ? minDate : maxDate;
5559
- // preserve Year/Month/Date
5560
- return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
5561
- };
5562
-
5563
- var timeWithinRange = function timeWithinRange(date, selectableRange, format) {
5564
- var limitedDate = limitTimeRange(date, selectableRange, format);
5565
- return limitedDate.getTime() === date.getTime();
5566
- };
5567
-
5568
- var changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
5569
- // clamp date to the number of days in `year`, `month`
5570
- // eg: (2010-1-31, 2010, 2) => 2010-2-28
5571
- var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
5572
- return modifyDate(date, year, month, monthDate);
5573
- };
5574
-
5575
- var prevMonth = function prevMonth(date) {
5576
- var year = date.getFullYear();
5577
- var month = date.getMonth();
5578
- return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
5579
- };
5580
-
5581
- var nextMonth = function nextMonth(date) {
5582
- var year = date.getFullYear();
5583
- var month = date.getMonth();
5584
- return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
5585
- };
5586
-
5587
- var prevYear = function prevYear(date) {
5588
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5589
-
5590
- var year = date.getFullYear();
5591
- var month = date.getMonth();
5592
- return changeYearMonthAndClampDate(date, year - amount, month);
5593
- };
5594
-
5595
- var nextYear = function nextYear(date) {
5596
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5597
-
5598
- var year = date.getFullYear();
5599
- var month = date.getMonth();
5600
- return changeYearMonthAndClampDate(date, year + amount, month);
5601
- };
5602
-
5603
- var extractDateFormat = function extractDateFormat(format) {
5604
- return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
5605
- };
5606
-
5607
- var extractTimeFormat = function extractTimeFormat(format) {
5608
- return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
5609
- };
5610
-
5611
- var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
5612
- return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
5613
- };
5614
-
5241
+ */
5242
+ fecha.parse = function (dateStr, format) {
5243
+ if (typeof format !== 'string') {
5244
+ throw new Error('Invalid format in fecha.parse');
5245
+ }
5246
+
5247
+ format = fecha.masks[format] || format;
5248
+
5249
+ // Avoid regular expression denial of service, fail early for really long strings
5250
+ // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
5251
+ if (dateStr.length > 1000) {
5252
+ return null;
5253
+ }
5254
+
5255
+ const dateInfo = {};
5256
+ const parseInfo = [];
5257
+ const literals = [];
5258
+ format = format.replace(literal, function($0, $1) {
5259
+ literals.push($1);
5260
+ return '@@@';
5261
+ });
5262
+ let newFormat = regexEscape(format).replace(token, function ($0) {
5263
+ if (parseFlags[$0]) {
5264
+ const info = parseFlags[$0];
5265
+ parseInfo.push(info[1]);
5266
+ return '(' + info[0] + ')';
5267
+ }
5268
+
5269
+ return $0;
5270
+ });
5271
+ newFormat = newFormat.replace(/@@@/g, function() {
5272
+ return literals.shift();
5273
+ });
5274
+ const matches = dateStr.match(new RegExp(newFormat, 'i'));
5275
+ if (!matches) {
5276
+ return null;
5277
+ }
5278
+
5279
+ for (let i = 1; i < matches.length; i++) {
5280
+ parseInfo[i - 1](dateInfo, matches[i]);
5281
+ }
5282
+
5283
+ const today = new Date();
5284
+ if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
5285
+ dateInfo.hour = +dateInfo.hour + 12;
5286
+ } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
5287
+ dateInfo.hour = 0;
5288
+ }
5289
+
5290
+ let date;
5291
+ if (dateInfo.timezoneOffset != null) {
5292
+ dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
5293
+ date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
5294
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
5295
+ } else {
5296
+ date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
5297
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
5298
+ }
5299
+ return date;
5300
+ };
5301
+
5302
+ // 导出fecha对象
5303
+
5304
+
5305
+ // 以下是从date-util.js合并的函数
5306
+ const newArray = function(start, end) {
5307
+ let result = [];
5308
+ for (let i = start; i <= end; i++) {
5309
+ result.push(i);
5310
+ }
5311
+ return result;
5312
+ };
5313
+
5314
+ const getSettings = () => {
5315
+ return {
5316
+ dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
5317
+ dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
5318
+ monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
5319
+ monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
5320
+ amPm: ['上午', '下午']
5321
+ };
5322
+ };
5323
+
5324
+ const toDate = function(date) {
5325
+ return isDate(date) ? new Date(date) : null;
5326
+ };
5327
+
5328
+ const isDate = function(date) {
5329
+ if (date === null || date === undefined) return false;
5330
+ if (isNaN(new Date(date).getTime())) return false;
5331
+ if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
5332
+ return true;
5333
+ };
5334
+
5335
+ const isDateObject = function(val) {
5336
+ return val instanceof Date;
5337
+ };
5338
+
5339
+ const formatDate = function (date, format = 'yyyy-MM-dd') {
5340
+ // 处理多种输入类型
5341
+ if (!date) return '';
5342
+
5343
+ // 如果是时间戳,转成日期对象
5344
+ if (typeof date === 'number') {
5345
+ date = new Date(date);
5346
+ }
5347
+ // 如果是字符串,转成日期对象
5348
+ if (typeof date === 'string') {
5349
+ date = new Date(date);
5350
+ }
5351
+
5352
+ // 调用toDate进一步验证和转换
5353
+ date = toDate(date);
5354
+ if (!date) return '';
5355
+
5356
+ // 兼容大写和小写的格式标记
5357
+ // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
5358
+ const lowercaseFormat = format
5359
+ .replace(/YYYY/g, 'yyyy')
5360
+ .replace(/D/g, 'd')
5361
+
5362
+ // 使用fecha库进行格式化,支持中文配置
5363
+ const str = fecha.format(date, lowercaseFormat, getSettings());
5364
+ return str;
5365
+ };
5366
+
5367
+ const parseDate = function(string, format) {
5368
+ return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
5369
+ };
5370
+
5371
+ const getDayCountOfMonth = function(year, month) {
5372
+ if (month === 3 || month === 5 || month === 8 || month === 10) {
5373
+ return 30;
5374
+ }
5375
+
5376
+ if (month === 1) {
5377
+ if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
5378
+ return 29;
5379
+ } else {
5380
+ return 28;
5381
+ }
5382
+ }
5383
+
5384
+ return 31;
5385
+ };
5386
+
5387
+ const getDayCountOfYear = function(year) {
5388
+ const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
5389
+ return isLeapYear ? 366 : 365;
5390
+ };
5391
+
5392
+ const getFirstDayOfMonth = function(date) {
5393
+ const temp = new Date(date.getTime());
5394
+ temp.setDate(1);
5395
+ return temp.getDay();
5396
+ };
5397
+
5398
+ // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
5399
+ // {prev, next} Date should work for Daylight Saving Time
5400
+ // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
5401
+ const prevDate = function(date, amount = 1) {
5402
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
5403
+ };
5404
+
5405
+ const nextDate = function(date, amount = 1) {
5406
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
5407
+ };
5408
+
5409
+ const getStartDateOfMonth = function(year, month) {
5410
+ const result = new Date(year, month, 1);
5411
+ const day = result.getDay();
5412
+
5413
+ if (day === 0) {
5414
+ return prevDate(result, 7);
5415
+ } else {
5416
+ return prevDate(result, day);
5417
+ }
5418
+ };
5419
+
5420
+ const getWeekNumber = function(date) {
5421
+ // 支持多种输入类型
5422
+ if (!date||!isDate(date)) {
5423
+ date = new Date();
5424
+ }
5425
+ if (typeof date === 'string') {
5426
+ date = new Date(date);
5427
+ }
5428
+
5429
+ // 验证日期有效性
5430
+ if (!isDate(date)) return null;
5431
+
5432
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
5433
+ // 设置为最近的星期四:当前日期 + 4 - 当前星期数
5434
+ // 将星期日的星期数设为7
5435
+ d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
5436
+ // 获取当年的第一天
5437
+ const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
5438
+ // 计算到最近的星期四的完整周数
5439
+ const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
5440
+ // 返回周数
5441
+ return weekNo;
5442
+ };
5443
+
5444
+ const getRangeHours = function(ranges) {
5445
+ const hours = [];
5446
+ let disabledHours = [];
5447
+
5448
+ (ranges || []).forEach(range => {
5449
+ const value = range.map(date => date.getHours());
5450
+
5451
+ disabledHours = disabledHours.concat(newArray(value[0], value[1]));
5452
+ });
5453
+
5454
+ if (disabledHours.length) {
5455
+ for (let i = 0; i < 24; i++) {
5456
+ hours[i] = disabledHours.indexOf(i) === -1;
5457
+ }
5458
+ } else {
5459
+ for (let i = 0; i < 24; i++) {
5460
+ hours[i] = false;
5461
+ }
5462
+ }
5463
+
5464
+ return hours;
5465
+ };
5466
+
5467
+ const getPrevMonthLastDays = (date, amount) => {
5468
+ if (amount <= 0) return [];
5469
+ const temp = new Date(date.getTime());
5470
+ temp.setDate(0);
5471
+ const lastDay = temp.getDate();
5472
+ return range(amount).map((_, index) => lastDay - (amount - index - 1));
5473
+ };
5474
+
5475
+ const getMonthDays = (date) => {
5476
+ const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
5477
+ const days = temp.getDate();
5478
+ return range(days).map((_, index) => index + 1);
5479
+ };
5480
+
5481
+ function setRangeData(arr, start, end, value) {
5482
+ for (let i = start; i < end; i++) {
5483
+ arr[i] = value;
5484
+ }
5485
+ }
5486
+
5487
+ const getRangeMinutes = function(ranges, hour) {
5488
+ const minutes = new Array(60);
5489
+
5490
+ if (ranges.length > 0) {
5491
+ ranges.forEach(range => {
5492
+ const start = range[0];
5493
+ const end = range[1];
5494
+ const startHour = start.getHours();
5495
+ const startMinute = start.getMinutes();
5496
+ const endHour = end.getHours();
5497
+ const endMinute = end.getMinutes();
5498
+ if (startHour === hour && endHour !== hour) {
5499
+ setRangeData(minutes, startMinute, 60, true);
5500
+ } else if (startHour === hour && endHour === hour) {
5501
+ setRangeData(minutes, startMinute, endMinute + 1, true);
5502
+ } else if (startHour !== hour && endHour === hour) {
5503
+ setRangeData(minutes, 0, endMinute + 1, true);
5504
+ } else if (startHour < hour && endHour > hour) {
5505
+ setRangeData(minutes, 0, 60, true);
5506
+ }
5507
+ });
5508
+ } else {
5509
+ setRangeData(minutes, 0, 60, true);
5510
+ }
5511
+ return minutes;
5512
+ };
5513
+
5514
+ const range = function(n) {
5515
+ // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
5516
+ return Array.apply(null, {length: n}).map((_, n) => n);
5517
+ };
5518
+
5519
+ const modifyDate = function(date, y, m, d) {
5520
+ return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
5521
+ };
5522
+
5523
+ const modifyTime = function(date, h, m, s) {
5524
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
5525
+ };
5526
+
5527
+ const modifyWithTimeString = (date, time) => {
5528
+ if (date == null || !time) {
5529
+ return date;
5530
+ }
5531
+ time = parseDate(time, 'HH:mm:ss');
5532
+ return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
5533
+ };
5534
+
5535
+ const clearTime = function(date) {
5536
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5537
+ };
5538
+
5539
+ const clearMilliseconds = function(date) {
5540
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
5541
+ };
5542
+
5543
+ const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
5544
+ // TODO: refactory a more elegant solution
5545
+ if (ranges.length === 0) return date;
5546
+ const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
5547
+ const ndate = normalizeDate(date);
5548
+ const nranges = ranges.map(range => range.map(normalizeDate));
5549
+ if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
5550
+
5551
+ let minDate = nranges[0][0];
5552
+ let maxDate = nranges[0][0];
5553
+
5554
+ nranges.forEach(nrange => {
5555
+ minDate = new Date(Math.min(nrange[0], minDate));
5556
+ maxDate = new Date(Math.max(nrange[1], minDate));
5557
+ });
5558
+
5559
+ const ret = ndate < minDate ? minDate : maxDate;
5560
+ // preserve Year/Month/Date
5561
+ return modifyDate(
5562
+ ret,
5563
+ date.getFullYear(),
5564
+ date.getMonth(),
5565
+ date.getDate()
5566
+ );
5567
+ };
5568
+
5569
+ const timeWithinRange = function(date, selectableRange, format) {
5570
+ const limitedDate = limitTimeRange(date, selectableRange, format);
5571
+ return limitedDate.getTime() === date.getTime();
5572
+ };
5573
+
5574
+ const changeYearMonthAndClampDate = function(date, year, month) {
5575
+ // clamp date to the number of days in `year`, `month`
5576
+ // eg: (2010-1-31, 2010, 2) => 2010-2-28
5577
+ const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
5578
+ return modifyDate(date, year, month, monthDate);
5579
+ };
5580
+
5581
+ const prevMonth = function(date) {
5582
+ const year = date.getFullYear();
5583
+ const month = date.getMonth();
5584
+ return month === 0
5585
+ ? changeYearMonthAndClampDate(date, year - 1, 11)
5586
+ : changeYearMonthAndClampDate(date, year, month - 1);
5587
+ };
5588
+
5589
+ const nextMonth = function(date) {
5590
+ const year = date.getFullYear();
5591
+ const month = date.getMonth();
5592
+ return month === 11
5593
+ ? changeYearMonthAndClampDate(date, year + 1, 0)
5594
+ : changeYearMonthAndClampDate(date, year, month + 1);
5595
+ };
5596
+
5597
+ const prevYear = function(date, amount = 1) {
5598
+ const year = date.getFullYear();
5599
+ const month = date.getMonth();
5600
+ return changeYearMonthAndClampDate(date, year - amount, month);
5601
+ };
5602
+
5603
+ const nextYear = function(date, amount = 1) {
5604
+ const year = date.getFullYear();
5605
+ const month = date.getMonth();
5606
+ return changeYearMonthAndClampDate(date, year + amount, month);
5607
+ };
5608
+
5609
+ const extractDateFormat = function(format) {
5610
+ return format
5611
+ .replace(/\W?m{1,2}|\W?ZZ/g, '')
5612
+ .replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
5613
+ .trim();
5614
+ };
5615
+
5616
+ const extractTimeFormat = function(format) {
5617
+ return format
5618
+ .replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
5619
+ .trim();
5620
+ };
5621
+
5622
+ const validateRangeInOneMonth = function(start, end) {
5623
+ return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
5624
+ };
5625
+
5615
5626
  /**
5616
5627
  * 计算两个日期之间的工作日数量(不包括周末和节假日)
5617
5628
  * @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
5618
5629
  * @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
5619
5630
  * @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
5620
5631
  * @returns {number} 工作日数量
5621
- */
5622
- var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
5623
- var holidays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5624
-
5625
- if (typeof start_date !== 'string' || typeof end_date !== 'string') {
5626
- throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
5627
- }
5628
-
5629
- var startDateObj = new Date(start_date);
5630
- var endDateObj = new Date(end_date);
5631
-
5632
- if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
5633
- throw new Error("Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'.");
5634
- }
5635
-
5636
- if (startDateObj > endDateObj) {
5637
- throw new Error('Start date should be earlier than or equal to end date.');
5638
- }
5639
-
5640
- var workdays = 0;
5641
-
5642
- // Iterate through each day in the date range
5643
-
5644
- var _loop = function _loop(currentDate) {
5645
- // Check if the current day is a weekend (Saturday or Sunday)
5646
- var isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
5647
-
5648
- // Check if the current day is a holiday
5649
- var isHoliday = holidays.some(function (holiday) {
5650
- var holidayDate = new Date(holiday);
5651
- return currentDate.toDateString() === holidayDate.toDateString();
5652
- });
5653
-
5654
- // If it's a workday (not a weekend or holiday), increment the workdays count
5655
- if (!isWeekend && !isHoliday) {
5656
- workdays++;
5657
- }
5658
- };
5659
-
5660
- for (var currentDate = new Date(startDateObj); currentDate <= endDateObj; currentDate.setDate(currentDate.getDate() + 1)) {
5661
- _loop(currentDate);
5662
- }
5663
-
5664
- return workdays;
5665
- };
5666
-
5632
+ */
5633
+ const calculateNetworkDays = function (start_date, end_date, holidays = []) {
5634
+ if (typeof start_date !== 'string' || typeof end_date !== 'string') {
5635
+ throw new Error(
5636
+ "Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
5637
+ );
5638
+ }
5639
+
5640
+ const startDateObj = new Date(start_date);
5641
+ const endDateObj = new Date(end_date);
5642
+
5643
+ if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
5644
+ throw new Error(
5645
+ "Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
5646
+ );
5647
+ }
5648
+
5649
+ if (startDateObj > endDateObj) {
5650
+ throw new Error('Start date should be earlier than or equal to end date.');
5651
+ }
5652
+
5653
+ let workdays = 0;
5654
+
5655
+ // Iterate through each day in the date range
5656
+ for (
5657
+ let currentDate = new Date(startDateObj);
5658
+ currentDate <= endDateObj;
5659
+ currentDate.setDate(currentDate.getDate() + 1)
5660
+ ) {
5661
+ // Check if the current day is a weekend (Saturday or Sunday)
5662
+ const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
5663
+
5664
+ // Check if the current day is a holiday
5665
+ const isHoliday = holidays.some((holiday) => {
5666
+ const holidayDate = new Date(holiday);
5667
+ return currentDate.toDateString() === holidayDate.toDateString();
5668
+ });
5669
+
5670
+ // If it's a workday (not a weekend or holiday), increment the workdays count
5671
+ if (!isWeekend && !isHoliday) {
5672
+ workdays++;
5673
+ }
5674
+ }
5675
+
5676
+ return workdays;
5677
+ };
5678
+
5667
5679
  /**
5668
5680
  * 日期加减天数
5669
5681
  * @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
5670
5682
  * @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
5671
5683
  * @returns {string} 结果日期,格式为 "YYYY-MM-DD"
5672
- */
5673
- var dateAddDays = function dateAddDays(start_date, days) {
5674
- if (typeof start_date !== 'string' || !Number.isInteger(days)) {
5675
- 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.");
5676
- }
5677
-
5678
- var startDateObj = new Date(start_date);
5679
- if (isNaN(startDateObj.getTime())) {
5680
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5681
- }
5682
-
5683
- var resultDateObj = new Date(startDateObj);
5684
- resultDateObj.setDate(resultDateObj.getDate() + days);
5685
-
5686
- var resultYear = resultDateObj.getFullYear();
5687
- var resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
5688
- var resultDay = String(resultDateObj.getDate()).padStart(2, '0');
5689
-
5690
- return resultYear + '-' + resultMonth + '-' + resultDay;
5691
- };
5692
-
5684
+ */
5685
+ const dateAddDays = function (start_date, days) {
5686
+ if (typeof start_date !== 'string' || !Number.isInteger(days)) {
5687
+ throw new Error(
5688
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
5689
+ );
5690
+ }
5691
+
5692
+ const startDateObj = new Date(start_date);
5693
+ if (isNaN(startDateObj.getTime())) {
5694
+ throw new Error(
5695
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
5696
+ );
5697
+ }
5698
+
5699
+ const resultDateObj = new Date(startDateObj);
5700
+ resultDateObj.setDate(resultDateObj.getDate() + days);
5701
+
5702
+ const resultYear = resultDateObj.getFullYear();
5703
+ const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
5704
+ const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
5705
+
5706
+ return `${resultYear}-${resultMonth}-${resultDay}`;
5707
+ };
5708
+
5693
5709
  /**
5694
5710
  * 计算两个日期之间的差值
5695
5711
  * @date 2023年12月14日
@@ -5697,180 +5713,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
5697
5713
  * @param {String} end_date - 结束日期字符串
5698
5714
  * @param {String} unit - 单位:year/month/day
5699
5715
  * @returns {Number} 差值
5700
- */
5701
- var dateDiff = function dateDiff(start_date, end_date) {
5702
- var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
5703
-
5704
- // Assuming date strings are in "YYYY-MM-DD" format
5705
- var startDate = new Date(start_date);
5706
- var endDate = new Date(end_date);
5707
-
5708
- // If the date is invalid, return 0
5709
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
5710
- return 0;
5711
- }
5712
-
5713
- if (unit === 'year') {
5714
- return endDate.getFullYear() - startDate.getFullYear();
5715
- } else if (unit === 'month') {
5716
- return (endDate.getFullYear() - startDate.getFullYear()) * 12 + (endDate.getMonth() - startDate.getMonth());
5717
- } else {
5718
- // Default to day
5719
- var timeDifference = endDate - startDate;
5720
- // Calculate days (86400000 milliseconds per day)
5721
- return Math.floor(timeDifference / 86400000);
5722
- }
5723
- };
5724
-
5716
+ */
5717
+ const dateDiff = function (start_date, end_date, unit = 'day') {
5718
+ // Assuming date strings are in "YYYY-MM-DD" format
5719
+ var startDate = new Date(start_date);
5720
+ var endDate = new Date(end_date);
5721
+
5722
+ // If the date is invalid, return 0
5723
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
5724
+ return 0;
5725
+ }
5726
+
5727
+ if (unit === 'year') {
5728
+ return endDate.getFullYear() - startDate.getFullYear();
5729
+ } else if (unit === 'month') {
5730
+ return (
5731
+ (endDate.getFullYear() - startDate.getFullYear()) * 12 +
5732
+ (endDate.getMonth() - startDate.getMonth())
5733
+ );
5734
+ } else {
5735
+ // Default to day
5736
+ var timeDifference = endDate - startDate;
5737
+ // Calculate days (86400000 milliseconds per day)
5738
+ return Math.floor(timeDifference / 86400000);
5739
+ }
5740
+ };
5741
+
5725
5742
  /**
5726
5743
  * 获取月份中的日期
5727
5744
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
5728
5745
  * @returns {number} 月份中的日期(1-31)
5729
- */
5730
- var dayOfMonth = function dayOfMonth(date) {
5731
- if (typeof date !== 'string') {
5732
- throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5733
- }
5734
-
5735
- var dateObj = new Date(date);
5736
- if (isNaN(dateObj.getTime())) {
5737
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5738
- }
5739
-
5740
- return dateObj.getDate();
5741
- };
5742
-
5746
+ */
5747
+ const dayOfMonth = function (date) {
5748
+ if (typeof date !== 'string') {
5749
+ throw new Error(
5750
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
5751
+ );
5752
+ }
5753
+
5754
+ const dateObj = new Date(date);
5755
+ if (isNaN(dateObj.getTime())) {
5756
+ throw new Error(
5757
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
5758
+ );
5759
+ }
5760
+
5761
+ return dateObj.getDate();
5762
+ };
5763
+
5743
5764
  /**
5744
5765
  * 获取当前日期
5745
5766
  * @date 2022年5月7日
5746
5767
  * @param {string} format - 日期格式,默认为'YYYY-MM-DD'
5747
5768
  * @returns {string} 当前日期的格式化字符串
5748
- */
5749
- var getCurrentDate = function getCurrentDate() {
5750
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD';
5751
-
5752
- return formatDate(new Date(), format);
5753
- };
5754
-
5769
+ */
5770
+ const getCurrentDate = function (format = 'YYYY-MM-DD') {
5771
+ return formatDate(new Date(), format);
5772
+ };
5773
+
5755
5774
  /**
5756
5775
  * 获取当前日期时间
5757
5776
  * @date 2022年5月7日
5758
5777
  * @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
5759
5778
  * @returns {string} 当前日期时间的格式化字符串
5760
- */
5761
- var getCurrentDateTime = function getCurrentDateTime() {
5762
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD HH:mm:ss';
5763
-
5764
- return formatDate(new Date(), format);
5765
- };
5766
-
5779
+ */
5780
+ const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
5781
+ return formatDate(new Date(), format);
5782
+ };
5783
+
5767
5784
  /**
5768
5785
  * 获取小时
5769
5786
  * @date 2022年5月7日
5770
5787
  * @param {Date|string} [date] - 日期对象或日期字符串
5771
5788
  * @returns {number} 小时数(0-23)
5772
- */
5773
- var getHour = function getHour(date) {
5774
- if (!date) {
5775
- return new Date().getHours();
5776
- }
5777
- if (typeof date === 'string') {
5778
- date = new Date(date);
5779
- }
5780
- return date.getHours();
5781
- };
5782
-
5789
+ */
5790
+ const getHour = function (date) {
5791
+ if (!date) {
5792
+ return new Date().getHours();
5793
+ }
5794
+ if (typeof date === 'string') {
5795
+ date = new Date(date);
5796
+ }
5797
+ return date.getHours();
5798
+ };
5799
+
5783
5800
  /**
5784
5801
  * 获取分钟
5785
5802
  * @date 2022年5月7日
5786
5803
  * @param {Date|string} [date] - 日期对象或日期字符串
5787
5804
  * @returns {number} 分钟数(0-59)
5788
- */
5789
- var getMinute = function getMinute(date) {
5790
- if (!date) {
5791
- return new Date().getMinutes();
5792
- }
5793
- if (typeof date === 'string') {
5794
- date = new Date(date);
5795
- }
5796
- return date.getMinutes();
5797
- };
5798
-
5805
+ */
5806
+ const getMinute = function (date) {
5807
+ if (!date) {
5808
+ return new Date().getMinutes();
5809
+ }
5810
+ if (typeof date === 'string') {
5811
+ date = new Date(date);
5812
+ }
5813
+ return date.getMinutes();
5814
+ };
5815
+
5799
5816
  /**
5800
5817
  * 获取月份
5801
5818
  * @date 2022年5月7日
5802
5819
  * @param {Date|string} [date] - 日期对象或日期字符串
5803
5820
  * @returns {number} 月份数(1-12)
5804
- */
5805
- var getMonth = function getMonth(date) {
5806
- if (!date) {
5807
- return new Date().getMonth() + 1;
5808
- }
5809
- if (typeof date === 'string') {
5810
- date = new Date(date);
5811
- }
5812
- return date.getMonth() + 1;
5813
- };
5814
-
5821
+ */
5822
+ const getMonth = function (date) {
5823
+ if (!date) {
5824
+ return new Date().getMonth() + 1;
5825
+ }
5826
+ if (typeof date === 'string') {
5827
+ date = new Date(date);
5828
+ }
5829
+ return date.getMonth() + 1;
5830
+ };
5831
+
5815
5832
  /**
5816
5833
  * 获取秒
5817
5834
  * @date 2022年5月7日
5818
5835
  * @param {Date|string} [date] - 日期对象或日期字符串
5819
5836
  * @returns {number} 秒数(0-59)
5820
- */
5821
- var getSecond = function getSecond(date) {
5822
- if (!date) {
5823
- return new Date().getSeconds();
5824
- }
5825
- if (typeof date === 'string') {
5826
- date = new Date(date);
5827
- }
5828
- return date.getSeconds();
5829
- };
5830
-
5837
+ */
5838
+ const getSecond = function (date) {
5839
+ if (!date) {
5840
+ return new Date().getSeconds();
5841
+ }
5842
+ if (typeof date === 'string') {
5843
+ date = new Date(date);
5844
+ }
5845
+ return date.getSeconds();
5846
+ };
5847
+
5831
5848
  /**
5832
5849
  * 获取星期几
5833
5850
  * @date 2022年5月7日
5834
5851
  * @param {Date|string} [date] - 日期对象或日期字符串
5835
5852
  * @returns {number} 星期几(0-6,0表示星期日)
5836
- */
5837
- var getWeekday = function getWeekday(date) {
5838
- if (!date) {
5839
- return new Date().getDay();
5840
- }
5841
- if (typeof date === 'string') {
5842
- date = new Date(date);
5843
- }
5844
- return date.getDay();
5845
- };
5846
-
5853
+ */
5854
+ const getWeekday = function (date) {
5855
+ if (!date) {
5856
+ return new Date().getDay();
5857
+ }
5858
+ if (typeof date === 'string') {
5859
+ date = new Date(date);
5860
+ }
5861
+ return date.getDay();
5862
+ };
5863
+
5864
+
5847
5865
  /**
5848
5866
  * @desc 获取上午/下午/晚上
5849
5867
  * @author huangbo
5850
5868
  * @date 2022年5月7日
5851
5869
  * @param {String} [time] - 时间
5852
- **/
5853
- var timeCycle = function timeCycle(time) {
5854
- var hour = 0;
5855
- if (!time) {
5856
- hour = new Date().getHours();
5857
- } else if (typeof time === 'string') {
5858
- // 从时间字符串中提取小时
5859
- var match = time.match(/^(\d{1,2})/);
5860
- if (match) {
5861
- hour = parseInt(match[1], 10);
5862
- }
5863
- } else if (typeof time === 'number') {
5864
- hour = time;
5865
- }
5866
- // 判断时间段
5867
- if (hour >= 5 && hour < 12) {
5868
- return '上午';
5869
- } else if (hour >= 12 && hour < 18) {
5870
- return '下午';
5871
- } else {
5872
- return '晚上';
5873
- }
5870
+ **/
5871
+ const timeCycle = function (time) {
5872
+ let hour = 0;
5873
+ if (!time) {
5874
+ hour = new Date().getHours();
5875
+ } else if (typeof time === 'string') {
5876
+ // 从时间字符串中提取小时
5877
+ const match = time.match(/^(\d{1,2})/);
5878
+ if (match) {
5879
+ hour = parseInt(match[1], 10);
5880
+ }
5881
+ } else if (typeof time === 'number') {
5882
+ hour = time;
5883
+ }
5884
+ // 判断时间段
5885
+ if (hour >= 5 && hour < 12) {
5886
+ return '上午';
5887
+ } else if (hour >= 12 && hour < 18) {
5888
+ return '下午';
5889
+ } else {
5890
+ return '晚上';
5891
+ }
5874
5892
  };
5875
5893
 
5876
5894
  /***/ }),
@@ -5878,46 +5896,53 @@ var timeCycle = function timeCycle(time) {
5878
5896
  /***/ 70:
5879
5897
  /***/ (function(module, exports) {
5880
5898
 
5881
- module.exports = require("eoss/lib/date-picker");
5899
+ module.exports = require("eoss/lib/cascader");
5882
5900
 
5883
5901
  /***/ }),
5884
5902
 
5885
5903
  /***/ 71:
5886
5904
  /***/ (function(module, exports) {
5887
5905
 
5888
- module.exports = require("eoss/lib/time-picker");
5906
+ module.exports = require("eoss/lib/date-picker");
5889
5907
 
5890
5908
  /***/ }),
5891
5909
 
5892
5910
  /***/ 72:
5893
5911
  /***/ (function(module, exports) {
5894
5912
 
5895
- module.exports = require("eoss/lib/time-select");
5913
+ module.exports = require("eoss/lib/time-picker");
5896
5914
 
5897
5915
  /***/ }),
5898
5916
 
5899
5917
  /***/ 73:
5900
5918
  /***/ (function(module, exports) {
5901
5919
 
5902
- module.exports = require("eoss/lib/rate");
5920
+ module.exports = require("eoss/lib/time-select");
5903
5921
 
5904
5922
  /***/ }),
5905
5923
 
5906
5924
  /***/ 74:
5907
5925
  /***/ (function(module, exports) {
5908
5926
 
5909
- module.exports = require("eoss/lib/slider");
5927
+ module.exports = require("eoss/lib/rate");
5910
5928
 
5911
5929
  /***/ }),
5912
5930
 
5913
5931
  /***/ 75:
5914
5932
  /***/ (function(module, exports) {
5915
5933
 
5916
- module.exports = require("eoss/lib/transfer");
5934
+ module.exports = require("eoss/lib/slider");
5917
5935
 
5918
5936
  /***/ }),
5919
5937
 
5920
5938
  /***/ 76:
5939
+ /***/ (function(module, exports) {
5940
+
5941
+ module.exports = require("eoss/lib/transfer");
5942
+
5943
+ /***/ }),
5944
+
5945
+ /***/ 77:
5921
5946
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5922
5947
 
5923
5948
  "use strict";
@@ -5969,27 +5994,27 @@ render._withStripped = true
5969
5994
  // CONCATENATED MODULE: ./src/components/field-render.vue?vue&type=template&id=0751ef51&
5970
5995
 
5971
5996
  // EXTERNAL MODULE: external "eoss/lib/input-number"
5972
- var input_number_ = __webpack_require__(53);
5997
+ var input_number_ = __webpack_require__(54);
5973
5998
  var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
5974
5999
 
5975
6000
  // EXTERNAL MODULE: external "eoss/lib/radio-group"
5976
- var radio_group_ = __webpack_require__(43);
6001
+ var radio_group_ = __webpack_require__(44);
5977
6002
  var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
5978
6003
 
5979
6004
  // EXTERNAL MODULE: external "eoss/lib/checkbox-group"
5980
- var checkbox_group_ = __webpack_require__(39);
6005
+ var checkbox_group_ = __webpack_require__(40);
5981
6006
  var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
5982
6007
 
5983
6008
  // EXTERNAL MODULE: external "eoss/lib/select"
5984
- var select_ = __webpack_require__(40);
6009
+ var select_ = __webpack_require__(41);
5985
6010
  var select_default = /*#__PURE__*/__webpack_require__.n(select_);
5986
6011
 
5987
6012
  // EXTERNAL MODULE: external "eoss/lib/cascader"
5988
- var cascader_ = __webpack_require__(69);
6013
+ var cascader_ = __webpack_require__(70);
5989
6014
  var cascader_default = /*#__PURE__*/__webpack_require__.n(cascader_);
5990
6015
 
5991
6016
  // EXTERNAL MODULE: external "eoss/lib/switch"
5992
- var switch_ = __webpack_require__(63);
6017
+ var switch_ = __webpack_require__(64);
5993
6018
  var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
5994
6019
 
5995
6020
  // EXTERNAL MODULE: external "eoss/lib/input"
@@ -5997,39 +6022,39 @@ var input_ = __webpack_require__(14);
5997
6022
  var input_default = /*#__PURE__*/__webpack_require__.n(input_);
5998
6023
 
5999
6024
  // EXTERNAL MODULE: external "eoss/lib/date-picker"
6000
- var date_picker_ = __webpack_require__(70);
6025
+ var date_picker_ = __webpack_require__(71);
6001
6026
  var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
6002
6027
 
6003
6028
  // EXTERNAL MODULE: external "eoss/lib/time-picker"
6004
- var time_picker_ = __webpack_require__(71);
6029
+ var time_picker_ = __webpack_require__(72);
6005
6030
  var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
6006
6031
 
6007
6032
  // EXTERNAL MODULE: external "eoss/lib/time-select"
6008
- var time_select_ = __webpack_require__(72);
6033
+ var time_select_ = __webpack_require__(73);
6009
6034
  var time_select_default = /*#__PURE__*/__webpack_require__.n(time_select_);
6010
6035
 
6011
6036
  // EXTERNAL MODULE: external "eoss/lib/upload"
6012
- var upload_ = __webpack_require__(48);
6037
+ var upload_ = __webpack_require__(49);
6013
6038
  var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
6014
6039
 
6015
6040
  // EXTERNAL MODULE: external "eoss/lib/rate"
6016
- var rate_ = __webpack_require__(73);
6041
+ var rate_ = __webpack_require__(74);
6017
6042
  var rate_default = /*#__PURE__*/__webpack_require__.n(rate_);
6018
6043
 
6019
6044
  // EXTERNAL MODULE: external "eoss/lib/slider"
6020
- var slider_ = __webpack_require__(74);
6045
+ var slider_ = __webpack_require__(75);
6021
6046
  var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
6022
6047
 
6023
6048
  // EXTERNAL MODULE: external "eoss/lib/color-picker"
6024
- var color_picker_ = __webpack_require__(64);
6049
+ var color_picker_ = __webpack_require__(65);
6025
6050
  var color_picker_default = /*#__PURE__*/__webpack_require__.n(color_picker_);
6026
6051
 
6027
6052
  // EXTERNAL MODULE: external "eoss/lib/transfer"
6028
- var transfer_ = __webpack_require__(75);
6053
+ var transfer_ = __webpack_require__(76);
6029
6054
  var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
6030
6055
 
6031
6056
  // EXTERNAL MODULE: external "eoss/lib/tree"
6032
- var tree_ = __webpack_require__(49);
6057
+ var tree_ = __webpack_require__(50);
6033
6058
  var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
6034
6059
 
6035
6060
  // EXTERNAL MODULE: external "eoss/lib/button"
@@ -6161,7 +6186,7 @@ var CLASS_INLINE_MAP = {
6161
6186
  EsCascader: cascader_default.a,
6162
6187
  // 异步加载:断开 form → field-render → selector → selector-panel → form 的循环依赖
6163
6188
  EsSelector: function EsSelector() {
6164
- return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(null, 65, 7));
6189
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(null, 66, 7));
6165
6190
  },
6166
6191
  EsSwitch: switch_default.a,
6167
6192
  EsInput: input_default.a,