@chaoswise/ui 3.1.16 → 3.1.18

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 (57) hide show
  1. package/lib/Antd5/_util/isNumeric.js +4 -0
  2. package/lib/Antd5/avatar/group.js +121 -0
  3. package/lib/Antd5/button/LoadingIcon.js +82 -0
  4. package/lib/Antd5/pagination/Select.js +24 -0
  5. package/lib/BasicLayout/locale/en_US.js +4 -0
  6. package/lib/BasicLayout/locale/index.js +11 -0
  7. package/lib/BasicLayout/locale/zh_CN.js +4 -0
  8. package/lib/BasicLayout/locale/zh_TW.js +4 -0
  9. package/lib/CWColorPicker/index.js +44 -44
  10. package/lib/CWMessage/MessageContent/TabList/index.js +13 -13
  11. package/lib/CWMessage/MessageContent/index.js +25 -25
  12. package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +7 -7
  13. package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +14 -14
  14. package/lib/CWRangePicker/DropdownMenu/index.js +34 -34
  15. package/lib/CWRangePicker/Refresh/index.js +12 -12
  16. package/lib/CWRangePicker/TimeSpan/index.js +14 -14
  17. package/lib/CWRangePicker/index.js +56 -56
  18. package/lib/CWRangePicker/utils/generate/dayjs.js +110 -93
  19. package/lib/CWRangePicker/utils/generate/moment.js +99 -82
  20. package/lib/CWTable/assets/DownGraySvg.js +16 -0
  21. package/lib/CWTable/assets/DownLightSvg.js +16 -0
  22. package/lib/CWTable/assets/SortSvg.js +16 -0
  23. package/lib/CWTable/assets/SortingSvg.js +16 -0
  24. package/lib/CWTable/assets/UpGraySvg.js +15 -0
  25. package/lib/CWTable/assets/UpLightSvg.js +15 -0
  26. package/lib/CWTree/locale/en_US.js +3 -0
  27. package/lib/CWTree/locale/index.js +11 -0
  28. package/lib/CWTree/locale/zh_CN.js +3 -0
  29. package/lib/CWTree/locale/zh_TW.js +3 -0
  30. package/lib/ConfigProvider/ConfigProvider.js +6 -0
  31. package/lib/ConfigProvider/generate/dayjs.js +4 -0
  32. package/lib/Empty/index.js +10 -10
  33. package/lib/ErrorBoundary/ErrorPage.js +10 -10
  34. package/lib/Exception/index.js +22 -22
  35. package/lib/FilterDropDown/index.js +19 -19
  36. package/lib/Header/Document/index.js +5 -5
  37. package/lib/IconSelect/components/CustomImg/index.js +10 -10
  38. package/lib/IconSelect/components/SearchIcon/index.js +8 -8
  39. package/lib/IconSelect/index.js +16 -16
  40. package/lib/Joyride/List.js +11 -11
  41. package/lib/Joyride/index.js +55 -55
  42. package/lib/Pagination/index.js +34 -34
  43. package/lib/QuickTransfer/DragList.js +15 -15
  44. package/lib/QuickTransfer/index.js +59 -59
  45. package/lib/RangePicker/components/ExtraTimeFooter.js +1 -1
  46. package/lib/SearchBar/index.js +40 -40
  47. package/lib/TimeRangeSlider/Refresh/index.js +11 -11
  48. package/lib/TimeRangeSlider/TimeSpan/index.js +13 -13
  49. package/lib/TimeRangeSlider/index.js +32 -32
  50. package/lib/TimeRangeSlider/utils/generate/moment.js +106 -89
  51. package/lib/locales/en_US.json +1 -86
  52. package/lib/locales/index.js +11 -0
  53. package/lib/locales/ja_JP.json +1 -0
  54. package/lib/locales/zh_CN.json +1 -86
  55. package/lib/locales/zh_TW.json +1 -86
  56. package/package.json +2 -1
  57. /package/lib/Antd5/avatar/{Avatar.js → avatar.js} +0 -0
@@ -10,63 +10,69 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
10
10
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
- import moment from "moment";
13
+ import moment from 'moment';
14
14
  import { v4 as uuidv4 } from 'uuid';
15
15
  // 枚举时间单位
16
16
  var ENUM_TimeUnit = {
17
17
  s: {
18
- zh_CN: "秒",
18
+ zh_CN: '秒',
19
19
  en_US: {
20
- singular: "Second",
21
- plural: "Seconds"
20
+ singular: 'Second',
21
+ plural: 'Seconds'
22
22
  },
23
- zh_TW: "秒",
24
- unit: "seconds"
23
+ zh_TW: '秒',
24
+ ja_JP: '秒',
25
+ unit: 'seconds'
25
26
  },
26
27
  m: {
27
- zh_CN: "分钟",
28
+ zh_CN: '分钟',
28
29
  en_US: {
29
- singular: "Minute",
30
- plural: "Minutes"
30
+ singular: 'Minute',
31
+ plural: 'Minutes'
31
32
  },
32
- zh_TW: "分鐘",
33
- unit: "minutes"
33
+ zh_TW: '分鐘',
34
+ ja_JP: '分',
35
+ unit: 'minutes'
34
36
  },
35
37
  h: {
36
- zh_CN: "小时",
38
+ zh_CN: '小时',
37
39
  en_US: {
38
- singular: "Hour",
39
- plural: "Hours"
40
+ singular: 'Hour',
41
+ plural: 'Hours'
40
42
  },
41
- zh_TW: "小時",
42
- unit: "hours"
43
+ zh_TW: '小時',
44
+ ja_JP: '時間',
45
+ unit: 'hours'
43
46
  },
44
47
  d: {
45
- zh_CN: "天",
48
+ zh_CN: '天',
46
49
  en_US: {
47
- singular: "Day",
48
- plural: "Days"
50
+ singular: 'Day',
51
+ plural: 'Days'
49
52
  },
50
- zh_TW: "天",
51
- unit: "days"
53
+ zh_TW: '天',
54
+ ja_JP: '日',
55
+ unit: 'days'
52
56
  },
53
57
  mo: {
54
- zh_CN: "月",
58
+ zh_CN: '月',
55
59
  en_US: {
56
- singular: "Month",
57
- plural: "Months"
60
+ singular: 'Month',
61
+ plural: 'Months'
58
62
  },
59
- zh_TW: "月",
60
- unit: "mo"
63
+ zh_TW: '月',
64
+ ja_JP: 'ヶ月',
65
+ unit: 'mo'
61
66
  },
62
67
  y: {
63
- zh_CN: "年",
68
+ zh_CN: '年',
64
69
  en_US: {
65
- singular: "Year",
66
- plural: "Years"
70
+ singular: 'Year',
71
+ plural: 'Years'
67
72
  },
68
- zh_TW: "年",
69
- unit: "years"
73
+ zh_TW: '年',
74
+ ja_JP: '年',
75
+ unit: 'years'
70
76
  }
71
77
  };
