@94ai/nf-double-week 5.0.32 → 5.0.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.
- package/lib/nf-double-week.cjs.js +189 -1082
- package/lib/nf-double-week.esm-bundler.js +136 -1029
- package/package.json +3 -3
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
+
import { isDateObject, getWeekNumber, formatDate, parseDate, isDate, getStartDateOfMonth, getFirstDayOfMonth, getDayCountOfMonth, nextDate, prevDate, clearTime, nextMonth, modifyWithTimeString, prevYear, prevMonth, nextYear } from "element-ui/src/utils/date-util";
|
|
2
3
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
4
|
+
import Locale$1 from "element-ui/lib/mixins/locale";
|
|
3
5
|
function _mergeNamespaces(n, m) {
|
|
4
6
|
for (var i = 0; i < m.length; i++) {
|
|
5
7
|
const e = m[i];
|
|
@@ -133,694 +135,6 @@ const Clickoutside = {
|
|
|
133
135
|
delete el[ctx];
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
137
|
-
function getDefaultExportFromCjs(x) {
|
|
138
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
139
|
-
}
|
|
140
|
-
var date = { exports: {} };
|
|
141
|
-
(function(module) {
|
|
142
|
-
(function(main) {
|
|
143
|
-
var fecha2 = {};
|
|
144
|
-
var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
145
|
-
var twoDigits = "\\d\\d?";
|
|
146
|
-
var threeDigits = "\\d{3}";
|
|
147
|
-
var fourDigits = "\\d{4}";
|
|
148
|
-
var word = "[^\\s]+";
|
|
149
|
-
var literal = /\[([^]*?)\]/gm;
|
|
150
|
-
var noop2 = function() {
|
|
151
|
-
};
|
|
152
|
-
function regexEscape(str) {
|
|
153
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
|
|
154
|
-
}
|
|
155
|
-
function shorten(arr, sLen) {
|
|
156
|
-
var newArr = [];
|
|
157
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
158
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
159
|
-
}
|
|
160
|
-
return newArr;
|
|
161
|
-
}
|
|
162
|
-
function monthUpdate(arrName) {
|
|
163
|
-
return function(d, v, i18n3) {
|
|
164
|
-
var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
|
|
165
|
-
if (~index) {
|
|
166
|
-
d.month = index;
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function pad(val, len) {
|
|
171
|
-
val = String(val);
|
|
172
|
-
len = len || 2;
|
|
173
|
-
while (val.length < len) {
|
|
174
|
-
val = "0" + val;
|
|
175
|
-
}
|
|
176
|
-
return val;
|
|
177
|
-
}
|
|
178
|
-
var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
179
|
-
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
180
|
-
var monthNamesShort = shorten(monthNames, 3);
|
|
181
|
-
var dayNamesShort = shorten(dayNames, 3);
|
|
182
|
-
fecha2.i18n = {
|
|
183
|
-
dayNamesShort,
|
|
184
|
-
dayNames,
|
|
185
|
-
monthNamesShort,
|
|
186
|
-
monthNames,
|
|
187
|
-
amPm: ["am", "pm"],
|
|
188
|
-
DoFn: function DoFn(D) {
|
|
189
|
-
return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
var formatFlags = {
|
|
193
|
-
D: function(dateObj) {
|
|
194
|
-
return dateObj.getDay();
|
|
195
|
-
},
|
|
196
|
-
DD: function(dateObj) {
|
|
197
|
-
return pad(dateObj.getDay());
|
|
198
|
-
},
|
|
199
|
-
Do: function(dateObj, i18n3) {
|
|
200
|
-
return i18n3.DoFn(dateObj.getDate());
|
|
201
|
-
},
|
|
202
|
-
d: function(dateObj) {
|
|
203
|
-
return dateObj.getDate();
|
|
204
|
-
},
|
|
205
|
-
dd: function(dateObj) {
|
|
206
|
-
return pad(dateObj.getDate());
|
|
207
|
-
},
|
|
208
|
-
ddd: function(dateObj, i18n3) {
|
|
209
|
-
return i18n3.dayNamesShort[dateObj.getDay()];
|
|
210
|
-
},
|
|
211
|
-
dddd: function(dateObj, i18n3) {
|
|
212
|
-
return i18n3.dayNames[dateObj.getDay()];
|
|
213
|
-
},
|
|
214
|
-
M: function(dateObj) {
|
|
215
|
-
return dateObj.getMonth() + 1;
|
|
216
|
-
},
|
|
217
|
-
MM: function(dateObj) {
|
|
218
|
-
return pad(dateObj.getMonth() + 1);
|
|
219
|
-
},
|
|
220
|
-
MMM: function(dateObj, i18n3) {
|
|
221
|
-
return i18n3.monthNamesShort[dateObj.getMonth()];
|
|
222
|
-
},
|
|
223
|
-
MMMM: function(dateObj, i18n3) {
|
|
224
|
-
return i18n3.monthNames[dateObj.getMonth()];
|
|
225
|
-
},
|
|
226
|
-
yy: function(dateObj) {
|
|
227
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
228
|
-
},
|
|
229
|
-
yyyy: function(dateObj) {
|
|
230
|
-
return pad(dateObj.getFullYear(), 4);
|
|
231
|
-
},
|
|
232
|
-
h: function(dateObj) {
|
|
233
|
-
return dateObj.getHours() % 12 || 12;
|
|
234
|
-
},
|
|
235
|
-
hh: function(dateObj) {
|
|
236
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
237
|
-
},
|
|
238
|
-
H: function(dateObj) {
|
|
239
|
-
return dateObj.getHours();
|
|
240
|
-
},
|
|
241
|
-
HH: function(dateObj) {
|
|
242
|
-
return pad(dateObj.getHours());
|
|
243
|
-
},
|
|
244
|
-
m: function(dateObj) {
|
|
245
|
-
return dateObj.getMinutes();
|
|
246
|
-
},
|
|
247
|
-
mm: function(dateObj) {
|
|
248
|
-
return pad(dateObj.getMinutes());
|
|
249
|
-
},
|
|
250
|
-
s: function(dateObj) {
|
|
251
|
-
return dateObj.getSeconds();
|
|
252
|
-
},
|
|
253
|
-
ss: function(dateObj) {
|
|
254
|
-
return pad(dateObj.getSeconds());
|
|
255
|
-
},
|
|
256
|
-
S: function(dateObj) {
|
|
257
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
258
|
-
},
|
|
259
|
-
SS: function(dateObj) {
|
|
260
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
261
|
-
},
|
|
262
|
-
SSS: function(dateObj) {
|
|
263
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
264
|
-
},
|
|
265
|
-
a: function(dateObj, i18n3) {
|
|
266
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
|
|
267
|
-
},
|
|
268
|
-
A: function(dateObj, i18n3) {
|
|
269
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
|
|
270
|
-
},
|
|
271
|
-
ZZ: function(dateObj) {
|
|
272
|
-
var o = dateObj.getTimezoneOffset();
|
|
273
|
-
return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
var parseFlags = {
|
|
277
|
-
d: [twoDigits, function(d, v) {
|
|
278
|
-
d.day = v;
|
|
279
|
-
}],
|
|
280
|
-
Do: [twoDigits + word, function(d, v) {
|
|
281
|
-
d.day = parseInt(v, 10);
|
|
282
|
-
}],
|
|
283
|
-
M: [twoDigits, function(d, v) {
|
|
284
|
-
d.month = v - 1;
|
|
285
|
-
}],
|
|
286
|
-
yy: [twoDigits, function(d, v) {
|
|
287
|
-
var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
|
|
288
|
-
d.year = "" + (v > 68 ? cent - 1 : cent) + v;
|
|
289
|
-
}],
|
|
290
|
-
h: [twoDigits, function(d, v) {
|
|
291
|
-
d.hour = v;
|
|
292
|
-
}],
|
|
293
|
-
m: [twoDigits, function(d, v) {
|
|
294
|
-
d.minute = v;
|
|
295
|
-
}],
|
|
296
|
-
s: [twoDigits, function(d, v) {
|
|
297
|
-
d.second = v;
|
|
298
|
-
}],
|
|
299
|
-
yyyy: [fourDigits, function(d, v) {
|
|
300
|
-
d.year = v;
|
|
301
|
-
}],
|
|
302
|
-
S: ["\\d", function(d, v) {
|
|
303
|
-
d.millisecond = v * 100;
|
|
304
|
-
}],
|
|
305
|
-
SS: ["\\d{2}", function(d, v) {
|
|
306
|
-
d.millisecond = v * 10;
|
|
307
|
-
}],
|
|
308
|
-
SSS: [threeDigits, function(d, v) {
|
|
309
|
-
d.millisecond = v;
|
|
310
|
-
}],
|
|
311
|
-
D: [twoDigits, noop2],
|
|
312
|
-
ddd: [word, noop2],
|
|
313
|
-
MMM: [word, monthUpdate("monthNamesShort")],
|
|
314
|
-
MMMM: [word, monthUpdate("monthNames")],
|
|
315
|
-
a: [word, function(d, v, i18n3) {
|
|
316
|
-
var val = v.toLowerCase();
|
|
317
|
-
if (val === i18n3.amPm[0]) {
|
|
318
|
-
d.isPm = false;
|
|
319
|
-
} else if (val === i18n3.amPm[1]) {
|
|
320
|
-
d.isPm = true;
|
|
321
|
-
}
|
|
322
|
-
}],
|
|
323
|
-
ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
|
|
324
|
-
var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
|
|
325
|
-
if (parts) {
|
|
326
|
-
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
327
|
-
d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
|
|
328
|
-
}
|
|
329
|
-
}]
|
|
330
|
-
};
|
|
331
|
-
parseFlags.dd = parseFlags.d;
|
|
332
|
-
parseFlags.dddd = parseFlags.ddd;
|
|
333
|
-
parseFlags.DD = parseFlags.D;
|
|
334
|
-
parseFlags.mm = parseFlags.m;
|
|
335
|
-
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
336
|
-
parseFlags.MM = parseFlags.M;
|
|
337
|
-
parseFlags.ss = parseFlags.s;
|
|
338
|
-
parseFlags.A = parseFlags.a;
|
|
339
|
-
fecha2.masks = {
|
|
340
|
-
default: "ddd MMM dd yyyy HH:mm:ss",
|
|
341
|
-
shortDate: "M/D/yy",
|
|
342
|
-
mediumDate: "MMM d, yyyy",
|
|
343
|
-
longDate: "MMMM d, yyyy",
|
|
344
|
-
fullDate: "dddd, MMMM d, yyyy",
|
|
345
|
-
shortTime: "HH:mm",
|
|
346
|
-
mediumTime: "HH:mm:ss",
|
|
347
|
-
longTime: "HH:mm:ss.SSS"
|
|
348
|
-
};
|
|
349
|
-
fecha2.format = function(dateObj, mask, i18nSettings) {
|
|
350
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
351
|
-
if (typeof dateObj === "number") {
|
|
352
|
-
dateObj = new Date(dateObj);
|
|
353
|
-
}
|
|
354
|
-
if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
|
|
355
|
-
throw new Error("Invalid Date in fecha.format");
|
|
356
|
-
}
|
|
357
|
-
mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
|
|
358
|
-
var literals = [];
|
|
359
|
-
mask = mask.replace(literal, function($0, $1) {
|
|
360
|
-
literals.push($1);
|
|
361
|
-
return "@@@";
|
|
362
|
-
});
|
|
363
|
-
mask = mask.replace(token, function($0) {
|
|
364
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
|
|
365
|
-
});
|
|
366
|
-
return mask.replace(/@@@/g, function() {
|
|
367
|
-
return literals.shift();
|
|
368
|
-
});
|
|
369
|
-
};
|
|
370
|
-
fecha2.parse = function(dateStr, format2, i18nSettings) {
|
|
371
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
372
|
-
if (typeof format2 !== "string") {
|
|
373
|
-
throw new Error("Invalid format in fecha.parse");
|
|
374
|
-
}
|
|
375
|
-
format2 = fecha2.masks[format2] || format2;
|
|
376
|
-
if (dateStr.length > 1e3) {
|
|
377
|
-
return null;
|
|
378
|
-
}
|
|
379
|
-
var dateInfo = {};
|
|
380
|
-
var parseInfo = [];
|
|
381
|
-
var literals = [];
|
|
382
|
-
format2 = format2.replace(literal, function($0, $1) {
|
|
383
|
-
literals.push($1);
|
|
384
|
-
return "@@@";
|
|
385
|
-
});
|
|
386
|
-
var newFormat = regexEscape(format2).replace(token, function($0) {
|
|
387
|
-
if (parseFlags[$0]) {
|
|
388
|
-
var info = parseFlags[$0];
|
|
389
|
-
parseInfo.push(info[1]);
|
|
390
|
-
return "(" + info[0] + ")";
|
|
391
|
-
}
|
|
392
|
-
return $0;
|
|
393
|
-
});
|
|
394
|
-
newFormat = newFormat.replace(/@@@/g, function() {
|
|
395
|
-
return literals.shift();
|
|
396
|
-
});
|
|
397
|
-
var matches = dateStr.match(new RegExp(newFormat, "i"));
|
|
398
|
-
if (!matches) {
|
|
399
|
-
return null;
|
|
400
|
-
}
|
|
401
|
-
for (var i = 1; i < matches.length; i++) {
|
|
402
|
-
parseInfo[i - 1](dateInfo, matches[i], i18n3);
|
|
403
|
-
}
|
|
404
|
-
var today = /* @__PURE__ */ new Date();
|
|
405
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
406
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
407
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
408
|
-
dateInfo.hour = 0;
|
|
409
|
-
}
|
|
410
|
-
var date2;
|
|
411
|
-
if (dateInfo.timezoneOffset != null) {
|
|
412
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
413
|
-
date2 = 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));
|
|
414
|
-
} else {
|
|
415
|
-
date2 = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
416
|
-
}
|
|
417
|
-
return date2;
|
|
418
|
-
};
|
|
419
|
-
if (module.exports) {
|
|
420
|
-
module.exports = fecha2;
|
|
421
|
-
} else {
|
|
422
|
-
main.fecha = fecha2;
|
|
423
|
-
}
|
|
424
|
-
})(commonjsGlobal);
|
|
425
|
-
})(date);
|
|
426
|
-
var dateExports = date.exports;
|
|
427
|
-
const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
|
|
428
|
-
const defaultLang = {
|
|
429
|
-
el: {
|
|
430
|
-
colorpicker: {
|
|
431
|
-
confirm: "确定",
|
|
432
|
-
clear: "清空"
|
|
433
|
-
},
|
|
434
|
-
datepicker: {
|
|
435
|
-
now: "此刻",
|
|
436
|
-
today: "今天",
|
|
437
|
-
cancel: "取消",
|
|
438
|
-
clear: "清空",
|
|
439
|
-
confirm: "确定",
|
|
440
|
-
selectDate: "选择日期",
|
|
441
|
-
selectTime: "选择时间",
|
|
442
|
-
startDate: "开始日期",
|
|
443
|
-
startTime: "开始时间",
|
|
444
|
-
endDate: "结束日期",
|
|
445
|
-
endTime: "结束时间",
|
|
446
|
-
prevYear: "前一年",
|
|
447
|
-
nextYear: "后一年",
|
|
448
|
-
prevMonth: "上个月",
|
|
449
|
-
nextMonth: "下个月",
|
|
450
|
-
year: "年",
|
|
451
|
-
month1: "1 月",
|
|
452
|
-
month2: "2 月",
|
|
453
|
-
month3: "3 月",
|
|
454
|
-
month4: "4 月",
|
|
455
|
-
month5: "5 月",
|
|
456
|
-
month6: "6 月",
|
|
457
|
-
month7: "7 月",
|
|
458
|
-
month8: "8 月",
|
|
459
|
-
month9: "9 月",
|
|
460
|
-
month10: "10 月",
|
|
461
|
-
month11: "11 月",
|
|
462
|
-
month12: "12 月",
|
|
463
|
-
// week: '周次',
|
|
464
|
-
weeks: {
|
|
465
|
-
sun: "日",
|
|
466
|
-
mon: "一",
|
|
467
|
-
tue: "二",
|
|
468
|
-
wed: "三",
|
|
469
|
-
thu: "四",
|
|
470
|
-
fri: "五",
|
|
471
|
-
sat: "六"
|
|
472
|
-
},
|
|
473
|
-
months: {
|
|
474
|
-
jan: "一月",
|
|
475
|
-
feb: "二月",
|
|
476
|
-
mar: "三月",
|
|
477
|
-
apr: "四月",
|
|
478
|
-
may: "五月",
|
|
479
|
-
jun: "六月",
|
|
480
|
-
jul: "七月",
|
|
481
|
-
aug: "八月",
|
|
482
|
-
sep: "九月",
|
|
483
|
-
oct: "十月",
|
|
484
|
-
nov: "十一月",
|
|
485
|
-
dec: "十二月"
|
|
486
|
-
}
|
|
487
|
-
},
|
|
488
|
-
select: {
|
|
489
|
-
loading: "加载中",
|
|
490
|
-
noMatch: "无匹配数据",
|
|
491
|
-
noData: "无数据",
|
|
492
|
-
placeholder: "请选择"
|
|
493
|
-
},
|
|
494
|
-
cascader: {
|
|
495
|
-
noMatch: "无匹配数据",
|
|
496
|
-
loading: "加载中",
|
|
497
|
-
placeholder: "请选择",
|
|
498
|
-
noData: "暂无数据"
|
|
499
|
-
},
|
|
500
|
-
pagination: {
|
|
501
|
-
goto: "前往",
|
|
502
|
-
pagesize: "条/页",
|
|
503
|
-
total: "共 {total} 条",
|
|
504
|
-
pageClassifier: "页"
|
|
505
|
-
},
|
|
506
|
-
messagebox: {
|
|
507
|
-
title: "提示",
|
|
508
|
-
confirm: "确定",
|
|
509
|
-
cancel: "取消",
|
|
510
|
-
error: "输入的数据不合法!"
|
|
511
|
-
},
|
|
512
|
-
upload: {
|
|
513
|
-
deleteTip: "按 delete 键可删除",
|
|
514
|
-
delete: "删除",
|
|
515
|
-
preview: "查看图片",
|
|
516
|
-
continue: "继续上传"
|
|
517
|
-
},
|
|
518
|
-
table: {
|
|
519
|
-
emptyText: "暂无数据",
|
|
520
|
-
confirmFilter: "筛选",
|
|
521
|
-
resetFilter: "重置",
|
|
522
|
-
clearFilter: "全部",
|
|
523
|
-
sumText: "合计"
|
|
524
|
-
},
|
|
525
|
-
tree: {
|
|
526
|
-
emptyText: "暂无数据"
|
|
527
|
-
},
|
|
528
|
-
transfer: {
|
|
529
|
-
noMatch: "无匹配数据",
|
|
530
|
-
noData: "无数据",
|
|
531
|
-
titles: ["列表 1", "列表 2"],
|
|
532
|
-
filterPlaceholder: "请输入搜索内容",
|
|
533
|
-
noCheckedFormat: "共 {total} 项",
|
|
534
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
535
|
-
},
|
|
536
|
-
image: {
|
|
537
|
-
error: "加载失败"
|
|
538
|
-
},
|
|
539
|
-
pageHeader: {
|
|
540
|
-
title: "返回"
|
|
541
|
-
},
|
|
542
|
-
popconfirm: {
|
|
543
|
-
confirmButtonText: "确定",
|
|
544
|
-
cancelButtonText: "取消"
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
549
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
550
|
-
};
|
|
551
|
-
function isNonNullObject(value) {
|
|
552
|
-
return !!value && typeof value === "object";
|
|
553
|
-
}
|
|
554
|
-
function isSpecial(value) {
|
|
555
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
556
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
557
|
-
}
|
|
558
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
559
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
560
|
-
function isReactElement(value) {
|
|
561
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
562
|
-
}
|
|
563
|
-
function emptyTarget(val) {
|
|
564
|
-
return Array.isArray(val) ? [] : {};
|
|
565
|
-
}
|
|
566
|
-
function cloneIfNecessary(value, optionsArgument) {
|
|
567
|
-
var clone = optionsArgument && optionsArgument.clone === true;
|
|
568
|
-
return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
|
|
569
|
-
}
|
|
570
|
-
function defaultArrayMerge(target, source, optionsArgument) {
|
|
571
|
-
var destination = target.slice();
|
|
572
|
-
source.forEach(function(e, i) {
|
|
573
|
-
if (typeof destination[i] === "undefined") {
|
|
574
|
-
destination[i] = cloneIfNecessary(e, optionsArgument);
|
|
575
|
-
} else if (isMergeableObject(e)) {
|
|
576
|
-
destination[i] = deepmerge(target[i], e, optionsArgument);
|
|
577
|
-
} else if (target.indexOf(e) === -1) {
|
|
578
|
-
destination.push(cloneIfNecessary(e, optionsArgument));
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
return destination;
|
|
582
|
-
}
|
|
583
|
-
function mergeObject(target, source, optionsArgument) {
|
|
584
|
-
var destination = {};
|
|
585
|
-
if (isMergeableObject(target)) {
|
|
586
|
-
Object.keys(target).forEach(function(key) {
|
|
587
|
-
destination[key] = cloneIfNecessary(target[key], optionsArgument);
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
Object.keys(source).forEach(function(key) {
|
|
591
|
-
if (!isMergeableObject(source[key]) || !target[key]) {
|
|
592
|
-
destination[key] = cloneIfNecessary(source[key], optionsArgument);
|
|
593
|
-
} else {
|
|
594
|
-
destination[key] = deepmerge(target[key], source[key], optionsArgument);
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
return destination;
|
|
598
|
-
}
|
|
599
|
-
function deepmerge(target, source, optionsArgument) {
|
|
600
|
-
var sourceIsArray = Array.isArray(source);
|
|
601
|
-
var targetIsArray = Array.isArray(target);
|
|
602
|
-
var options = optionsArgument || {
|
|
603
|
-
arrayMerge: defaultArrayMerge
|
|
604
|
-
};
|
|
605
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
606
|
-
if (!sourceAndTargetTypesMatch) {
|
|
607
|
-
return cloneIfNecessary(source, optionsArgument);
|
|
608
|
-
} else if (sourceIsArray) {
|
|
609
|
-
var arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
610
|
-
return arrayMerge(target, source, optionsArgument);
|
|
611
|
-
} else {
|
|
612
|
-
return mergeObject(target, source, optionsArgument);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
616
|
-
if (!Array.isArray(array) || array.length < 2) {
|
|
617
|
-
throw new Error("first argument should be an array with at least two elements");
|
|
618
|
-
}
|
|
619
|
-
return array.reduce(function(prev, next) {
|
|
620
|
-
return deepmerge(prev, next, optionsArgument);
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
var deepmerge_1 = deepmerge;
|
|
624
|
-
var cjs = deepmerge_1;
|
|
625
|
-
const deepmerge$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjs);
|
|
626
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
627
|
-
function hasOwn$1(obj, key) {
|
|
628
|
-
return hasOwnProperty$1.call(obj, key);
|
|
629
|
-
}
|
|
630
|
-
const arrayFindIndex$1 = function(arr, pred) {
|
|
631
|
-
for (let i = 0; i !== arr.length; ++i) {
|
|
632
|
-
if (pred(arr[i])) {
|
|
633
|
-
return i;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
return -1;
|
|
637
|
-
};
|
|
638
|
-
const arrayFind = function(arr, pred) {
|
|
639
|
-
const idx = arrayFindIndex$1(arr, pred);
|
|
640
|
-
return idx !== -1 ? arr[idx] : void 0;
|
|
641
|
-
};
|
|
642
|
-
const coerceTruthyValueToArray = function(val) {
|
|
643
|
-
if (Array.isArray(val)) {
|
|
644
|
-
return val;
|
|
645
|
-
} else if (val) {
|
|
646
|
-
return [val];
|
|
647
|
-
} else {
|
|
648
|
-
return [];
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
652
|
-
function Format(Vue2) {
|
|
653
|
-
function template(string, ...args) {
|
|
654
|
-
if (args.length === 1 && typeof args[0] === "object") {
|
|
655
|
-
args = args[0];
|
|
656
|
-
}
|
|
657
|
-
if (!args || !args.hasOwnProperty) {
|
|
658
|
-
args = {};
|
|
659
|
-
}
|
|
660
|
-
return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
|
|
661
|
-
let result;
|
|
662
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
663
|
-
return i;
|
|
664
|
-
} else {
|
|
665
|
-
result = hasOwn$1(args, i) ? args[i] : null;
|
|
666
|
-
if (result === null || result === void 0) {
|
|
667
|
-
return "";
|
|
668
|
-
}
|
|
669
|
-
return result;
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
return template;
|
|
674
|
-
}
|
|
675
|
-
const format$2 = Format();
|
|
676
|
-
let lang$1 = defaultLang;
|
|
677
|
-
let merged$1 = false;
|
|
678
|
-
let i18nHandler$1 = function() {
|
|
679
|
-
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
680
|
-
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
681
|
-
if (!merged$1) {
|
|
682
|
-
merged$1 = true;
|
|
683
|
-
Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
|
|
684
|
-
clone: true
|
|
685
|
-
}));
|
|
686
|
-
}
|
|
687
|
-
return vuei18n.apply(this, arguments);
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
const t$1 = function(path, options) {
|
|
691
|
-
let value = i18nHandler$1.apply(this, arguments);
|
|
692
|
-
if (value !== null && value !== void 0)
|
|
693
|
-
return value;
|
|
694
|
-
const array = path.split(".");
|
|
695
|
-
let current = lang$1;
|
|
696
|
-
for (let i = 0, j = array.length; i < j; i++) {
|
|
697
|
-
const property = array[i];
|
|
698
|
-
value = current[property];
|
|
699
|
-
if (i === j - 1)
|
|
700
|
-
return format$2(value, options);
|
|
701
|
-
if (!value)
|
|
702
|
-
return "";
|
|
703
|
-
current = value;
|
|
704
|
-
}
|
|
705
|
-
return "";
|
|
706
|
-
};
|
|
707
|
-
const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
708
|
-
const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
709
|
-
const getI18nSettings = () => {
|
|
710
|
-
return {
|
|
711
|
-
dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
712
|
-
dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
713
|
-
monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
|
|
714
|
-
monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
|
|
715
|
-
amPm: ["am", "pm"]
|
|
716
|
-
};
|
|
717
|
-
};
|
|
718
|
-
const toDate = function(date2) {
|
|
719
|
-
return isDate(date2) ? new Date(date2) : null;
|
|
720
|
-
};
|
|
721
|
-
const isDate = function(date2) {
|
|
722
|
-
if (date2 === null || date2 === void 0)
|
|
723
|
-
return false;
|
|
724
|
-
if (isNaN(new Date(date2).getTime()))
|
|
725
|
-
return false;
|
|
726
|
-
if (Array.isArray(date2))
|
|
727
|
-
return false;
|
|
728
|
-
return true;
|
|
729
|
-
};
|
|
730
|
-
const isDateObject = function(val) {
|
|
731
|
-
return val instanceof Date;
|
|
732
|
-
};
|
|
733
|
-
const formatDate = function(date2, format2) {
|
|
734
|
-
date2 = toDate(date2);
|
|
735
|
-
if (!date2)
|
|
736
|
-
return "";
|
|
737
|
-
return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
738
|
-
};
|
|
739
|
-
const parseDate = function(string, format2) {
|
|
740
|
-
return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
741
|
-
};
|
|
742
|
-
const getDayCountOfMonth = function(year, month) {
|
|
743
|
-
if (month === 3 || month === 5 || month === 8 || month === 10) {
|
|
744
|
-
return 30;
|
|
745
|
-
}
|
|
746
|
-
if (month === 1) {
|
|
747
|
-
if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
|
|
748
|
-
return 29;
|
|
749
|
-
} else {
|
|
750
|
-
return 28;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
return 31;
|
|
754
|
-
};
|
|
755
|
-
const getFirstDayOfMonth = function(date2) {
|
|
756
|
-
const temp = new Date(date2.getTime());
|
|
757
|
-
temp.setDate(1);
|
|
758
|
-
return temp.getDay();
|
|
759
|
-
};
|
|
760
|
-
const prevDate = function(date2, amount = 1) {
|
|
761
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() - amount);
|
|
762
|
-
};
|
|
763
|
-
const nextDate = function(date2, amount = 1) {
|
|
764
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
|
|
765
|
-
};
|
|
766
|
-
const getStartDateOfMonth = function(year, month) {
|
|
767
|
-
const result = new Date(year, month, 1);
|
|
768
|
-
const day = result.getDay();
|
|
769
|
-
if (day === 0) {
|
|
770
|
-
return prevDate(result, 7);
|
|
771
|
-
} else {
|
|
772
|
-
return prevDate(result, day);
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
const getWeekNumber = function(src) {
|
|
776
|
-
if (!isDate(src))
|
|
777
|
-
return null;
|
|
778
|
-
const date2 = new Date(src.getTime());
|
|
779
|
-
date2.setHours(0, 0, 0, 0);
|
|
780
|
-
date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
|
|
781
|
-
const week1 = new Date(date2.getFullYear(), 0, 4);
|
|
782
|
-
return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
|
|
783
|
-
};
|
|
784
|
-
const modifyDate = function(date2, y, m, d) {
|
|
785
|
-
return new Date(y, m, d, date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
|
|
786
|
-
};
|
|
787
|
-
const modifyTime = function(date2, h, m, s) {
|
|
788
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
|
|
789
|
-
};
|
|
790
|
-
const modifyWithTimeString = (date2, time) => {
|
|
791
|
-
if (date2 == null || !time) {
|
|
792
|
-
return date2;
|
|
793
|
-
}
|
|
794
|
-
time = parseDate(time, "HH:mm:ss");
|
|
795
|
-
return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
796
|
-
};
|
|
797
|
-
const clearTime = function(date2) {
|
|
798
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
|
|
799
|
-
};
|
|
800
|
-
const changeYearMonthAndClampDate = function(date2, year, month) {
|
|
801
|
-
const monthDate = Math.min(date2.getDate(), getDayCountOfMonth(year, month));
|
|
802
|
-
return modifyDate(date2, year, month, monthDate);
|
|
803
|
-
};
|
|
804
|
-
const prevMonth = function(date2) {
|
|
805
|
-
const year = date2.getFullYear();
|
|
806
|
-
const month = date2.getMonth();
|
|
807
|
-
return month === 0 ? changeYearMonthAndClampDate(date2, year - 1, 11) : changeYearMonthAndClampDate(date2, year, month - 1);
|
|
808
|
-
};
|
|
809
|
-
const nextMonth = function(date2) {
|
|
810
|
-
const year = date2.getFullYear();
|
|
811
|
-
const month = date2.getMonth();
|
|
812
|
-
return month === 11 ? changeYearMonthAndClampDate(date2, year + 1, 0) : changeYearMonthAndClampDate(date2, year, month + 1);
|
|
813
|
-
};
|
|
814
|
-
const prevYear = function(date2, amount = 1) {
|
|
815
|
-
const year = date2.getFullYear();
|
|
816
|
-
const month = date2.getMonth();
|
|
817
|
-
return changeYearMonthAndClampDate(date2, year - amount, month);
|
|
818
|
-
};
|
|
819
|
-
const nextYear = function(date2, amount = 1) {
|
|
820
|
-
const year = date2.getFullYear();
|
|
821
|
-
const month = date2.getMonth();
|
|
822
|
-
return changeYearMonthAndClampDate(date2, year + amount, month);
|
|
823
|
-
};
|
|
824
138
|
function merge(target) {
|
|
825
139
|
for (let i = 1, j = arguments.length; i < j; i++) {
|
|
826
140
|
let source = arguments[i] || {};
|
|
@@ -1002,6 +316,10 @@ if (!Vue.prototype.$isServer) {
|
|
|
1002
316
|
}
|
|
1003
317
|
});
|
|
1004
318
|
}
|
|
319
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
320
|
+
function getDefaultExportFromCjs(x) {
|
|
321
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
322
|
+
}
|
|
1005
323
|
var popper$1 = { exports: {} };
|
|
1006
324
|
/**
|
|
1007
325
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -1290,7 +608,7 @@ var popper$1 = { exports: {} };
|
|
|
1290
608
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
1291
609
|
}
|
|
1292
610
|
modifiersToRun.forEach((function(modifier) {
|
|
1293
|
-
if (
|
|
611
|
+
if (isFunction(modifier)) {
|
|
1294
612
|
data = modifier.call(this, data);
|
|
1295
613
|
}
|
|
1296
614
|
}).bind(this));
|
|
@@ -1602,7 +920,7 @@ var popper$1 = { exports: {} };
|
|
|
1602
920
|
element.style[prop] = styles[prop] + unit;
|
|
1603
921
|
});
|
|
1604
922
|
}
|
|
1605
|
-
function
|
|
923
|
+
function isFunction(functionToCheck) {
|
|
1606
924
|
var getType = {};
|
|
1607
925
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
1608
926
|
}
|
|
@@ -1619,8 +937,8 @@ var popper$1 = { exports: {} };
|
|
|
1619
937
|
}
|
|
1620
938
|
function getBoundingClientRect(element) {
|
|
1621
939
|
var rect = element.getBoundingClientRect();
|
|
1622
|
-
var
|
|
1623
|
-
var rectTop =
|
|
940
|
+
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
|
941
|
+
var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
1624
942
|
return {
|
|
1625
943
|
left: rect.left,
|
|
1626
944
|
top: rectTop,
|
|
@@ -1947,10 +1265,10 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1947
1265
|
function isLeapYear(year) {
|
|
1948
1266
|
return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
|
|
1949
1267
|
}
|
|
1950
|
-
function getDays(
|
|
1951
|
-
const year =
|
|
1952
|
-
const month2 =
|
|
1953
|
-
const day =
|
|
1268
|
+
function getDays(date2) {
|
|
1269
|
+
const year = date2.getFullYear();
|
|
1270
|
+
const month2 = date2.getMonth() + 1;
|
|
1271
|
+
const day = date2.getDate();
|
|
1954
1272
|
let days2 = day;
|
|
1955
1273
|
const monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1956
1274
|
for (let i = 0; i < month2 - 1; i++) {
|
|
@@ -1974,12 +1292,12 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1974
1292
|
trueDate.setHours(0, 0, 0, 0);
|
|
1975
1293
|
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
|
1976
1294
|
}
|
|
1977
|
-
let
|
|
1295
|
+
let date = formatDate(trueDate, format2);
|
|
1978
1296
|
if (7 - yearOneDateSun < 4 && 7 - yearOneDateSun >= days) {
|
|
1979
|
-
|
|
1297
|
+
date = date.replace(new RegExp(y, "ig"), y - 1);
|
|
1980
1298
|
}
|
|
1981
|
-
|
|
1982
|
-
return
|
|
1299
|
+
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
|
|
1300
|
+
return date;
|
|
1983
1301
|
}
|
|
1984
1302
|
if (!Array.isArray(value)) {
|
|
1985
1303
|
return getDate(value);
|
|
@@ -2037,11 +1355,11 @@ const valueEquals = function(a, b) {
|
|
|
2037
1355
|
}
|
|
2038
1356
|
return false;
|
|
2039
1357
|
};
|
|
2040
|
-
const isString
|
|
1358
|
+
const isString = function(val) {
|
|
2041
1359
|
return typeof val === "string" || val instanceof String;
|
|
2042
1360
|
};
|
|
2043
1361
|
const validator = function(val) {
|
|
2044
|
-
return val === null || val === void 0 || isString
|
|
1362
|
+
return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
|
|
2045
1363
|
};
|
|
2046
1364
|
const _sfc_main$4 = {
|
|
2047
1365
|
directives: {
|
|
@@ -2279,12 +1597,12 @@ const _sfc_main$4 = {
|
|
|
2279
1597
|
return value;
|
|
2280
1598
|
}
|
|
2281
1599
|
},
|
|
2282
|
-
formatToValue(
|
|
2283
|
-
const isFormattable = isDateObject(
|
|
1600
|
+
formatToValue(date) {
|
|
1601
|
+
const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
|
|
2284
1602
|
if (this.valueFormat && isFormattable) {
|
|
2285
|
-
return formatAsFormatAndType(
|
|
1603
|
+
return formatAsFormatAndType(date, this.valueFormat);
|
|
2286
1604
|
} else {
|
|
2287
|
-
return
|
|
1605
|
+
return date;
|
|
2288
1606
|
}
|
|
2289
1607
|
},
|
|
2290
1608
|
// {parse, formatTo} String deals with user input
|
|
@@ -2454,10 +1772,10 @@ const _sfc_main$4 = {
|
|
|
2454
1772
|
this.$el.appendChild(this.picker.$el);
|
|
2455
1773
|
this.picker.resetView && this.picker.resetView();
|
|
2456
1774
|
this.picker.$on("dodestroy", this.doDestroy);
|
|
2457
|
-
this.picker.$on("pick", (
|
|
1775
|
+
this.picker.$on("pick", (date = "", visible = false) => {
|
|
2458
1776
|
this.userInput = null;
|
|
2459
1777
|
this.pickerVisible = this.picker.visible = visible;
|
|
2460
|
-
this.emitInput(
|
|
1778
|
+
this.emitInput(date);
|
|
2461
1779
|
this.picker.resetView && this.picker.resetView();
|
|
2462
1780
|
});
|
|
2463
1781
|
this.picker.$on("select-range", (start, end, pos) => {
|
|
@@ -2575,10 +1893,7 @@ var _sfc_render$4 = function render() {
|
|
|
2575
1893
|
var _sfc_staticRenderFns$4 = [];
|
|
2576
1894
|
var __component__$4 = /* @__PURE__ */ normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, null, null, null);
|
|
2577
1895
|
const Picker = __component__$4.exports;
|
|
2578
|
-
|
|
2579
|
-
var zhCN = {};
|
|
2580
|
-
zhCN.__esModule = true;
|
|
2581
|
-
zhCN.default = {
|
|
1896
|
+
const defaultLang = {
|
|
2582
1897
|
el: {
|
|
2583
1898
|
colorpicker: {
|
|
2584
1899
|
confirm: "确定",
|
|
@@ -2698,151 +2013,99 @@ zhCN.default = {
|
|
|
2698
2013
|
}
|
|
2699
2014
|
}
|
|
2700
2015
|
};
|
|
2701
|
-
var
|
|
2702
|
-
|
|
2703
|
-
var types = {};
|
|
2704
|
-
types.__esModule = true;
|
|
2705
|
-
types.isString = isString;
|
|
2706
|
-
types.isObject = isObject;
|
|
2707
|
-
types.isHtmlElement = isHtmlElement;
|
|
2708
|
-
function isString(obj) {
|
|
2709
|
-
return Object.prototype.toString.call(obj) === "[object String]";
|
|
2710
|
-
}
|
|
2711
|
-
function isObject(obj) {
|
|
2712
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2713
|
-
}
|
|
2714
|
-
function isHtmlElement(node) {
|
|
2715
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
2716
|
-
}
|
|
2717
|
-
types.isFunction = function isFunction(functionToCheck) {
|
|
2718
|
-
var getType = {};
|
|
2719
|
-
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
2720
|
-
};
|
|
2721
|
-
types.isUndefined = function isUndefined(val) {
|
|
2722
|
-
return val === void 0;
|
|
2723
|
-
};
|
|
2724
|
-
types.isDefined = function isDefined(val) {
|
|
2725
|
-
return val !== void 0 && val !== null;
|
|
2726
|
-
};
|
|
2727
|
-
util.__esModule = true;
|
|
2728
|
-
util.isEmpty = util.isEqual = util.arrayEquals = util.looseEqual = util.capitalize = util.kebabCase = util.autoprefixer = util.isFirefox = util.isEdge = util.isIE = util.coerceTruthyValueToArray = util.arrayFind = util.arrayFindIndex = util.escapeRegexpString = util.valueEquals = util.generateId = util.getValueByPath = void 0;
|
|
2729
|
-
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
2730
|
-
return typeof obj;
|
|
2731
|
-
} : function(obj) {
|
|
2732
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2016
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
2017
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
2733
2018
|
};
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
util.toObject = toObject;
|
|
2737
|
-
util.getPropByPath = getPropByPath;
|
|
2738
|
-
util.rafThrottle = rafThrottle;
|
|
2739
|
-
util.objToArray = objToArray;
|
|
2740
|
-
var _vue$1 = Vue;
|
|
2741
|
-
var _vue2$1 = _interopRequireDefault$1(_vue$1);
|
|
2742
|
-
var _types = types;
|
|
2743
|
-
function _interopRequireDefault$1(obj) {
|
|
2744
|
-
return obj && obj.__esModule ? obj : {
|
|
2745
|
-
default: obj
|
|
2746
|
-
};
|
|
2019
|
+
function isNonNullObject(value) {
|
|
2020
|
+
return !!value && typeof value === "object";
|
|
2747
2021
|
}
|
|
2748
|
-
|
|
2749
|
-
|
|
2022
|
+
function isSpecial(value) {
|
|
2023
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
2024
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
2750
2025
|
}
|
|
2751
|
-
function
|
|
2752
|
-
|
|
2026
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
2027
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
2028
|
+
function isReactElement(value) {
|
|
2029
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
2753
2030
|
}
|
|
2754
|
-
function
|
|
2755
|
-
|
|
2756
|
-
to[key] = _from[key];
|
|
2757
|
-
}
|
|
2758
|
-
return to;
|
|
2031
|
+
function emptyTarget(val) {
|
|
2032
|
+
return Array.isArray(val) ? [] : {};
|
|
2759
2033
|
}
|
|
2760
|
-
function
|
|
2761
|
-
var
|
|
2762
|
-
|
|
2763
|
-
if (arr[i]) {
|
|
2764
|
-
extend(res, arr[i]);
|
|
2765
|
-
}
|
|
2766
|
-
}
|
|
2767
|
-
return res;
|
|
2034
|
+
function cloneIfNecessary(value, optionsArgument) {
|
|
2035
|
+
var clone = optionsArgument && optionsArgument.clone === true;
|
|
2036
|
+
return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
|
|
2768
2037
|
}
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
if (
|
|
2777
|
-
|
|
2778
|
-
if (i === j - 1) {
|
|
2779
|
-
result = current[path];
|
|
2780
|
-
break;
|
|
2038
|
+
function defaultArrayMerge(target, source, optionsArgument) {
|
|
2039
|
+
var destination = target.slice();
|
|
2040
|
+
source.forEach(function(e, i) {
|
|
2041
|
+
if (typeof destination[i] === "undefined") {
|
|
2042
|
+
destination[i] = cloneIfNecessary(e, optionsArgument);
|
|
2043
|
+
} else if (isMergeableObject(e)) {
|
|
2044
|
+
destination[i] = deepmerge(target[i], e, optionsArgument);
|
|
2045
|
+
} else if (target.indexOf(e) === -1) {
|
|
2046
|
+
destination.push(cloneIfNecessary(e, optionsArgument));
|
|
2781
2047
|
}
|
|
2782
|
-
|
|
2048
|
+
});
|
|
2049
|
+
return destination;
|
|
2050
|
+
}
|
|
2051
|
+
function mergeObject(target, source, optionsArgument) {
|
|
2052
|
+
var destination = {};
|
|
2053
|
+
if (isMergeableObject(target)) {
|
|
2054
|
+
Object.keys(target).forEach(function(key) {
|
|
2055
|
+
destination[key] = cloneIfNecessary(target[key], optionsArgument);
|
|
2056
|
+
});
|
|
2783
2057
|
}
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
var tempObj = obj;
|
|
2788
|
-
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
2789
|
-
path = path.replace(/^\./, "");
|
|
2790
|
-
var keyArr = path.split(".");
|
|
2791
|
-
var i = 0;
|
|
2792
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
2793
|
-
if (!tempObj && !strict)
|
|
2794
|
-
break;
|
|
2795
|
-
var key = keyArr[i];
|
|
2796
|
-
if (key in tempObj) {
|
|
2797
|
-
tempObj = tempObj[key];
|
|
2058
|
+
Object.keys(source).forEach(function(key) {
|
|
2059
|
+
if (!isMergeableObject(source[key]) || !target[key]) {
|
|
2060
|
+
destination[key] = cloneIfNecessary(source[key], optionsArgument);
|
|
2798
2061
|
} else {
|
|
2799
|
-
|
|
2800
|
-
throw new Error("please transfer a valid prop path to form item!");
|
|
2801
|
-
}
|
|
2802
|
-
break;
|
|
2062
|
+
destination[key] = deepmerge(target[key], source[key], optionsArgument);
|
|
2803
2063
|
}
|
|
2804
|
-
}
|
|
2805
|
-
return
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2064
|
+
});
|
|
2065
|
+
return destination;
|
|
2066
|
+
}
|
|
2067
|
+
function deepmerge(target, source, optionsArgument) {
|
|
2068
|
+
var sourceIsArray = Array.isArray(source);
|
|
2069
|
+
var targetIsArray = Array.isArray(target);
|
|
2070
|
+
var options = optionsArgument || {
|
|
2071
|
+
arrayMerge: defaultArrayMerge
|
|
2809
2072
|
};
|
|
2073
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
2074
|
+
if (!sourceAndTargetTypesMatch) {
|
|
2075
|
+
return cloneIfNecessary(source, optionsArgument);
|
|
2076
|
+
} else if (sourceIsArray) {
|
|
2077
|
+
var arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
2078
|
+
return arrayMerge(target, source, optionsArgument);
|
|
2079
|
+
} else {
|
|
2080
|
+
return mergeObject(target, source, optionsArgument);
|
|
2081
|
+
}
|
|
2810
2082
|
}
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
util.valueEquals = function valueEquals2(a, b) {
|
|
2815
|
-
if (a === b)
|
|
2816
|
-
return true;
|
|
2817
|
-
if (!(a instanceof Array))
|
|
2818
|
-
return false;
|
|
2819
|
-
if (!(b instanceof Array))
|
|
2820
|
-
return false;
|
|
2821
|
-
if (a.length !== b.length)
|
|
2822
|
-
return false;
|
|
2823
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
2824
|
-
if (a[i] !== b[i])
|
|
2825
|
-
return false;
|
|
2083
|
+
deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
2084
|
+
if (!Array.isArray(array) || array.length < 2) {
|
|
2085
|
+
throw new Error("first argument should be an array with at least two elements");
|
|
2826
2086
|
}
|
|
2827
|
-
return
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
2831
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
2087
|
+
return array.reduce(function(prev, next) {
|
|
2088
|
+
return deepmerge(prev, next, optionsArgument);
|
|
2089
|
+
});
|
|
2832
2090
|
};
|
|
2833
|
-
var
|
|
2834
|
-
|
|
2091
|
+
var deepmerge_1 = deepmerge;
|
|
2092
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2093
|
+
function hasOwn(obj, key) {
|
|
2094
|
+
return hasOwnProperty.call(obj, key);
|
|
2095
|
+
}
|
|
2096
|
+
const arrayFindIndex = function(arr, pred) {
|
|
2097
|
+
for (let i = 0; i !== arr.length; ++i) {
|
|
2835
2098
|
if (pred(arr[i])) {
|
|
2836
2099
|
return i;
|
|
2837
2100
|
}
|
|
2838
2101
|
}
|
|
2839
2102
|
return -1;
|
|
2840
2103
|
};
|
|
2841
|
-
|
|
2842
|
-
|
|
2104
|
+
const arrayFind = function(arr, pred) {
|
|
2105
|
+
const idx = arrayFindIndex(arr, pred);
|
|
2843
2106
|
return idx !== -1 ? arr[idx] : void 0;
|
|
2844
2107
|
};
|
|
2845
|
-
|
|
2108
|
+
const coerceTruthyValueToArray = function(val) {
|
|
2846
2109
|
if (Array.isArray(val)) {
|
|
2847
2110
|
return val;
|
|
2848
2111
|
} else if (val) {
|
|
@@ -2851,138 +2114,21 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
|
2851
2114
|
return [];
|
|
2852
2115
|
}
|
|
2853
2116
|
};
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
2859
|
-
};
|
|
2860
|
-
util.isFirefox = function isFirefox() {
|
|
2861
|
-
return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
2862
|
-
};
|
|
2863
|
-
util.autoprefixer = function autoprefixer(style) {
|
|
2864
|
-
if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
|
|
2865
|
-
return style;
|
|
2866
|
-
var rules = ["transform", "transition", "animation"];
|
|
2867
|
-
var prefixes = ["ms-", "webkit-"];
|
|
2868
|
-
rules.forEach(function(rule) {
|
|
2869
|
-
var value = style[rule];
|
|
2870
|
-
if (rule && value) {
|
|
2871
|
-
prefixes.forEach(function(prefix) {
|
|
2872
|
-
style[prefix + rule] = value;
|
|
2873
|
-
});
|
|
2874
|
-
}
|
|
2875
|
-
});
|
|
2876
|
-
return style;
|
|
2877
|
-
};
|
|
2878
|
-
util.kebabCase = function kebabCase(str) {
|
|
2879
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
2880
|
-
return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
|
|
2881
|
-
};
|
|
2882
|
-
util.capitalize = function capitalize(str) {
|
|
2883
|
-
if (!(0, _types.isString)(str))
|
|
2884
|
-
return str;
|
|
2885
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2886
|
-
};
|
|
2887
|
-
var looseEqual = util.looseEqual = function looseEqual2(a, b) {
|
|
2888
|
-
var isObjectA = (0, _types.isObject)(a);
|
|
2889
|
-
var isObjectB = (0, _types.isObject)(b);
|
|
2890
|
-
if (isObjectA && isObjectB) {
|
|
2891
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
2892
|
-
} else if (!isObjectA && !isObjectB) {
|
|
2893
|
-
return String(a) === String(b);
|
|
2894
|
-
} else {
|
|
2895
|
-
return false;
|
|
2896
|
-
}
|
|
2897
|
-
};
|
|
2898
|
-
var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
|
|
2899
|
-
arrayA = arrayA || [];
|
|
2900
|
-
arrayB = arrayB || [];
|
|
2901
|
-
if (arrayA.length !== arrayB.length) {
|
|
2902
|
-
return false;
|
|
2903
|
-
}
|
|
2904
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
2905
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
2906
|
-
return false;
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
return true;
|
|
2910
|
-
};
|
|
2911
|
-
util.isEqual = function isEqual(value1, value2) {
|
|
2912
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
2913
|
-
return arrayEquals(value1, value2);
|
|
2914
|
-
}
|
|
2915
|
-
return looseEqual(value1, value2);
|
|
2916
|
-
};
|
|
2917
|
-
var isEmpty = util.isEmpty = function isEmpty2(val) {
|
|
2918
|
-
if (val == null)
|
|
2919
|
-
return true;
|
|
2920
|
-
if (typeof val === "boolean")
|
|
2921
|
-
return false;
|
|
2922
|
-
if (typeof val === "number")
|
|
2923
|
-
return !val;
|
|
2924
|
-
if (val instanceof Error)
|
|
2925
|
-
return val.message === "";
|
|
2926
|
-
switch (Object.prototype.toString.call(val)) {
|
|
2927
|
-
case "[object String]":
|
|
2928
|
-
case "[object Array]":
|
|
2929
|
-
return !val.length;
|
|
2930
|
-
case "[object File]":
|
|
2931
|
-
case "[object Map]":
|
|
2932
|
-
case "[object Set]": {
|
|
2933
|
-
return !val.size;
|
|
2934
|
-
}
|
|
2935
|
-
case "[object Object]": {
|
|
2936
|
-
return !Object.keys(val).length;
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
return false;
|
|
2940
|
-
};
|
|
2941
|
-
function rafThrottle(fn) {
|
|
2942
|
-
var locked = false;
|
|
2943
|
-
return function() {
|
|
2944
|
-
var _this = this;
|
|
2945
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
2946
|
-
args[_key] = arguments[_key];
|
|
2947
|
-
}
|
|
2948
|
-
if (locked)
|
|
2949
|
-
return;
|
|
2950
|
-
locked = true;
|
|
2951
|
-
window.requestAnimationFrame(function(_) {
|
|
2952
|
-
fn.apply(_this, args);
|
|
2953
|
-
locked = false;
|
|
2954
|
-
});
|
|
2955
|
-
};
|
|
2956
|
-
}
|
|
2957
|
-
function objToArray(obj) {
|
|
2958
|
-
if (Array.isArray(obj)) {
|
|
2959
|
-
return obj;
|
|
2960
|
-
}
|
|
2961
|
-
return isEmpty(obj) ? [] : [obj];
|
|
2962
|
-
}
|
|
2963
|
-
format$1.__esModule = true;
|
|
2964
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
2965
|
-
return typeof obj;
|
|
2966
|
-
} : function(obj) {
|
|
2967
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2968
|
-
};
|
|
2969
|
-
format$1.default = function(Vue2) {
|
|
2970
|
-
function template(string) {
|
|
2971
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2972
|
-
args[_key - 1] = arguments[_key];
|
|
2973
|
-
}
|
|
2974
|
-
if (args.length === 1 && _typeof(args[0]) === "object") {
|
|
2117
|
+
const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
2118
|
+
function Format(Vue2) {
|
|
2119
|
+
function template(string, ...args) {
|
|
2120
|
+
if (args.length === 1 && typeof args[0] === "object") {
|
|
2975
2121
|
args = args[0];
|
|
2976
2122
|
}
|
|
2977
2123
|
if (!args || !args.hasOwnProperty) {
|
|
2978
2124
|
args = {};
|
|
2979
2125
|
}
|
|
2980
|
-
return string.replace(RE_NARGS,
|
|
2981
|
-
|
|
2126
|
+
return string.replace(RE_NARGS, (match, prefix, i, index) => {
|
|
2127
|
+
let result;
|
|
2982
2128
|
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
2983
2129
|
return i;
|
|
2984
2130
|
} else {
|
|
2985
|
-
result =
|
|
2131
|
+
result = hasOwn(args, i) ? args[i] : null;
|
|
2986
2132
|
if (result === null || result === void 0) {
|
|
2987
2133
|
return "";
|
|
2988
2134
|
}
|
|
@@ -2991,47 +2137,30 @@ format$1.default = function(Vue2) {
|
|
|
2991
2137
|
});
|
|
2992
2138
|
}
|
|
2993
2139
|
return template;
|
|
2994
|
-
};
|
|
2995
|
-
var _util = util;
|
|
2996
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
2997
|
-
locale.__esModule = true;
|
|
2998
|
-
locale.i18n = locale.use = locale.t = void 0;
|
|
2999
|
-
var _zhCN = zhCN;
|
|
3000
|
-
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
3001
|
-
var _vue = Vue;
|
|
3002
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
3003
|
-
var _deepmerge = cjs;
|
|
3004
|
-
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
3005
|
-
var _format = format$1;
|
|
3006
|
-
var _format2 = _interopRequireDefault(_format);
|
|
3007
|
-
function _interopRequireDefault(obj) {
|
|
3008
|
-
return obj && obj.__esModule ? obj : {
|
|
3009
|
-
default: obj
|
|
3010
|
-
};
|
|
3011
2140
|
}
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
if (typeof vuei18n === "function" && !!
|
|
2141
|
+
const format = Format();
|
|
2142
|
+
let lang = defaultLang;
|
|
2143
|
+
let merged = false;
|
|
2144
|
+
let i18nHandler = function() {
|
|
2145
|
+
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
2146
|
+
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
3018
2147
|
if (!merged) {
|
|
3019
2148
|
merged = true;
|
|
3020
|
-
|
|
2149
|
+
Vue.locale(Vue.config.lang, deepmerge_1(lang, Vue.locale(Vue.config.lang) || {}, {
|
|
3021
2150
|
clone: true
|
|
3022
2151
|
}));
|
|
3023
2152
|
}
|
|
3024
2153
|
return vuei18n.apply(this, arguments);
|
|
3025
2154
|
}
|
|
3026
2155
|
};
|
|
3027
|
-
|
|
3028
|
-
|
|
2156
|
+
const t = function(path, options) {
|
|
2157
|
+
let value = i18nHandler.apply(this, arguments);
|
|
3029
2158
|
if (value !== null && value !== void 0)
|
|
3030
2159
|
return value;
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
for (
|
|
3034
|
-
|
|
2160
|
+
const array = path.split(".");
|
|
2161
|
+
let current = lang;
|
|
2162
|
+
for (let i = 0, j = array.length; i < j; i++) {
|
|
2163
|
+
const property = array[i];
|
|
3035
2164
|
value = current[property];
|
|
3036
2165
|
if (i === j - 1)
|
|
3037
2166
|
return format(value, options);
|
|
@@ -3041,32 +2170,10 @@ var t = locale.t = function t2(path, options) {
|
|
|
3041
2170
|
}
|
|
3042
2171
|
return "";
|
|
3043
2172
|
};
|
|
3044
|
-
var use = locale.use = function use2(l) {
|
|
3045
|
-
lang = l || lang;
|
|
3046
|
-
};
|
|
3047
|
-
var i18n = locale.i18n = function i18n2(fn) {
|
|
3048
|
-
i18nHandler = fn || i18nHandler;
|
|
3049
|
-
};
|
|
3050
|
-
locale.default = {
|
|
3051
|
-
use,
|
|
3052
|
-
t,
|
|
3053
|
-
i18n
|
|
3054
|
-
};
|
|
3055
|
-
var _locale = locale;
|
|
3056
|
-
var _default = {
|
|
3057
|
-
methods: {
|
|
3058
|
-
t: function t3() {
|
|
3059
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3060
|
-
args[_key] = arguments[_key];
|
|
3061
|
-
}
|
|
3062
|
-
return _locale.t.apply(this, args);
|
|
3063
|
-
}
|
|
3064
|
-
}
|
|
3065
|
-
};
|
|
3066
2173
|
const Locale = {
|
|
3067
2174
|
methods: {
|
|
3068
2175
|
t(...args) {
|
|
3069
|
-
return t
|
|
2176
|
+
return t.apply(this, args);
|
|
3070
2177
|
}
|
|
3071
2178
|
}
|
|
3072
2179
|
};
|
|
@@ -3081,7 +2188,7 @@ const getDateTimestamp$1 = function(time) {
|
|
|
3081
2188
|
}
|
|
3082
2189
|
};
|
|
3083
2190
|
const removeFromArray = function(arr, pred) {
|
|
3084
|
-
const idx = typeof pred === "function" ? arrayFindIndex
|
|
2191
|
+
const idx = typeof pred === "function" ? arrayFindIndex(arr, pred) : arr.indexOf(pred);
|
|
3085
2192
|
return idx >= 0 ? [...arr.slice(0, idx), ...arr.slice(idx + 1)] : arr;
|
|
3086
2193
|
};
|
|
3087
2194
|
const _sfc_main$3 = {
|
|
@@ -3138,10 +2245,10 @@ const _sfc_main$3 = {
|
|
|
3138
2245
|
return getStartDateOfMonth(this.year, this.month);
|
|
3139
2246
|
},
|
|
3140
2247
|
rows() {
|
|
3141
|
-
const
|
|
3142
|
-
let day = getFirstDayOfMonth(
|
|
3143
|
-
const dateCountOfMonth = getDayCountOfMonth(
|
|
3144
|
-
const dateCountOfLastMonth = getDayCountOfMonth(
|
|
2248
|
+
const date = new Date(this.year, this.month, 1);
|
|
2249
|
+
let day = getFirstDayOfMonth(date);
|
|
2250
|
+
const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
|
|
2251
|
+
const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
|
|
3145
2252
|
day = day === 0 ? 7 : day;
|
|
3146
2253
|
const offset = this.offsetDay;
|
|
3147
2254
|
const rows = this.tableRows;
|
|
@@ -3201,7 +2308,7 @@ const _sfc_main$3 = {
|
|
|
3201
2308
|
}
|
|
3202
2309
|
let cellDate = new Date(time);
|
|
3203
2310
|
cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
|
|
3204
|
-
cell.selected = arrayFind(selectedDate, (
|
|
2311
|
+
cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
|
|
3205
2312
|
cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
|
|
3206
2313
|
this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
|
|
3207
2314
|
}
|
|
@@ -3241,8 +2348,8 @@ const _sfc_main$3 = {
|
|
|
3241
2348
|
};
|
|
3242
2349
|
},
|
|
3243
2350
|
methods: {
|
|
3244
|
-
cellMatchesDate(cell,
|
|
3245
|
-
const value = new Date(
|
|
2351
|
+
cellMatchesDate(cell, date) {
|
|
2352
|
+
const value = new Date(date);
|
|
3246
2353
|
return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
|
|
3247
2354
|
},
|
|
3248
2355
|
getCellClasses(cell) {
|
|
@@ -3257,7 +2364,7 @@ const _sfc_main$3 = {
|
|
|
3257
2364
|
} else {
|
|
3258
2365
|
classes.push(cell.type);
|
|
3259
2366
|
}
|
|
3260
|
-
if (cell.type === "normal" && defaultValue.some((
|
|
2367
|
+
if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
|
|
3261
2368
|
classes.push("default");
|
|
3262
2369
|
}
|
|
3263
2370
|
if (selectionMode === "day" && (cell.type === "normal" || cell.type === "today") && this.cellMatchesDate(cell, this.value)) {
|
|
@@ -3408,7 +2515,7 @@ const _sfc_main$3 = {
|
|
|
3408
2515
|
});
|
|
3409
2516
|
} else if (this.selectionMode === "dates") {
|
|
3410
2517
|
const value = this.value || [];
|
|
3411
|
-
const newValue = cell.selected ? removeFromArray(value, (
|
|
2518
|
+
const newValue = cell.selected ? removeFromArray(value, (date) => date.getTime() === newDate.getTime()) : [...value, newDate];
|
|
3412
2519
|
this.$emit("pick", newValue);
|
|
3413
2520
|
}
|
|
3414
2521
|
}
|
|
@@ -3470,10 +2577,10 @@ const _sfc_main$2 = {
|
|
|
3470
2577
|
return getDateTimestamp(this.maxDate);
|
|
3471
2578
|
},
|
|
3472
2579
|
rows() {
|
|
3473
|
-
const
|
|
3474
|
-
let day = getFirstDayOfMonth(
|
|
3475
|
-
const dateCountOfMonth = getDayCountOfMonth(
|
|
3476
|
-
const dateCountOfLastMonth = getDayCountOfMonth(
|
|
2580
|
+
const date = new Date(this.year, this.month, 1);
|
|
2581
|
+
let day = getFirstDayOfMonth(date);
|
|
2582
|
+
const dateCountOfMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth());
|
|
2583
|
+
const dateCountOfLastMonth = getDayCountOfMonth(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
|
|
3477
2584
|
day = day === 0 ? 7 : day;
|
|
3478
2585
|
const offset = this.offsetDay;
|
|
3479
2586
|
const rows = this.tableRows;
|
|
@@ -3533,7 +2640,7 @@ const _sfc_main$2 = {
|
|
|
3533
2640
|
}
|
|
3534
2641
|
const cellDate = new Date(time);
|
|
3535
2642
|
cell.disabled = typeof disabledDate === "function" && disabledDate(cellDate);
|
|
3536
|
-
cell.selected = arrayFind(selectedDate, (
|
|
2643
|
+
cell.selected = arrayFind(selectedDate, (date2) => date2.getTime() === cellDate.getTime());
|
|
3537
2644
|
cell.customClass = typeof cellClassName === "function" && cellClassName(cellDate);
|
|
3538
2645
|
this.$set(row, this.showWeekNumber ? j + 1 : j, cell);
|
|
3539
2646
|
}
|
|
@@ -3553,7 +2660,7 @@ const _sfc_main$2 = {
|
|
|
3553
2660
|
} else {
|
|
3554
2661
|
classes.push(cell.type);
|
|
3555
2662
|
}
|
|
3556
|
-
if (cell.type === "normal" && defaultValue.some((
|
|
2663
|
+
if (cell.type === "normal" && defaultValue.some((date) => this.cellMatchesDate(cell, date))) {
|
|
3557
2664
|
classes.push("default");
|
|
3558
2665
|
}
|
|
3559
2666
|
if (cell.inRange && (cell.type === "normal" || cell.type === "today")) {
|
|
@@ -3735,7 +2842,7 @@ const _sfc_main$1 = {
|
|
|
3735
2842
|
components: {
|
|
3736
2843
|
WeekTable
|
|
3737
2844
|
},
|
|
3738
|
-
mixins: [
|
|
2845
|
+
mixins: [Locale$1],
|
|
3739
2846
|
data() {
|
|
3740
2847
|
return {
|
|
3741
2848
|
popperClass: "",
|