72
78
 
@@ -88,7 +94,7 @@ export var regroupDataSourceFn = function regroupDataSourceFn(dataSource) {
88
94
  if (Object.keys(EnumTimeTypeData).includes(item.type)) {
89
95
  EnumTimeTypeData[item.type].push(item);
90
96
  } else {
91
- EnumTimeTypeData["other"].push(item);
97
+ EnumTimeTypeData['other'].push(item);
92
98
  }
93
99
  });
94
100
  Object.entries(EnumTimeTypeData).forEach(function (item) {
@@ -129,10 +135,10 @@ export var getUnit = function getUnit(unit) {
129
135
  export var judgeType = function judgeType(recordDateValue) {
130
136
  var key = recordDateValue.key,
131
137
  _recordDateValue$time = recordDateValue.timeDomain,
132
- timeDomain = _recordDateValue$time === void 0 ? "" : _recordDateValue$time;
138
+ timeDomain = _recordDateValue$time === void 0 ? '' : _recordDateValue$time;
133
139
  var isRule = false;
134
140
  var captureUnit = [];
135
- var recordUnit = "";
141
+ var recordUnit = '';
136
142
  var _getUnit = getUnit(key),
137
143
  _isRule = _getUnit.isRule,
138
144
  _captureUnit = _getUnit.captureUnit;
@@ -155,14 +161,14 @@ export var judgeType = function judgeType(recordDateValue) {
155
161
  export var echoRecentlyTimeTitle = function echoRecentlyTimeTitle(locale, captureUnit) {
156
162
  // 参数验证
157
163
  if (!captureUnit || !Array.isArray(captureUnit) || captureUnit.length < 2) {
158
- return "";
164
+ return '';
159
165
  }
160
166
  var _captureUnit3 = _slicedToArray(captureUnit, 2),
161
167
  count = _captureUnit3[0],
162
168
  unit = _captureUnit3[1];
163
169
  var timeUnit = ENUM_TimeUnit[unit];
164
170
  if (!timeUnit) {
165
- return "";
171
+ return '';
166
172
  }
167
173
  var countNum = parseInt(count, 10);
168
174
 
@@ -170,7 +176,7 @@ export var echoRecentlyTimeTitle = function echoRecentlyTimeTitle(locale, captur
170
176
  var localeConfig = {
171
177
  zh_CN: {
172
178
  template: function template(count, unitText) {
173
- return "\u6700\u8FD1".concat(count).concat(unit === "mo" ? "个" : "").concat(unitText);
179
+ return "\u6700\u8FD1".concat(count).concat(unit === 'mo' ? '个' : '').concat(unitText);
174
180
  },
175
181
  getUnitText: function getUnitText() {
176
182
  return timeUnit.zh_CN;
@@ -178,7 +184,7 @@ export var echoRecentlyTimeTitle = function echoRecentlyTimeTitle(locale, captur
178
184
  },
179
185
  zh: {
180
186
  template: function template(count, unitText) {
181
- return "\u6700\u8FD1".concat(count).concat(unit === "mo" ? "个" : "").concat(unitText);
187
+ return "\u6700\u8FD1".concat(count).concat(unit === 'mo' ? '个' : '').concat(unitText);
182
188
  },
183
189
  getUnitText: function getUnitText() {
184
190
  return timeUnit.zh_CN;
@@ -186,12 +192,20 @@ export var echoRecentlyTimeTitle = function echoRecentlyTimeTitle(locale, captur
186
192
  },
187
193
  zh_TW: {
188
194
  template: function template(count, unitText) {
189
- return "\u6700\u8FD1".concat(count).concat(unit === "mo" ? "個" : "").concat(unitText);
195
+ return "\u6700\u8FD1".concat(count).concat(unit === 'mo' ? '個' : '').concat(unitText);
190
196
  },
191
197
  getUnitText: function getUnitText() {
192
198
  return timeUnit.zh_TW;
193
199
  }
194
200
  },
201
+ ja_JP: {
202
+ template: function template(count, unitText) {
203
+ return "\u904E\u53BB".concat(count).concat(unitText);
204
+ },
205
+ getUnitText: function getUnitText() {
206
+ return timeUnit.ja_JP;
207
+ }
208
+ },
195
209
  "default": {
196
210
  template: function template(count, unitText) {
197
211
  return "Past ".concat(count, " ").concat(unitText);
@@ -220,8 +234,8 @@ export var echoAbsoluteTimeTitle = function echoAbsoluteTimeTitle(value, format)
220
234
  export var echoInputValue = function echoInputValue() {
221
235
  var recordDateValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
222
236
  var isFoucs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
223
- var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "zh_CN";
224
- var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "YYYY/MM/DD HH:mm:ss";
237
+ var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'zh_CN';
238
+ var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'YYYY/MM/DD HH:mm:ss';
225
239
  var forceRenderTitle = arguments.length > 4 ? arguments[4] : undefined;
226
240
  var isAutoRefresh = arguments.length > 5 ? arguments[5] : undefined;
227
241
  var timeSpanBoundary = arguments.length > 6 ? arguments[6] : undefined;
@@ -245,9 +259,9 @@ export var echoInputValue = function echoInputValue() {
245
259
  if (Array.isArray(value) && (_value2 = value) !== null && _value2 !== void 0 && _value2.length) {
246
260
  return echoAbsoluteTimeTitle(value, format, true, timeSpanBoundary);
247
261
  }
248
- return "";
262
+ return '';
249
263
  }
250
- if (!isRule && !values) return title || "Live Tail";
264
+ if (!isRule && !values) return title || 'Live Tail';
251
265
  if (isAutoRefresh) {
252
266
  var _value3;
253
267
  if (isRule) {
@@ -275,7 +289,7 @@ export var echoInputValue = function echoInputValue() {
275
289
 
276
290
  // 计算两个moment日期的时间差(时间戳)
277
291
  export var computeTimeDiff = function computeTimeDiff(value) {
278
- var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "ms";
292
+ var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ms';
279
293
  return value[1].diff(value[0], unit);
280
294
  };
281
295
  export var getYears = function getYears(seconds) {
@@ -286,11 +300,11 @@ export var getYears = function getYears(seconds) {
286
300
  // 计算输入框时间跨度
287
301
  export var computeTimeSpan = function computeTimeSpan(value, timeSpanBoundary) {
288
302
  // 当前传入日期的时间
289
- var timeDiff = computeTimeDiff(value, "s");
303
+ var timeDiff = computeTimeDiff(value, 's');
290
304
  if (timeDiff >= 60) {
291
305
  timeDiff = Number(timeDiff + 1);
292
306
  }
293
- var duration = moment.duration(timeDiff, "s");
307
+ var duration = moment.duration(timeDiff, 's');
294
308
  var _duration$_data = duration._data,
295
309
  years = _duration$_data.years,
296
310
  months = _duration$_data.months,
@@ -310,7 +324,7 @@ export var computeTimeSpan = function computeTimeSpan(value, timeSpanBoundary) {
310
324
  if (hours) return "".concat(hours, "h");
311
325
  if (minutes) return "".concat(minutes, "m");
312
326
  if (seconds) return "".concat(seconds, "s");
313
- return "";
327
+ return '';
314
328
  };
315
329
 
316
330
  /**
@@ -326,7 +340,7 @@ export var getTimeSpanFromValue = function getTimeSpanFromValue(value, timeSpanB
326
340
  value: value,
327
341
  timeDomain: timeDomain,
328
342
  number: captureUnit[0],
329
- unit: captureUnit[1] === "mo" ? "M" : captureUnit[1]
343
+ unit: captureUnit[1] === 'mo' ? 'M' : captureUnit[1]
330
344
  };
331
345
  };
332
346
 
@@ -353,10 +367,10 @@ export var cloneChangeDate = function cloneChangeDate(currentDate_0, currentDate
353
367
  var cloneCurrentDate_1 = currentDate_1.clone();
354
368
  // 是否切换到最近时间
355
369
  var switchInitial = false;
356
- if (direction == "left") {
370
+ if (direction == 'left') {
357
371
  cloneCurrentDate_0.subtract(duration);
358
372
  cloneCurrentDate_1.subtract(duration);
359
- } else if (direction == "right") {
373
+ } else if (direction == 'right') {
360
374
  cloneCurrentDate_0.add(duration);
361
375
  cloneCurrentDate_1.add(duration);
362
376
  // 计算最大值的时间差
@@ -378,36 +392,36 @@ export var cloneChangeDate = function cloneChangeDate(currentDate_0, currentDate
378
392
  if (_maxTimeDiff <= 0) {
379
393
  // 当前时间已经是极限了
380
394
  // 已经是极限直接当前时间向前推进timeSpanBoundary即可
381
- cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, "s"));
395
+ cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, 's'));
382
396
  cloneCurrentDate_1 = moment();
383
397
  switchInitial = true;
384
398
  } else {
385
399
  var clone0 = currentDate_0.clone();
386
400
  var clone1 = currentDate_1.clone();
387
- var initialTimeDiff = computeTimeDiff([clone0, clone1], "s");
401
+ var initialTimeDiff = computeTimeDiff([clone0, clone1], 's');
388
402
  if (timeSpanBoundary > initialTimeDiff) {
389
403
  var needChangeTimeDiff = Math.ceil(timeSpanBoundary - initialTimeDiff) / 2;
390
- cloneCurrentDate_0 = clone0.subtract(moment.duration(needChangeTimeDiff, "s"));
391
- cloneCurrentDate_1 = clone1.add(moment.duration(needChangeTimeDiff, "s"));
404
+ cloneCurrentDate_0 = clone0.subtract(moment.duration(needChangeTimeDiff, 's'));
405
+ cloneCurrentDate_1 = clone1.add(moment.duration(needChangeTimeDiff, 's'));
392
406
  // 计算最大值的时间差
393
407
  var _maxTimeDiff2 = computeTimeDiff([cloneCurrentDate_1, moment()]);
394
408
  if (_maxTimeDiff2 <= 0) {
395
409
  // 当前时间已经是极限了
396
410
  // 已经是极限直接当前时间向前推进timeSpanBoundary即可
397
- cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, "s"));
411
+ cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, 's'));
398
412
  cloneCurrentDate_1 = moment();
399
413
  switchInitial = true;
400
414
  }
401
415
  } else {
402
- cloneCurrentDate_1 = clone1.add(moment.duration(timeSpanBoundary, "s"));
416
+ cloneCurrentDate_1 = clone1.add(moment.duration(timeSpanBoundary, 's'));
403
417
  var clone = cloneCurrentDate_1.clone();
404
- cloneCurrentDate_0 = clone.subtract(moment.duration(timeSpanBoundary, "s"));
418
+ cloneCurrentDate_0 = clone.subtract(moment.duration(timeSpanBoundary, 's'));
405
419
  // 计算最大值的时间差
406
420
  var _maxTimeDiff3 = computeTimeDiff([cloneCurrentDate_1, moment()]);
407
421
  if (_maxTimeDiff3 <= 0) {
408
422
  // 当前时间已经是极限了
409
423
  // 已经是极限直接当前时间向前推进timeSpanBoundary即可
410
- cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, "s"));
424
+ cloneCurrentDate_0 = moment().subtract(moment.duration(timeSpanBoundary, 's'));
411
425
  cloneCurrentDate_1 = moment();
412
426
  switchInitial = true;
413
427
  }
@@ -437,8 +451,8 @@ export var cloneChangeDate = function cloneChangeDate(currentDate_0, currentDate
437
451
  */
438
452
  export var getChangeUnitDate = function getChangeUnitDate(unitFigure, unit) {
439
453
  var value = [moment().subtract(unitFigure, unit), moment()];
440
- if (unit === "mo") {
441
- value[0] = moment().subtract(unitFigure * 31, "d");
454
+ if (unit === 'mo') {
455
+ value[0] = moment().subtract(unitFigure * 31, 'd');
442
456
  }
443
457
  return value;
444
458
  };
@@ -487,7 +501,7 @@ export var getChangeDate = function getChangeDate(recordDateValue, direction) {
487
501
  };
488
502
  };
489
503
  export var isInvalidDate = function isInvalidDate(value) {
490
- return moment(value[0]).toDate() == "Invalid Date" || moment(value[1]).toDate() == "Invalid Date" || !computeTimeDiff(value);
504
+ return moment(value[0]).toDate() == 'Invalid Date' || moment(value[1]).toDate() == 'Invalid Date' || !computeTimeDiff(value);
491
505
  };
492
506
 
493
507
  // 符合禁用规则的时间集合
@@ -502,7 +516,7 @@ export function range(start, end) {
502
516
  // 判断value值是否是函数形式,并将函数形式执行之后转化为数组形式的value值
503
517
  export var funcValueChangeArrayValue = function funcValueChangeArrayValue(value) {
504
518
  if (!value) return;
505
- var isFunc = Object.prototype.toString.call(value) == "[object Function]";
519
+ var isFunc = Object.prototype.toString.call(value) == '[object Function]';
506
520
  var finalValue = value;
507
521
  if (isFunc) {
508
522
  finalValue = [value()[0], value()[1]];
@@ -512,7 +526,7 @@ export var funcValueChangeArrayValue = function funcValueChangeArrayValue(value)
512
526
 
513
527
  // 判断是否为最近时间规则,并返回矫正之后的value值
514
528
  export var getCorrectValue = function getCorrectValue(value) {
515
- var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
529
+ var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
516
530
  var _getUnit5 = getUnit(key),
517
531
  isRule = _getUnit5.isRule,
518
532
  captureUnit = _getUnit5.captureUnit;
@@ -523,7 +537,7 @@ export var getCorrectValue = function getCorrectValue(value) {
523
537
  returnValue = _objectSpread(_objectSpread({}, returnValue), {}, {
524
538
  timeDomain: key,
525
539
  number: captureUnit[0],
526
- unit: captureUnit[1] === "mo" ? "M" : captureUnit[1],
540
+ unit: captureUnit[1] === 'mo' ? 'M' : captureUnit[1],
527
541
  isRecently: true
528
542
  });
529
543
  if (!returnValue.value) {
@@ -550,7 +564,7 @@ export var getHistoryInfo = function getHistoryInfo(recordValue, historyList, _r
550
564
  var key = recordValue.key,
551
565
  value = recordValue.value,
552
566
  _recordValue$title = recordValue.title,
553
- title = _recordValue$title === void 0 ? "" : _recordValue$title;
567
+ title = _recordValue$title === void 0 ? '' : _recordValue$title;
554
568
  var _judgeType3 = judgeType(recordValue),
555
569
  _judgeType4 = _slicedToArray(_judgeType3, 2),
556
570
  isRule = _judgeType4[0],
@@ -566,7 +580,7 @@ export var getHistoryInfo = function getHistoryInfo(recordValue, historyList, _r
566
580
  }
567
581
  }
568
582
  if (!values && !isRule && !_title) {
569
- _title = intl.get("bbf8ccde-ab7c-4040-97eb-35b56742de27").d("未转化标题");
583
+ _title = intl.get('bbf8ccde-ab7c-4040-97eb-35b56742de27').d('未转化标题');
570
584
  }
571
585
  var isRepeat = Boolean(historyList.find(function (item) {
572
586
  return item.key === key || item.title === _title;
@@ -579,11 +593,14 @@ export var getHistoryInfo = function getHistoryInfo(recordValue, historyList, _r
579
593
  };
580
594
 
581
595
  // ----------------------------------时间输入绝对时间----------------------------------
582
- var FORMATS = ["YYYY/MM/DD HH:mm:ss", "YYYY/M/D H:m:s", "YYYY/MM/DD HH:mm", "YYYY/M/D H:m", "MM/DD HH:mm:ss", "M/D H:m:s", "MM/DD HH:mm", "M/D H:m", "YYYY/MM/DD", "YYYY/M/D", "MM/DD", "M/D", "HH:mm:ss", "H:m:s", "HH:mm", "H:m", "X"];
596
+ var FORMATS = ['YYYY/MM/DD HH:mm:ss', 'YYYY/M/D H:m:s', 'YYYY/MM/DD HH:mm', 'YYYY/M/D H:m', 'MM/DD HH:mm:ss', 'M/D H:m:s', 'MM/DD HH:mm', 'M/D H:m', 'YYYY/MM/DD', 'YYYY/M/D', 'MM/DD', 'M/D', 'HH:mm:ss', 'H:m:s', 'HH:mm', 'H:m', 'X'];
597
+
583
598
  // 不需要二次操作
584
- var NOT_CHANGE_FORMATS = ["YYYY/MM/DD HH:mm:ss", "YYYY/M/D H:m:s", "YYYY/MM/DD HH:mm", "YYYY/M/D H:m", "MM/DD HH:mm:ss", "M/D H:m:s", "MM/DD HH:mm", "M/D H:m", "X"];
599
+ var NOT_CHANGE_FORMATS = ['YYYY/MM/DD HH:mm:ss', 'YYYY/M/D H:m:s', 'YYYY/MM/DD HH:mm', 'YYYY/M/D H:m', 'MM/DD HH:mm:ss', 'M/D H:m:s', 'MM/DD HH:mm', 'M/D H:m', 'X'];
600
+
585
601
  // 需要二次操作
586
- var NEED_CHANGE_FORMATS = ["YYYY/MM/DD", "YYYY/M/D", "MM/DD", "M/D", "HH:mm:ss", "H:m:s", "HH:mm", "H:m"];
602
+ var NEED_CHANGE_FORMATS = ['YYYY/MM/DD', 'YYYY/M/D', 'MM/DD', 'M/D', 'HH:mm:ss', 'H:m:s', 'HH:mm', 'H:m'];
603
+
587
604
  // 判断数组中有几个真值
588
605
  export var getTruthDateCount = function getTruthDateCount(dateArray) {
589
606
  var truthDate = dateArray.filter(Boolean);
@@ -628,7 +645,7 @@ var getFormatParseDate = function getFormatParseDate() {
628
645
  });
629
646
  if (isAfterDate(cloneEndDate, cloneStartDate)) {
630
647
  if (!isAfterCurrentDate(cloneStartDate, cloneEndDate)) {
631
- if (cloneEndDate.isSame(moment(), "day")) {
648
+ if (cloneEndDate.isSame(moment(), 'day')) {
632
649
  cloneEndDate = moment();
633
650
  } else {
634
651
  cloneStartDate = null;
@@ -642,8 +659,8 @@ var getFormatParseDate = function getFormatParseDate() {
642
659
  } else if (NEED_CHANGE_FORMATS.slice(4).includes(format)) {
643
660
  if (isAfterDate(cloneEndDate, cloneStartDate)) {
644
661
  if (!isAfterCurrentDate(cloneStartDate, cloneEndDate)) {
645
- cloneStartDate.subtract(1, "days");
646
- cloneEndDate.subtract(1, "days");
662
+ cloneStartDate.subtract(1, 'days');
663
+ cloneEndDate.subtract(1, 'days');
647
664
  }
648
665
  } else {
649
666
  cloneStartDate = null;
@@ -660,7 +677,7 @@ var getFormatParseDate = function getFormatParseDate() {
660
677
  _endDate = _date2[0];
661
678
  var _cloneStartDate = null;
662
679
  var _cloneEndDate = null;
663
- if (format !== "X") {
680
+ if (format !== 'X') {
664
681
  _cloneStartDate = _endDate.clone();
665
682
  _cloneEndDate = _endDate.clone();
666
683
  _cloneStartDate.set({
@@ -681,7 +698,7 @@ var getFormatParseDate = function getFormatParseDate() {
681
698
  second: 59
682
699
  });
683
700
  if (!isAfterCurrentDate(_cloneStartDate, _cloneEndDate, true)) {
684
- if (_cloneEndDate.isSame(moment(), "day")) {
701
+ if (_cloneEndDate.isSame(moment(), 'day')) {
685
702
  _cloneEndDate = moment();
686
703
  } else {
687
704
  _cloneStartDate = null;
@@ -691,8 +708,8 @@ var getFormatParseDate = function getFormatParseDate() {
691
708
  }
692
709
  if (NEED_CHANGE_FORMATS.slice(4).includes(format)) {
693
710
  if (!isAfterCurrentDate(_cloneStartDate, _cloneEndDate, true)) {
694
- _cloneStartDate.subtract(1, "days");
695
- _cloneEndDate.subtract(1, "days");
711
+ _cloneStartDate.subtract(1, 'days');
712
+ _cloneEndDate.subtract(1, 'days');
696
713
  }
697
714
  }
698
715
  }
@@ -705,17 +722,17 @@ var getFormatParseDate = function getFormatParseDate() {
705
722
  // 转换输入日期并返回符合规则的日期和format格式
706
723
  var parseInputDate = function parseInputDate(text) {
707
724
  var finalDate = null;
708
- var finalFormat = "";
725
+ var finalFormat = '';
709
726
  for (var i = 0; i < FORMATS.length; i += 1) {
710
727
  var format = FORMATS[i];
711
728
  var date = moment(text, format, true);
712
729
  if (date.isValid()) {
713
730
  finalDate = date;
714
731
  finalFormat = format;
715
- if (format === "X") {
732
+ if (format === 'X') {
716
733
  if (text.length !== 10) {
717
734
  finalDate = null;
718
- finalFormat = "";
735
+ finalFormat = '';
719
736
  }
720
737
  }
721
738
  return {
@@ -730,7 +747,7 @@ var parseInputDate = function parseInputDate(text) {
730
747
  };
731
748
  };
732
749
  function getCharCount(str, _char) {
733
- var regex = new RegExp(_char, "g");
750
+ var regex = new RegExp(_char, 'g');
734
751
  var result = str.match(regex);
735
752
  var count = !result ? 0 : result.length;
736
753
  return count;
@@ -738,13 +755,13 @@ function getCharCount(str, _char) {
738
755
  function getCheckableDateInfo(inputStr) {
739
756
  // 替换时间跨度为空字符串
740
757
  // "[21mo] 2023/03/01 00:00:00 - 2023/03/22 10:38:00"-》2023/03/01 00:00:00 - 2023/03/22 10:38:00
741
- var deleteSpanStr = inputStr.replace(/^\[[1-9][0-9]*([s|m|h|d|y]|mo)\]\s/, "");
758
+ var deleteSpanStr = inputStr.replace(/^\[[1-9][0-9]*([s|m|h|d|y]|mo)\]\s/, '');
742
759
  var dateArray = [];
743
- var count = getCharCount(deleteSpanStr, "-");
760
+ var count = getCharCount(deleteSpanStr, '-');
744
761
  if (count === 1) {
745
- dateArray = deleteSpanStr.split("-");
746
- dateArray[0] = dateArray[0].replace(/\s$/, "");
747
- dateArray[1] = dateArray[1].replace(/^\s/, "");
762
+ dateArray = deleteSpanStr.split('-');
763
+ dateArray[0] = dateArray[0].replace(/\s$/, '');
764
+ dateArray[1] = dateArray[1].replace(/^\s/, '');
748
765
  } else {
749
766
  dateArray = [deleteSpanStr];
750
767
  }
@@ -755,7 +772,7 @@ export function getFinalDateOption(inputStr) {
755
772
  var dateArray = getCheckableDateInfo(inputStr);
756
773
  var finalDateOption = {
757
774
  dateValue: [null, null],
758
- format: ""
775
+ format: ''
759
776
  };
760
777
  if (dateArray.length === 2) {
761
778
  // ['2023/03/01 00:00:00', '2023/03/22 10:38:00']
@@ -791,14 +808,14 @@ export function getFinalDateOption(inputStr) {
791
808
  * 是否超过了最大的时间跨度
792
809
  */
793
810
  export var isExceedMaxTimeSpan = function isExceedMaxTimeSpan(value, timeSpanBoundary) {
794
- return computeTimeDiff(value, "s") > timeSpanBoundary;
811
+ return computeTimeDiff(value, 's') > timeSpanBoundary;
795
812
  };
796
813
 
797
814
  /**
798
815
  * 是否小于最小的时间跨度
799
816
  */
800
817
  export var isLessThanMinTimeSpan = function isLessThanMinTimeSpan(value, timeSpanBoundary) {
801
- return computeTimeDiff(value, "s") < timeSpanBoundary;
818
+ return computeTimeDiff(value, 's') < timeSpanBoundary;
802
819
  };
803
820
 
804
821
  // 检查一个 moment 是否在另一个 moment 之后或与之相同。
@@ -810,7 +827,7 @@ export var isSameOrAfter = function isSameOrAfter(date1, date2) {
810
827
  * 判断选择的时间是否在要求的时间时间之内,默认为最近30天
811
828
  */
812
829
  export var isWithinTimeSpan = function isWithinTimeSpan(value, days) {
813
- var startDate = moment().clone().subtract(days, "days");
830
+ var startDate = moment().clone().subtract(days, 'days');
814
831
  var endDate = moment().clone();
815
832
  if (isSameOrAfter(value[0], startDate) && isSameOrAfter(endDate, value[1])) {
816
833
  return true;
@@ -1,86 +1 @@
1
- {
2
- "06acca4b-d39f-4df8-b707-d6a4de229c53": "The server can‘t keep up. The platform is under urgent repair",
3
- "0d2fd4ff-51eb-4c95-a52d-a78585336915": "Search",
4
- "0e9700d5-1df7-43d4-921b-d6fc4a3bb9b8": "Recently",
5
- "1a190483-11d6-4fc7-bdd8-9ebed6dcf14e": "Upload image",
6
- "1ba80c84-7fc5-4ab0-bed2-15f9a9aeebe0": "Oops, the page is missing, please",
7
- "1d0f3c0c-188f-4f83-bff0-2792dffcdc2d": "Refresh",
8
- "284a1c6c-017a-4483-a2f4-29cb277e7c8a": "Do you want to view beginner guide again?",
9
- "28d2875b-4a3e-4f08-8f3d-8ef5dabe2273": "item",
10
- "294afc43-e2de-4d72-ba99-1f25d6f7a1d7": "History",
11
- "297787d3-d373-4a86-bd3e-ccd9a61e984e": "Go to",
12
- "2f8e550a-ddca-47e6-92d2-5fee375fcf15": "Congratulations! You've completed all tasks.",
13
- "3395a172-cc4a-4c02-93e6-a1efbeb30a2c": "Restore default values",
14
- "3991a1d0-65a8-45ca-94a4-f89fbd9f8555": "Select all",
15
- "3b94bb1c-e89e-46a6-9b4c-e5f2f6f4156a": "total",
16
- "3e75c2d9-76e5-4cd2-945b-8ff58469c434": "tasks",
17
- "40dceacf-eb4e-47d8-a61d-ea64d4136994": "Cloudwise ITSM",
18
- "40f0805b-6978-4e6e-92af-88bc3720b2e9": "Get started",
19
- "41621b6c-711d-4461-8e3f-66b5c355d67c": "Relative",
20
- "4253417c-d699-4eed-8c75-34d2a8b18a68": "OK",
21
- "476c8a4c-7d1f-48c8-b645-eeff9f012c80": "Select from the list on the left",
22
- "4cba455a-5fc7-4174-9a67-8395150a3222": "Gradient",
23
- "502d0d23-e942-4ecd-89e4-e85431a3098f": "Auto refresh",
24
- "53e957d9-8aee-4322-a144-31d4cff11c9f": "Clear",
25
- "54653cf2-ee7e-4091-b778-30d21facc877": "The page is lost and the platform is retrieving it",
26
- "56a89179-5086-4c43-8814-06eac1ba9983": "Increase the time span by {span} times",
27
- "58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61": "Mark all read",
28
- "5cc44ee5-8da3-446b-b962-3fe7f77d4f38": "Top",
29
- "5fe60774-0f08-450f-a9d9-998996485fec": "Drag Move",
30
- "627a6799-d6da-421d-a2c4-d6982c27a258": "Do you want to continue?",
31
- "6356dd5c-b99d-4b34-acb3-683e4d5edb40": "Skip",
32
- "668ced11-e48e-4717-ab82-dfb75ca2a7c9": "Done",
33
- "677bd887-3b74-4c5a-8f47-b942e4b5d2b8": "Yes, of course",
34
- "6b4daed5-34d2-4d1d-8a98-79b640f91259": "Beginner guide",
35
- "703fc2b8-0d1b-43ce-a7f8-9ea38de6c293": "Icon library",
36
- "711fdb26-65b9-48da-ba3c-363f5ab8218c": "Select calendar",
37
- "718c1df1-dba2-4e7a-a078-46c54ee4875a": "Recommend uploading 40*40 image in PNG, SVG, JPG, or JGPG format. Image size can not exceed 2 MB",
38
- "76876ab3-65b9-4df8-a5f7-70b62017ffba": "{total} total",
39
- "7bf67185-0725-4307-9bc2-a285ef3e3601": "Online document center",
40
- "7c293e5f-8557-469c-a486-d909df4232ad": "Please enter search keywords",
41
- "80547f6f-9a34-486f-9bc4-8d5e0af23ae0": "Other",
42
- "812f44fc-ed3c-4bd3-8ad5-35cd2996c5ae": "No results found",
43
- "8ad38206-e527-4375-8714-7374072d71c0": "No, thanks",
44
- "8cfce2aa-1a8f-4bb1-a868-563ddfa2980d": "Retry",
45
- "8f5cbd29-b975-44e7-8124-2dc64a6c3182": "Browser incompatible",
46
- "8f6f919a-a750-4389-8960-b5fae8bf2638": "Total",
47
- "909d3868-2a03-48ce-a55c-68c788869ae7": "Wow! You've completed the current task",
48
- "92eb0ee0-1f72-4f49-bfad-ff7f0d1bd21d": "The selected time is either the same for both or one of the times is beyond the current time. Please select again",
49
- "94482e5c-d90c-49f7-87b0-9877dc8e3824": "Single color",
50
- "95862d90-8807-499e-9b92-4b890337c82e": "File reading failure",
51
- "989a0bb6-6956-41d0-b5c2-329f8b1e846c": "Next",
52
- "9b4d6b14-8eee-4158-9dff-2055c1bb7d7d": "No, thanks",
53
- "9ce11da7-7647-43d8-bf18-0aaae952bfb0": "Reset",
54
- "a30db643-5238-42bc-bc5e-98a9d0c7df51": "More",
55
- "a3a25b03-18bc-4b75-b795-0c16fd0dcc22": "Customized image",
56
- "a796b350-9e45-4712-a5f4-3731fba1958b": "Something went wrong. The platform is under urgent repair",
57
- "ac05181b-c641-4cb0-84e5-16a060f98851": "Sorry, you are not allowed to access this page/content",
58
- "aca12e3d-7037-43f5-8fb2-7545ca44955a": "All({checkedLength})",
59
- "acf777b3-ca63-422a-bd56-05bd1bc6c789": "{item}/page",
60
- "b1db2936-33f9-410b-aba2-997c57d40e7a": "Advanced",
61
- "b7e613a0-9941-444c-a3f8-ae1f7d1943c3": "Cannot upload empty files",
62
- "bbf8ccde-ab7c-4040-97eb-35b56742de27": "Unconverted title",
63
- "c0839048-28ed-4a1f-bbad-be025e41ae75": "Files in this format are not supported",
64
- "c2c4fb87-08a5-4727-ad30-2f00a60186e0": "No Data",
65
- "c630708e-719b-434f-b0fd-2e619a9b2ff0": "Done",
66
- "c6914863-5603-4924-a85d-93174e59d02d": "Added",
67
- "cefeccff-2f9e-4b59-925c-af11c28aa8ed": "Smooth backward",
68
- "d8ae6e8c-be05-42dd-9724-63e866dae1eb": "No, thanks",
69
- "d9ef3e74-3325-4272-aa97-2b861fdcf8ff": "Load failed",
70
- "dd25dcba-5aea-4f44-9653-9ff61442e830": "Back",
71
- "dd9a42ea-9eca-4315-b925-8cc97cacfd41": "Absolute",
72
- "dda16720-d447-4d73-9e71-b5af7b5bbcfd": "Click or drag files to this area",
73
- "de6eaecc-9d39-41f1-82d3-80694c558028": "Message alerts can be played automatically only when interactive behavior is required",
74
- "df9a3bfb-00df-44cd-9761-87dc21ffc0e8": "Smooth forward",
75
- "e1f25f97-3a00-4e98-b73c-069638e57184": "The browser version is too early. We recommended that upgrade the browser to avoid potential security risks",
76
- "e2008629-6fc2-4222-b28c-ada43aa79a74": "Does not match the input format, please re-enter",
77
- "e6b82693-9376-4297-9b57-2d3480a5d14b": "Select all({checkedLength}/{optionsLength})",
78
- "e7097c4f-4efd-4d51-82d3-b75544fb5994": "Start",
79
- "e82f751b-a078-4745-8f37-c0f9defd2644": "Yes, of course",
80
- "e8a046c4-4611-47b9-bef0-cb46de7dd733": "The maximum time span is exceeded, please re-enter",
81
- "e963051e-0127-45fe-a5e5-92da5938a8ff": "Add Condition",
82
- "eb6227c5-2594-4fb6-92cb-496295288cdd": "Img size does not exceed 2M",
83
- "fa5b42d7-f0cb-4866-8ac9-217633e7aff9": "Page",
84
- "fcdcd88b-3db8-4216-a93a-ab79d854408d": "No new messages",
85
- "ff0c5073-02d4-471f-b34c-e47d916c1911": "Welcome to~"
86
- }
1
+ {"06acca4b-d39f-4df8-b707-d6a4de229c53":"The server can‘t keep up. The platform is under urgent repair","0d2fd4ff-51eb-4c95-a52d-a78585336915":"Search","0e9700d5-1df7-43d4-921b-d6fc4a3bb9b8":"Recently","1a190483-11d6-4fc7-bdd8-9ebed6dcf14e":"Upload image","1ba80c84-7fc5-4ab0-bed2-15f9a9aeebe0":"Oops, the page is missing, please","1d0f3c0c-188f-4f83-bff0-2792dffcdc2d":"Refresh","284a1c6c-017a-4483-a2f4-29cb277e7c8a":"Do you want to view beginner guide again?","28d2875b-4a3e-4f08-8f3d-8ef5dabe2273":"item","294afc43-e2de-4d72-ba99-1f25d6f7a1d7":"History","297787d3-d373-4a86-bd3e-ccd9a61e984e":"Go to","2f8e550a-ddca-47e6-92d2-5fee375fcf15":"Congratulations! You've completed all tasks.","3395a172-cc4a-4c02-93e6-a1efbeb30a2c":"Restore default values","3b94bb1c-e89e-46a6-9b4c-e5f2f6f4156a":"total","3e75c2d9-76e5-4cd2-945b-8ff58469c434":"tasks","40dceacf-eb4e-47d8-a61d-ea64d4136994":"Cloudwise ITSM","40f0805b-6978-4e6e-92af-88bc3720b2e9":"Get started","41621b6c-711d-4461-8e3f-66b5c355d67c":"Relative","4253417c-d699-4eed-8c75-34d2a8b18a68":"OK","476c8a4c-7d1f-48c8-b645-eeff9f012c80":"Select from the list on the left","4cba455a-5fc7-4174-9a67-8395150a3222":"Gradient","502d0d23-e942-4ecd-89e4-e85431a3098f":"Auto refresh","53e957d9-8aee-4322-a144-31d4cff11c9f":"Clear","54653cf2-ee7e-4091-b778-30d21facc877":"The page is lost and the platform is retrieving it","56a89179-5086-4c43-8814-06eac1ba9983":"Increase the time span by {span} times","58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61":"Mark all read","5cc44ee5-8da3-446b-b962-3fe7f77d4f38":"Top","5fe60774-0f08-450f-a9d9-998996485fec":"Drag Move","627a6799-d6da-421d-a2c4-d6982c27a258":"Do you want to continue?","6356dd5c-b99d-4b34-acb3-683e4d5edb40":"Skip","668ced11-e48e-4717-ab82-dfb75ca2a7c9":"Done","677bd887-3b74-4c5a-8f47-b942e4b5d2b8":"Yes, of course","6b4daed5-34d2-4d1d-8a98-79b640f91259":"Beginner guide","703fc2b8-0d1b-43ce-a7f8-9ea38de6c293":"Icon library","711fdb26-65b9-48da-ba3c-363f5ab8218c":"Select calendar","718c1df1-dba2-4e7a-a078-46c54ee4875a":"Recommend uploading 40*40 image in PNG, SVG, JPG, or JGPG format. Image size can not exceed 2 MB","76876ab3-65b9-4df8-a5f7-70b62017ffba":"{total} total","7bf67185-0725-4307-9bc2-a285ef3e3601":"Online document center","7c293e5f-8557-469c-a486-d909df4232ad":"Please enter search keywords","80547f6f-9a34-486f-9bc4-8d5e0af23ae0":"Other","8ad38206-e527-4375-8714-7374072d71c0":"No, thanks","8cfce2aa-1a8f-4bb1-a868-563ddfa2980d":"Retry","8f5cbd29-b975-44e7-8124-2dc64a6c3182":"Browser incompatible","8f6f919a-a750-4389-8960-b5fae8bf2638":"Total","909d3868-2a03-48ce-a55c-68c788869ae7":"Wow! You've completed the current task","92eb0ee0-1f72-4f49-bfad-ff7f0d1bd21d":"The selected time is either the same for both or one of the times is beyond the current time. Please select again","94482e5c-d90c-49f7-87b0-9877dc8e3824":"Single Color","95862d90-8807-499e-9b92-4b890337c82e":"File reading failure","989a0bb6-6956-41d0-b5c2-329f8b1e846c":"Next","9b4d6b14-8eee-4158-9dff-2055c1bb7d7d":"No, thanks","9ce11da7-7647-43d8-bf18-0aaae952bfb0":"Reset","a30db643-5238-42bc-bc5e-98a9d0c7df51":"More","a3a25b03-18bc-4b75-b795-0c16fd0dcc22":"Customized image","a796b350-9e45-4712-a5f4-3731fba1958b":"Something went wrong. The platform is under urgent repair","ac05181b-c641-4cb0-84e5-16a060f98851":"Sorry, you are not allowed to access this page/content","aca12e3d-7037-43f5-8fb2-7545ca44955a":"All({checkedLength})","acf777b3-ca63-422a-bd56-05bd1bc6c789":"{item}/page","b1db2936-33f9-410b-aba2-997c57d40e7a":"Advanced","b7e613a0-9941-444c-a3f8-ae1f7d1943c3":"Cannot upload empty files","bbf8ccde-ab7c-4040-97eb-35b56742de27":"Unconverted title","c0839048-28ed-4a1f-bbad-be025e41ae75":"Files in this format are not supported","c2c4fb87-08a5-4727-ad30-2f00a60186e0":"No Data","c630708e-719b-434f-b0fd-2e619a9b2ff0":"Done","c6914863-5603-4924-a85d-93174e59d02d":"Added","cefeccff-2f9e-4b59-925c-af11c28aa8ed":"Smooth backward","d8ae6e8c-be05-42dd-9724-63e866dae1eb":"No, thanks","d9ef3e74-3325-4272-aa97-2b861fdcf8ff":"Load failed","dd25dcba-5aea-4f44-9653-9ff61442e830":"Back","dd9a42ea-9eca-4315-b925-8cc97cacfd41":"Absolute","de6eaecc-9d39-41f1-82d3-80694c558028":"Message alerts can be played automatically only when interactive behavior is required","df9a3bfb-00df-44cd-9761-87dc21ffc0e8":"Smooth forward","e1f25f97-3a00-4e98-b73c-069638e57184":"The browser version is too early. We recommended that upgrade the browser to avoid potential security risks","e2008629-6fc2-4222-b28c-ada43aa79a74":"Does not match the input format, please re-enter","e6b82693-9376-4297-9b57-2d3480a5d14b":"Select all({checkedLength}/{optionsLength})","e7097c4f-4efd-4d51-82d3-b75544fb5994":"Start","e82f751b-a078-4745-8f37-c0f9defd2644":"Yes, of course","e8a046c4-4611-47b9-bef0-cb46de7dd733":"The maximum time span is exceeded, please re-enter","e963051e-0127-45fe-a5e5-92da5938a8ff":"Add Condition","eb6227c5-2594-4fb6-92cb-496295288cdd":"Img size does not exceed 2M","fa5b42d7-f0cb-4866-8ac9-217633e7aff9":"Page","fcdcd88b-3db8-4216-a93a-ab79d854408d":"No new messages","ff0c5073-02d4-471f-b34c-e47d916c1911":"Welcome to~"}
@@ -35,6 +35,17 @@ export var injectLocale = function injectLocale(currentLocale) {
35
35
  cb();
36
36
  });
37
37
  }
38
+ if (currentLocale === "ja_JP") {
39
+ import("../locales/ja_JP.json").then(function (res) {
40
+ intl.init({
41
+ currentLocale: currentLocale,
42
+ locales: {
43
+ ja_JP: res["default"]
44
+ }
45
+ });
46
+ cb();
47
+ });
48
+ }
38
49
  };
39
50
 
40
51
  // 导出TagInitInstance