@94ai/nf-double-year 5.0.29 → 5.0.36
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-year.cjs.js +73 -1171
- package/lib/nf-double-year.esm-bundler.js +63 -1161
- package/package.json +3 -3
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
+
import { isDateObject, getWeekNumber, formatDate, parseDate, isDate, getDayCountOfYear, range, nextDate, toDate, modifyWithTimeString } from "element-ui/src/utils/date-util";
|
|
2
3
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
4
|
+
import Locale 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,639 +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 coerceTruthyValueToArray = function(val) {
|
|
639
|
-
if (Array.isArray(val)) {
|
|
640
|
-
return val;
|
|
641
|
-
} else if (val) {
|
|
642
|
-
return [val];
|
|
643
|
-
} else {
|
|
644
|
-
return [];
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
648
|
-
function Format(Vue2) {
|
|
649
|
-
function template(string, ...args) {
|
|
650
|
-
if (args.length === 1 && typeof args[0] === "object") {
|
|
651
|
-
args = args[0];
|
|
652
|
-
}
|
|
653
|
-
if (!args || !args.hasOwnProperty) {
|
|
654
|
-
args = {};
|
|
655
|
-
}
|
|
656
|
-
return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
|
|
657
|
-
let result;
|
|
658
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
659
|
-
return i;
|
|
660
|
-
} else {
|
|
661
|
-
result = hasOwn$1(args, i) ? args[i] : null;
|
|
662
|
-
if (result === null || result === void 0) {
|
|
663
|
-
return "";
|
|
664
|
-
}
|
|
665
|
-
return result;
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
return template;
|
|
670
|
-
}
|
|
671
|
-
const format$2 = Format();
|
|
672
|
-
let lang$1 = defaultLang;
|
|
673
|
-
let merged$1 = false;
|
|
674
|
-
let i18nHandler$1 = function() {
|
|
675
|
-
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
676
|
-
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
677
|
-
if (!merged$1) {
|
|
678
|
-
merged$1 = true;
|
|
679
|
-
Vue.locale(Vue.config.lang, deepmerge$1(lang$1, Vue.locale(Vue.config.lang) || {}, {
|
|
680
|
-
clone: true
|
|
681
|
-
}));
|
|
682
|
-
}
|
|
683
|
-
return vuei18n.apply(this, arguments);
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
const t$1 = function(path, options) {
|
|
687
|
-
let value = i18nHandler$1.apply(this, arguments);
|
|
688
|
-
if (value !== null && value !== void 0)
|
|
689
|
-
return value;
|
|
690
|
-
const array = path.split(".");
|
|
691
|
-
let current = lang$1;
|
|
692
|
-
for (let i = 0, j = array.length; i < j; i++) {
|
|
693
|
-
const property = array[i];
|
|
694
|
-
value = current[property];
|
|
695
|
-
if (i === j - 1)
|
|
696
|
-
return format$2(value, options);
|
|
697
|
-
if (!value)
|
|
698
|
-
return "";
|
|
699
|
-
current = value;
|
|
700
|
-
}
|
|
701
|
-
return "";
|
|
702
|
-
};
|
|
703
|
-
const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
704
|
-
const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
705
|
-
const getI18nSettings = () => {
|
|
706
|
-
return {
|
|
707
|
-
dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
708
|
-
dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
709
|
-
monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
|
|
710
|
-
monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
|
|
711
|
-
amPm: ["am", "pm"]
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
const toDate = function(date2) {
|
|
715
|
-
return isDate(date2) ? new Date(date2) : null;
|
|
716
|
-
};
|
|
717
|
-
const isDate = function(date2) {
|
|
718
|
-
if (date2 === null || date2 === void 0)
|
|
719
|
-
return false;
|
|
720
|
-
if (isNaN(new Date(date2).getTime()))
|
|
721
|
-
return false;
|
|
722
|
-
if (Array.isArray(date2))
|
|
723
|
-
return false;
|
|
724
|
-
return true;
|
|
725
|
-
};
|
|
726
|
-
const isDateObject = function(val) {
|
|
727
|
-
return val instanceof Date;
|
|
728
|
-
};
|
|
729
|
-
const formatDate = function(date2, format2) {
|
|
730
|
-
date2 = toDate(date2);
|
|
731
|
-
if (!date2)
|
|
732
|
-
return "";
|
|
733
|
-
return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
734
|
-
};
|
|
735
|
-
const parseDate = function(string, format2) {
|
|
736
|
-
return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
737
|
-
};
|
|
738
|
-
const getDayCountOfYear = function(year) {
|
|
739
|
-
const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
|
|
740
|
-
return isLeapYear ? 366 : 365;
|
|
741
|
-
};
|
|
742
|
-
const nextDate = function(date2, amount = 1) {
|
|
743
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
|
|
744
|
-
};
|
|
745
|
-
const getWeekNumber = function(src) {
|
|
746
|
-
if (!isDate(src))
|
|
747
|
-
return null;
|
|
748
|
-
const date2 = new Date(src.getTime());
|
|
749
|
-
date2.setHours(0, 0, 0, 0);
|
|
750
|
-
date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
|
|
751
|
-
const week1 = new Date(date2.getFullYear(), 0, 4);
|
|
752
|
-
return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
|
|
753
|
-
};
|
|
754
|
-
const range = function(n) {
|
|
755
|
-
return Array.apply(null, {
|
|
756
|
-
length: n
|
|
757
|
-
}).map((_, n2) => n2);
|
|
758
|
-
};
|
|
759
|
-
const modifyTime = function(date2, h, m, s) {
|
|
760
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
|
|
761
|
-
};
|
|
762
|
-
const modifyWithTimeString = (date2, time) => {
|
|
763
|
-
if (date2 == null || !time) {
|
|
764
|
-
return date2;
|
|
765
|
-
}
|
|
766
|
-
time = parseDate(time, "HH:mm:ss");
|
|
767
|
-
return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
768
|
-
};
|
|
769
138
|
function merge(target) {
|
|
770
139
|
for (let i = 1, j = arguments.length; i < j; i++) {
|
|
771
140
|
let source = arguments[i] || {};
|
|
@@ -947,6 +316,10 @@ if (!Vue.prototype.$isServer) {
|
|
|
947
316
|
}
|
|
948
317
|
});
|
|
949
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
|
+
}
|
|
950
323
|
var popper$1 = { exports: {} };
|
|
951
324
|
/**
|
|
952
325
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -1235,7 +608,7 @@ var popper$1 = { exports: {} };
|
|
|
1235
608
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
1236
609
|
}
|
|
1237
610
|
modifiersToRun.forEach((function(modifier) {
|
|
1238
|
-
if (
|
|
611
|
+
if (isFunction(modifier)) {
|
|
1239
612
|
data = modifier.call(this, data);
|
|
1240
613
|
}
|
|
1241
614
|
}).bind(this));
|
|
@@ -1547,7 +920,7 @@ var popper$1 = { exports: {} };
|
|
|
1547
920
|
element.style[prop] = styles[prop] + unit;
|
|
1548
921
|
});
|
|
1549
922
|
}
|
|
1550
|
-
function
|
|
923
|
+
function isFunction(functionToCheck) {
|
|
1551
924
|
var getType = {};
|
|
1552
925
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
1553
926
|
}
|
|
@@ -1564,8 +937,8 @@ var popper$1 = { exports: {} };
|
|
|
1564
937
|
}
|
|
1565
938
|
function getBoundingClientRect(element) {
|
|
1566
939
|
var rect = element.getBoundingClientRect();
|
|
1567
|
-
var
|
|
1568
|
-
var rectTop =
|
|
940
|
+
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
|
941
|
+
var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
1569
942
|
return {
|
|
1570
943
|
left: rect.left,
|
|
1571
944
|
top: rectTop,
|
|
@@ -1870,34 +1243,34 @@ const DEFAULT_FORMATS = {
|
|
|
1870
1243
|
yearrange: "yyyy"
|
|
1871
1244
|
};
|
|
1872
1245
|
const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "yearrange", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
|
|
1873
|
-
const DATE_FORMATTER = function(value,
|
|
1874
|
-
if (
|
|
1246
|
+
const DATE_FORMATTER = function(value, format) {
|
|
1247
|
+
if (format === "timestamp")
|
|
1875
1248
|
return value.getTime();
|
|
1876
|
-
return formatDate(value,
|
|
1249
|
+
return formatDate(value, format);
|
|
1877
1250
|
};
|
|
1878
|
-
const DATE_PARSER = function(text,
|
|
1879
|
-
if (
|
|
1251
|
+
const DATE_PARSER = function(text, format) {
|
|
1252
|
+
if (format === "timestamp")
|
|
1880
1253
|
return new Date(Number(text));
|
|
1881
|
-
return parseDate(text,
|
|
1254
|
+
return parseDate(text, format);
|
|
1882
1255
|
};
|
|
1883
|
-
const RANGE_FORMATTER = function(value,
|
|
1256
|
+
const RANGE_FORMATTER = function(value, format) {
|
|
1884
1257
|
if (Array.isArray(value) && value.length === 2) {
|
|
1885
1258
|
const start = value[0];
|
|
1886
1259
|
const end = value[1];
|
|
1887
1260
|
if (start && end) {
|
|
1888
|
-
return [DATE_FORMATTER(start,
|
|
1261
|
+
return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
|
|
1889
1262
|
}
|
|
1890
1263
|
}
|
|
1891
1264
|
return "";
|
|
1892
1265
|
};
|
|
1893
|
-
const RANGE_PARSER = function(array,
|
|
1266
|
+
const RANGE_PARSER = function(array, format, separator) {
|
|
1894
1267
|
if (!Array.isArray(array)) {
|
|
1895
1268
|
array = array.split(separator);
|
|
1896
1269
|
}
|
|
1897
1270
|
if (array.length === 2) {
|
|
1898
1271
|
const range1 = array[0];
|
|
1899
1272
|
const range2 = array[1];
|
|
1900
|
-
return [DATE_PARSER(range1,
|
|
1273
|
+
return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
|
|
1901
1274
|
}
|
|
1902
1275
|
return [];
|
|
1903
1276
|
};
|
|
@@ -1915,7 +1288,7 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1915
1288
|
}
|
|
1916
1289
|
},
|
|
1917
1290
|
week: {
|
|
1918
|
-
formatter(value,
|
|
1291
|
+
formatter(value, format) {
|
|
1919
1292
|
let week = getWeekNumber(value);
|
|
1920
1293
|
let month = value.getMonth();
|
|
1921
1294
|
const trueDate = new Date(value);
|
|
@@ -1923,12 +1296,12 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1923
1296
|
trueDate.setHours(0, 0, 0, 0);
|
|
1924
1297
|
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
|
1925
1298
|
}
|
|
1926
|
-
let
|
|
1927
|
-
|
|
1928
|
-
return
|
|
1299
|
+
let date = formatDate(trueDate, format);
|
|
1300
|
+
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
|
|
1301
|
+
return date;
|
|
1929
1302
|
},
|
|
1930
|
-
parser(text,
|
|
1931
|
-
return TYPE_VALUE_RESOLVER_MAP.date.parser(text,
|
|
1303
|
+
parser(text, format) {
|
|
1304
|
+
return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
|
|
1932
1305
|
}
|
|
1933
1306
|
},
|
|
1934
1307
|
date: {
|
|
@@ -1987,11 +1360,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1987
1360
|
}
|
|
1988
1361
|
},
|
|
1989
1362
|
dates: {
|
|
1990
|
-
formatter(value,
|
|
1991
|
-
return value.map((
|
|
1363
|
+
formatter(value, format) {
|
|
1364
|
+
return value.map((date) => DATE_FORMATTER(date, format));
|
|
1992
1365
|
},
|
|
1993
|
-
parser(value,
|
|
1994
|
-
return (typeof value === "string" ? value.split(", ") : value).map((
|
|
1366
|
+
parser(value, format) {
|
|
1367
|
+
return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
|
|
1995
1368
|
}
|
|
1996
1369
|
}
|
|
1997
1370
|
};
|
|
@@ -2004,15 +1377,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
|
|
|
2004
1377
|
if (!value)
|
|
2005
1378
|
return null;
|
|
2006
1379
|
const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
|
|
2007
|
-
const
|
|
2008
|
-
return parser(value,
|
|
1380
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1381
|
+
return parser(value, format, rangeSeparator);
|
|
2009
1382
|
};
|
|
2010
1383
|
const formatAsFormatAndType = (value, customFormat, type) => {
|
|
2011
1384
|
if (!value)
|
|
2012
1385
|
return null;
|
|
2013
1386
|
const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
|
|
2014
|
-
const
|
|
2015
|
-
return formatter(value,
|
|
1387
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1388
|
+
return formatter(value, format);
|
|
2016
1389
|
};
|
|
2017
1390
|
const valueEquals = function(a, b) {
|
|
2018
1391
|
const dateEquals = function(a2, b2) {
|
|
@@ -2039,11 +1412,11 @@ const valueEquals = function(a, b) {
|
|
|
2039
1412
|
}
|
|
2040
1413
|
return false;
|
|
2041
1414
|
};
|
|
2042
|
-
const isString
|
|
1415
|
+
const isString = function(val) {
|
|
2043
1416
|
return typeof val === "string" || val instanceof String;
|
|
2044
1417
|
};
|
|
2045
1418
|
const validator = function(val) {
|
|
2046
|
-
return val === null || val === void 0 || isString
|
|
1419
|
+
return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
|
|
2047
1420
|
};
|
|
2048
1421
|
const _sfc_main$3 = {
|
|
2049
1422
|
mixins: [Emitter, NewPopper],
|
|
@@ -2299,12 +1672,12 @@ const _sfc_main$3 = {
|
|
|
2299
1672
|
return value;
|
|
2300
1673
|
}
|
|
2301
1674
|
},
|
|
2302
|
-
formatToValue(
|
|
2303
|
-
const isFormattable = isDateObject(
|
|
1675
|
+
formatToValue(date) {
|
|
1676
|
+
const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
|
|
2304
1677
|
if (this.valueFormat && isFormattable) {
|
|
2305
|
-
return formatAsFormatAndType(
|
|
1678
|
+
return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
|
|
2306
1679
|
} else {
|
|
2307
|
-
return
|
|
1680
|
+
return date;
|
|
2308
1681
|
}
|
|
2309
1682
|
},
|
|
2310
1683
|
// {parse, formatTo} String deals with user input
|
|
@@ -2493,17 +1866,17 @@ const _sfc_main$3 = {
|
|
|
2493
1866
|
this.picker.selectionMode = this.selectionMode;
|
|
2494
1867
|
this.picker.unlinkPanels = this.unlinkPanels;
|
|
2495
1868
|
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
|
|
2496
|
-
this.$watch("format", (
|
|
2497
|
-
this.picker.format =
|
|
1869
|
+
this.$watch("format", (format) => {
|
|
1870
|
+
this.picker.format = format;
|
|
2498
1871
|
});
|
|
2499
1872
|
const updateOptions = () => {
|
|
2500
1873
|
const options = this.pickerOptions;
|
|
2501
1874
|
if (options && options.selectableRange) {
|
|
2502
1875
|
let ranges = options.selectableRange;
|
|
2503
1876
|
const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
|
|
2504
|
-
const
|
|
1877
|
+
const format = DEFAULT_FORMATS.timerange;
|
|
2505
1878
|
ranges = Array.isArray(ranges) ? ranges : [ranges];
|
|
2506
|
-
this.picker.selectableRange = ranges.map((range2) => parser(range2,
|
|
1879
|
+
this.picker.selectableRange = ranges.map((range2) => parser(range2, format, this.rangeSeparator));
|
|
2507
1880
|
}
|
|
2508
1881
|
for (const option in options) {
|
|
2509
1882
|
if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
|
|
@@ -2522,10 +1895,10 @@ const _sfc_main$3 = {
|
|
|
2522
1895
|
this.$el.appendChild(this.picker.$el);
|
|
2523
1896
|
this.picker.resetView && this.picker.resetView();
|
|
2524
1897
|
this.picker.$on("dodestroy", this.doDestroy);
|
|
2525
|
-
this.picker.$on("pick", (
|
|
1898
|
+
this.picker.$on("pick", (date = "", visible = false) => {
|
|
2526
1899
|
this.userInput = null;
|
|
2527
1900
|
this.pickerVisible = this.picker.visible = visible;
|
|
2528
|
-
this.emitInput(
|
|
1901
|
+
this.emitInput(date);
|
|
2529
1902
|
this.picker.resetView && this.picker.resetView();
|
|
2530
1903
|
});
|
|
2531
1904
|
this.picker.$on("select-range", (start, end, pos) => {
|
|
@@ -2705,274 +2078,15 @@ var _sfc_render$3 = function render() {
|
|
|
2705
2078
|
var _sfc_staticRenderFns$3 = [];
|
|
2706
2079
|
var __component__$3 = /* @__PURE__ */ normalizeComponent(_sfc_main$3, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
|
|
2707
2080
|
const Picker = __component__$3.exports;
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
zhCN.__esModule = true;
|
|
2711
|
-
zhCN.default = {
|
|
2712
|
-
el: {
|
|
2713
|
-
colorpicker: {
|
|
2714
|
-
confirm: "确定",
|
|
2715
|
-
clear: "清空"
|
|
2716
|
-
},
|
|
2717
|
-
datepicker: {
|
|
2718
|
-
now: "此刻",
|
|
2719
|
-
today: "今天",
|
|
2720
|
-
cancel: "取消",
|
|
2721
|
-
clear: "清空",
|
|
2722
|
-
confirm: "确定",
|
|
2723
|
-
selectDate: "选择日期",
|
|
2724
|
-
selectTime: "选择时间",
|
|
2725
|
-
startDate: "开始日期",
|
|
2726
|
-
startTime: "开始时间",
|
|
2727
|
-
endDate: "结束日期",
|
|
2728
|
-
endTime: "结束时间",
|
|
2729
|
-
prevYear: "前一年",
|
|
2730
|
-
nextYear: "后一年",
|
|
2731
|
-
prevMonth: "上个月",
|
|
2732
|
-
nextMonth: "下个月",
|
|
2733
|
-
year: "年",
|
|
2734
|
-
month1: "1 月",
|
|
2735
|
-
month2: "2 月",
|
|
2736
|
-
month3: "3 月",
|
|
2737
|
-
month4: "4 月",
|
|
2738
|
-
month5: "5 月",
|
|
2739
|
-
month6: "6 月",
|
|
2740
|
-
month7: "7 月",
|
|
2741
|
-
month8: "8 月",
|
|
2742
|
-
month9: "9 月",
|
|
2743
|
-
month10: "10 月",
|
|
2744
|
-
month11: "11 月",
|
|
2745
|
-
month12: "12 月",
|
|
2746
|
-
// week: '周次',
|
|
2747
|
-
weeks: {
|
|
2748
|
-
sun: "日",
|
|
2749
|
-
mon: "一",
|
|
2750
|
-
tue: "二",
|
|
2751
|
-
wed: "三",
|
|
2752
|
-
thu: "四",
|
|
2753
|
-
fri: "五",
|
|
2754
|
-
sat: "六"
|
|
2755
|
-
},
|
|
2756
|
-
months: {
|
|
2757
|
-
jan: "一月",
|
|
2758
|
-
feb: "二月",
|
|
2759
|
-
mar: "三月",
|
|
2760
|
-
apr: "四月",
|
|
2761
|
-
may: "五月",
|
|
2762
|
-
jun: "六月",
|
|
2763
|
-
jul: "七月",
|
|
2764
|
-
aug: "八月",
|
|
2765
|
-
sep: "九月",
|
|
2766
|
-
oct: "十月",
|
|
2767
|
-
nov: "十一月",
|
|
2768
|
-
dec: "十二月"
|
|
2769
|
-
}
|
|
2770
|
-
},
|
|
2771
|
-
select: {
|
|
2772
|
-
loading: "加载中",
|
|
2773
|
-
noMatch: "无匹配数据",
|
|
2774
|
-
noData: "无数据",
|
|
2775
|
-
placeholder: "请选择"
|
|
2776
|
-
},
|
|
2777
|
-
cascader: {
|
|
2778
|
-
noMatch: "无匹配数据",
|
|
2779
|
-
loading: "加载中",
|
|
2780
|
-
placeholder: "请选择",
|
|
2781
|
-
noData: "暂无数据"
|
|
2782
|
-
},
|
|
2783
|
-
pagination: {
|
|
2784
|
-
goto: "前往",
|
|
2785
|
-
pagesize: "条/页",
|
|
2786
|
-
total: "共 {total} 条",
|
|
2787
|
-
pageClassifier: "页"
|
|
2788
|
-
},
|
|
2789
|
-
messagebox: {
|
|
2790
|
-
title: "提示",
|
|
2791
|
-
confirm: "确定",
|
|
2792
|
-
cancel: "取消",
|
|
2793
|
-
error: "输入的数据不合法!"
|
|
2794
|
-
},
|
|
2795
|
-
upload: {
|
|
2796
|
-
deleteTip: "按 delete 键可删除",
|
|
2797
|
-
delete: "删除",
|
|
2798
|
-
preview: "查看图片",
|
|
2799
|
-
continue: "继续上传"
|
|
2800
|
-
},
|
|
2801
|
-
table: {
|
|
2802
|
-
emptyText: "暂无数据",
|
|
2803
|
-
confirmFilter: "筛选",
|
|
2804
|
-
resetFilter: "重置",
|
|
2805
|
-
clearFilter: "全部",
|
|
2806
|
-
sumText: "合计"
|
|
2807
|
-
},
|
|
2808
|
-
tree: {
|
|
2809
|
-
emptyText: "暂无数据"
|
|
2810
|
-
},
|
|
2811
|
-
transfer: {
|
|
2812
|
-
noMatch: "无匹配数据",
|
|
2813
|
-
noData: "无数据",
|
|
2814
|
-
titles: ["列表 1", "列表 2"],
|
|
2815
|
-
filterPlaceholder: "请输入搜索内容",
|
|
2816
|
-
noCheckedFormat: "共 {total} 项",
|
|
2817
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
2818
|
-
},
|
|
2819
|
-
image: {
|
|
2820
|
-
error: "加载失败"
|
|
2821
|
-
},
|
|
2822
|
-
pageHeader: {
|
|
2823
|
-
title: "返回"
|
|
2824
|
-
},
|
|
2825
|
-
popconfirm: {
|
|
2826
|
-
confirmButtonText: "确定",
|
|
2827
|
-
cancelButtonText: "取消"
|
|
2828
|
-
}
|
|
2829
|
-
}
|
|
2830
|
-
};
|
|
2831
|
-
var format$1 = {};
|
|
2832
|
-
var util = {};
|
|
2833
|
-
var types = {};
|
|
2834
|
-
types.__esModule = true;
|
|
2835
|
-
types.isString = isString;
|
|
2836
|
-
types.isObject = isObject;
|
|
2837
|
-
types.isHtmlElement = isHtmlElement;
|
|
2838
|
-
function isString(obj) {
|
|
2839
|
-
return Object.prototype.toString.call(obj) === "[object String]";
|
|
2840
|
-
}
|
|
2841
|
-
function isObject(obj) {
|
|
2842
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2843
|
-
}
|
|
2844
|
-
function isHtmlElement(node) {
|
|
2845
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
2846
|
-
}
|
|
2847
|
-
types.isFunction = function isFunction(functionToCheck) {
|
|
2848
|
-
var getType = {};
|
|
2849
|
-
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
2850
|
-
};
|
|
2851
|
-
types.isUndefined = function isUndefined(val) {
|
|
2852
|
-
return val === void 0;
|
|
2853
|
-
};
|
|
2854
|
-
types.isDefined = function isDefined(val) {
|
|
2855
|
-
return val !== void 0 && val !== null;
|
|
2856
|
-
};
|
|
2857
|
-
util.__esModule = true;
|
|
2858
|
-
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;
|
|
2859
|
-
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
2860
|
-
return typeof obj;
|
|
2861
|
-
} : function(obj) {
|
|
2862
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2863
|
-
};
|
|
2864
|
-
util.noop = noop;
|
|
2865
|
-
util.hasOwn = hasOwn;
|
|
2866
|
-
util.toObject = toObject;
|
|
2867
|
-
util.getPropByPath = getPropByPath;
|
|
2868
|
-
util.rafThrottle = rafThrottle;
|
|
2869
|
-
util.objToArray = objToArray;
|
|
2870
|
-
var _vue$1 = Vue;
|
|
2871
|
-
var _vue2$1 = _interopRequireDefault$1(_vue$1);
|
|
2872
|
-
var _types = types;
|
|
2873
|
-
function _interopRequireDefault$1(obj) {
|
|
2874
|
-
return obj && obj.__esModule ? obj : {
|
|
2875
|
-
default: obj
|
|
2876
|
-
};
|
|
2877
|
-
}
|
|
2878
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2879
|
-
function noop() {
|
|
2880
|
-
}
|
|
2881
|
-
function hasOwn(obj, key) {
|
|
2882
|
-
return hasOwnProperty.call(obj, key);
|
|
2883
|
-
}
|
|
2884
|
-
function extend(to, _from) {
|
|
2885
|
-
for (var key in _from) {
|
|
2886
|
-
to[key] = _from[key];
|
|
2887
|
-
}
|
|
2888
|
-
return to;
|
|
2889
|
-
}
|
|
2890
|
-
function toObject(arr) {
|
|
2891
|
-
var res = {};
|
|
2892
|
-
for (var i = 0; i < arr.length; i++) {
|
|
2893
|
-
if (arr[i]) {
|
|
2894
|
-
extend(res, arr[i]);
|
|
2895
|
-
}
|
|
2896
|
-
}
|
|
2897
|
-
return res;
|
|
2898
|
-
}
|
|
2899
|
-
util.getValueByPath = function getValueByPath(object, prop) {
|
|
2900
|
-
prop = prop || "";
|
|
2901
|
-
var paths = prop.split(".");
|
|
2902
|
-
var current = object;
|
|
2903
|
-
var result = null;
|
|
2904
|
-
for (var i = 0, j = paths.length; i < j; i++) {
|
|
2905
|
-
var path = paths[i];
|
|
2906
|
-
if (!current)
|
|
2907
|
-
break;
|
|
2908
|
-
if (i === j - 1) {
|
|
2909
|
-
result = current[path];
|
|
2910
|
-
break;
|
|
2911
|
-
}
|
|
2912
|
-
current = current[path];
|
|
2913
|
-
}
|
|
2914
|
-
return result;
|
|
2915
|
-
};
|
|
2916
|
-
function getPropByPath(obj, path, strict) {
|
|
2917
|
-
var tempObj = obj;
|
|
2918
|
-
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
2919
|
-
path = path.replace(/^\./, "");
|
|
2920
|
-
var keyArr = path.split(".");
|
|
2921
|
-
var i = 0;
|
|
2922
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
2923
|
-
if (!tempObj && !strict)
|
|
2924
|
-
break;
|
|
2925
|
-
var key = keyArr[i];
|
|
2926
|
-
if (key in tempObj) {
|
|
2927
|
-
tempObj = tempObj[key];
|
|
2928
|
-
} else {
|
|
2929
|
-
if (strict) {
|
|
2930
|
-
throw new Error("please transfer a valid prop path to form item!");
|
|
2931
|
-
}
|
|
2932
|
-
break;
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
return {
|
|
2936
|
-
o: tempObj,
|
|
2937
|
-
k: keyArr[i],
|
|
2938
|
-
v: tempObj ? tempObj[keyArr[i]] : null
|
|
2939
|
-
};
|
|
2940
|
-
}
|
|
2941
|
-
util.generateId = function generateId() {
|
|
2942
|
-
return Math.floor(Math.random() * 1e4);
|
|
2943
|
-
};
|
|
2944
|
-
util.valueEquals = function valueEquals2(a, b) {
|
|
2945
|
-
if (a === b)
|
|
2946
|
-
return true;
|
|
2947
|
-
if (!(a instanceof Array))
|
|
2948
|
-
return false;
|
|
2949
|
-
if (!(b instanceof Array))
|
|
2950
|
-
return false;
|
|
2951
|
-
if (a.length !== b.length)
|
|
2952
|
-
return false;
|
|
2953
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
2954
|
-
if (a[i] !== b[i])
|
|
2955
|
-
return false;
|
|
2956
|
-
}
|
|
2957
|
-
return true;
|
|
2958
|
-
};
|
|
2959
|
-
util.escapeRegexpString = function escapeRegexpString() {
|
|
2960
|
-
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
2961
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
2962
|
-
};
|
|
2963
|
-
var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
|
|
2964
|
-
for (var i = 0; i !== arr.length; ++i) {
|
|
2081
|
+
const arrayFindIndex = function(arr, pred) {
|
|
2082
|
+
for (let i = 0; i !== arr.length; ++i) {
|
|
2965
2083
|
if (pred(arr[i])) {
|
|
2966
2084
|
return i;
|
|
2967
2085
|
}
|
|
2968
2086
|
}
|
|
2969
2087
|
return -1;
|
|
2970
2088
|
};
|
|
2971
|
-
|
|
2972
|
-
var idx = arrayFindIndex(arr, pred);
|
|
2973
|
-
return idx !== -1 ? arr[idx] : void 0;
|
|
2974
|
-
};
|
|
2975
|
-
util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
2089
|
+
const coerceTruthyValueToArray = function(val) {
|
|
2976
2090
|
if (Array.isArray(val)) {
|
|
2977
2091
|
return val;
|
|
2978
2092
|
} else if (val) {
|
|
@@ -2981,218 +2095,6 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
|
2981
2095
|
return [];
|
|
2982
2096
|
}
|
|
2983
2097
|
};
|
|
2984
|
-
util.isIE = function isIE() {
|
|
2985
|
-
return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
2986
|
-
};
|
|
2987
|
-
util.isEdge = function isEdge() {
|
|
2988
|
-
return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
2989
|
-
};
|
|
2990
|
-
util.isFirefox = function isFirefox() {
|
|
2991
|
-
return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
2992
|
-
};
|
|
2993
|
-
util.autoprefixer = function autoprefixer(style) {
|
|
2994
|
-
if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
|
|
2995
|
-
return style;
|
|
2996
|
-
var rules = ["transform", "transition", "animation"];
|
|
2997
|
-
var prefixes = ["ms-", "webkit-"];
|
|
2998
|
-
rules.forEach(function(rule) {
|
|
2999
|
-
var value = style[rule];
|
|
3000
|
-
if (rule && value) {
|
|
3001
|
-
prefixes.forEach(function(prefix) {
|
|
3002
|
-
style[prefix + rule] = value;
|
|
3003
|
-
});
|
|
3004
|
-
}
|
|
3005
|
-
});
|
|
3006
|
-
return style;
|
|
3007
|
-
};
|
|
3008
|
-
util.kebabCase = function kebabCase(str) {
|
|
3009
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
3010
|
-
return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
|
|
3011
|
-
};
|
|
3012
|
-
util.capitalize = function capitalize(str) {
|
|
3013
|
-
if (!(0, _types.isString)(str))
|
|
3014
|
-
return str;
|
|
3015
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
3016
|
-
};
|
|
3017
|
-
var looseEqual = util.looseEqual = function looseEqual2(a, b) {
|
|
3018
|
-
var isObjectA = (0, _types.isObject)(a);
|
|
3019
|
-
var isObjectB = (0, _types.isObject)(b);
|
|
3020
|
-
if (isObjectA && isObjectB) {
|
|
3021
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
3022
|
-
} else if (!isObjectA && !isObjectB) {
|
|
3023
|
-
return String(a) === String(b);
|
|
3024
|
-
} else {
|
|
3025
|
-
return false;
|
|
3026
|
-
}
|
|
3027
|
-
};
|
|
3028
|
-
var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
|
|
3029
|
-
arrayA = arrayA || [];
|
|
3030
|
-
arrayB = arrayB || [];
|
|
3031
|
-
if (arrayA.length !== arrayB.length) {
|
|
3032
|
-
return false;
|
|
3033
|
-
}
|
|
3034
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
3035
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
3036
|
-
return false;
|
|
3037
|
-
}
|
|
3038
|
-
}
|
|
3039
|
-
return true;
|
|
3040
|
-
};
|
|
3041
|
-
util.isEqual = function isEqual(value1, value2) {
|
|
3042
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
3043
|
-
return arrayEquals(value1, value2);
|
|
3044
|
-
}
|
|
3045
|
-
return looseEqual(value1, value2);
|
|
3046
|
-
};
|
|
3047
|
-
var isEmpty = util.isEmpty = function isEmpty2(val) {
|
|
3048
|
-
if (val == null)
|
|
3049
|
-
return true;
|
|
3050
|
-
if (typeof val === "boolean")
|
|
3051
|
-
return false;
|
|
3052
|
-
if (typeof val === "number")
|
|
3053
|
-
return !val;
|
|
3054
|
-
if (val instanceof Error)
|
|
3055
|
-
return val.message === "";
|
|
3056
|
-
switch (Object.prototype.toString.call(val)) {
|
|
3057
|
-
case "[object String]":
|
|
3058
|
-
case "[object Array]":
|
|
3059
|
-
return !val.length;
|
|
3060
|
-
case "[object File]":
|
|
3061
|
-
case "[object Map]":
|
|
3062
|
-
case "[object Set]": {
|
|
3063
|
-
return !val.size;
|
|
3064
|
-
}
|
|
3065
|
-
case "[object Object]": {
|
|
3066
|
-
return !Object.keys(val).length;
|
|
3067
|
-
}
|
|
3068
|
-
}
|
|
3069
|
-
return false;
|
|
3070
|
-
};
|
|
3071
|
-
function rafThrottle(fn) {
|
|
3072
|
-
var locked = false;
|
|
3073
|
-
return function() {
|
|
3074
|
-
var _this = this;
|
|
3075
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3076
|
-
args[_key] = arguments[_key];
|
|
3077
|
-
}
|
|
3078
|
-
if (locked)
|
|
3079
|
-
return;
|
|
3080
|
-
locked = true;
|
|
3081
|
-
window.requestAnimationFrame(function(_) {
|
|
3082
|
-
fn.apply(_this, args);
|
|
3083
|
-
locked = false;
|
|
3084
|
-
});
|
|
3085
|
-
};
|
|
3086
|
-
}
|
|
3087
|
-
function objToArray(obj) {
|
|
3088
|
-
if (Array.isArray(obj)) {
|
|
3089
|
-
return obj;
|
|
3090
|
-
}
|
|
3091
|
-
return isEmpty(obj) ? [] : [obj];
|
|
3092
|
-
}
|
|
3093
|
-
format$1.__esModule = true;
|
|
3094
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
3095
|
-
return typeof obj;
|
|
3096
|
-
} : function(obj) {
|
|
3097
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3098
|
-
};
|
|
3099
|
-
format$1.default = function(Vue2) {
|
|
3100
|
-
function template(string) {
|
|
3101
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3102
|
-
args[_key - 1] = arguments[_key];
|
|
3103
|
-
}
|
|
3104
|
-
if (args.length === 1 && _typeof(args[0]) === "object") {
|
|
3105
|
-
args = args[0];
|
|
3106
|
-
}
|
|
3107
|
-
if (!args || !args.hasOwnProperty) {
|
|
3108
|
-
args = {};
|
|
3109
|
-
}
|
|
3110
|
-
return string.replace(RE_NARGS, function(match, prefix, i, index) {
|
|
3111
|
-
var result = void 0;
|
|
3112
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
3113
|
-
return i;
|
|
3114
|
-
} else {
|
|
3115
|
-
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
3116
|
-
if (result === null || result === void 0) {
|
|
3117
|
-
return "";
|
|
3118
|
-
}
|
|
3119
|
-
return result;
|
|
3120
|
-
}
|
|
3121
|
-
});
|
|
3122
|
-
}
|
|
3123
|
-
return template;
|
|
3124
|
-
};
|
|
3125
|
-
var _util = util;
|
|
3126
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
3127
|
-
locale.__esModule = true;
|
|
3128
|
-
locale.i18n = locale.use = locale.t = void 0;
|
|
3129
|
-
var _zhCN = zhCN;
|
|
3130
|
-
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
3131
|
-
var _vue = Vue;
|
|
3132
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
3133
|
-
var _deepmerge = cjs;
|
|
3134
|
-
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
3135
|
-
var _format = format$1;
|
|
3136
|
-
var _format2 = _interopRequireDefault(_format);
|
|
3137
|
-
function _interopRequireDefault(obj) {
|
|
3138
|
-
return obj && obj.__esModule ? obj : {
|
|
3139
|
-
default: obj
|
|
3140
|
-
};
|
|
3141
|
-
}
|
|
3142
|
-
var format = (0, _format2.default)(_vue2.default);
|
|
3143
|
-
var lang = _zhCN2.default;
|
|
3144
|
-
var merged = false;
|
|
3145
|
-
var i18nHandler = function i18nHandler2() {
|
|
3146
|
-
var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
|
|
3147
|
-
if (typeof vuei18n === "function" && !!_vue2.default.locale) {
|
|
3148
|
-
if (!merged) {
|
|
3149
|
-
merged = true;
|
|
3150
|
-
_vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
|
|
3151
|
-
clone: true
|
|
3152
|
-
}));
|
|
3153
|
-
}
|
|
3154
|
-
return vuei18n.apply(this, arguments);
|
|
3155
|
-
}
|
|
3156
|
-
};
|
|
3157
|
-
var t = locale.t = function t2(path, options) {
|
|
3158
|
-
var value = i18nHandler.apply(this, arguments);
|
|
3159
|
-
if (value !== null && value !== void 0)
|
|
3160
|
-
return value;
|
|
3161
|
-
var array = path.split(".");
|
|
3162
|
-
var current = lang;
|
|
3163
|
-
for (var i = 0, j = array.length; i < j; i++) {
|
|
3164
|
-
var property = array[i];
|
|
3165
|
-
value = current[property];
|
|
3166
|
-
if (i === j - 1)
|
|
3167
|
-
return format(value, options);
|
|
3168
|
-
if (!value)
|
|
3169
|
-
return "";
|
|
3170
|
-
current = value;
|
|
3171
|
-
}
|
|
3172
|
-
return "";
|
|
3173
|
-
};
|
|
3174
|
-
var use = locale.use = function use2(l) {
|
|
3175
|
-
lang = l || lang;
|
|
3176
|
-
};
|
|
3177
|
-
var i18n = locale.i18n = function i18n2(fn) {
|
|
3178
|
-
i18nHandler = fn || i18nHandler;
|
|
3179
|
-
};
|
|
3180
|
-
locale.default = {
|
|
3181
|
-
use,
|
|
3182
|
-
t,
|
|
3183
|
-
i18n
|
|
3184
|
-
};
|
|
3185
|
-
var _locale = locale;
|
|
3186
|
-
var _default = {
|
|
3187
|
-
methods: {
|
|
3188
|
-
t: function t3() {
|
|
3189
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3190
|
-
args[_key] = arguments[_key];
|
|
3191
|
-
}
|
|
3192
|
-
return _locale.t.apply(this, args);
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3195
|
-
};
|
|
3196
2098
|
const datesInYear = (year) => {
|
|
3197
2099
|
const numOfDays = getDayCountOfYear(year);
|
|
3198
2100
|
const firstDay = new Date(year, 0, 1);
|
|
@@ -3243,7 +2145,7 @@ const _sfc_main$2 = {
|
|
|
3243
2145
|
style["end-date"] = minYear && year === maxYear;
|
|
3244
2146
|
style["in-range"] = minYear && year >= minYear && year <= maxYear;
|
|
3245
2147
|
} else {
|
|
3246
|
-
style.current = arrayFindIndex
|
|
2148
|
+
style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
|
|
3247
2149
|
}
|
|
3248
2150
|
return style;
|
|
3249
2151
|
},
|
|
@@ -3397,19 +2299,19 @@ var _sfc_staticRenderFns$2 = [];
|
|
|
3397
2299
|
var __component__$2 = /* @__PURE__ */ normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
|
|
3398
2300
|
const yearTable = __component__$2.exports;
|
|
3399
2301
|
const calcDefaultValue = (defaultValue) => {
|
|
3400
|
-
var
|
|
2302
|
+
var date;
|
|
3401
2303
|
if (Array.isArray(defaultValue)) {
|
|
3402
2304
|
return [new Date(defaultValue[0]), new Date(defaultValue[1])];
|
|
3403
2305
|
} else if (defaultValue) {
|
|
3404
|
-
|
|
3405
|
-
return [new Date(
|
|
2306
|
+
date = new Date(defaultValue);
|
|
2307
|
+
return [new Date(date), new Date(date.setFullYear(date.getFullYear() + 12))];
|
|
3406
2308
|
} else {
|
|
3407
|
-
|
|
3408
|
-
return [/* @__PURE__ */ new Date(), new Date(
|
|
2309
|
+
date = /* @__PURE__ */ new Date();
|
|
2310
|
+
return [/* @__PURE__ */ new Date(), new Date(date.setFullYear(date.getFullYear() + 12))];
|
|
3409
2311
|
}
|
|
3410
2312
|
};
|
|
3411
2313
|
const _sfc_main$1 = {
|
|
3412
|
-
mixins: [
|
|
2314
|
+
mixins: [Locale],
|
|
3413
2315
|
directives: {
|
|
3414
2316
|
Clickoutside
|
|
3415
2317
|
},
|
|
@@ -3470,9 +2372,9 @@ const _sfc_main$1 = {
|
|
|
3470
2372
|
immediate: true
|
|
3471
2373
|
},
|
|
3472
2374
|
date(val) {
|
|
3473
|
-
const
|
|
3474
|
-
if (!this.unlinkPanels ||
|
|
3475
|
-
this.rightDate = new Date(
|
|
2375
|
+
const date = new Date(val);
|
|
2376
|
+
if (!this.unlinkPanels || date.getFullYear() + 12 > this.rightDate.getFullYear()) {
|
|
2377
|
+
this.rightDate = new Date(date.setFullYear(date.getFullYear() + 12));
|
|
3476
2378
|
}
|
|
3477
2379
|
},
|
|
3478
2380
|
defaultValue(val) {
|
|
@@ -3520,13 +2422,13 @@ const _sfc_main$1 = {
|
|
|
3520
2422
|
}
|
|
3521
2423
|
},
|
|
3522
2424
|
nextYear(left = false) {
|
|
3523
|
-
const
|
|
3524
|
-
|
|
2425
|
+
const date = left || !this.unlinkPanels ? this.date : this.rightDate;
|
|
2426
|
+
date.setFullYear(date.getFullYear() + 12);
|
|
3525
2427
|
this.resetDate();
|
|
3526
2428
|
},
|
|
3527
2429
|
prevYear(left = false) {
|
|
3528
|
-
const
|
|
3529
|
-
|
|
2430
|
+
const date = left ? this.date : this.rightDate;
|
|
2431
|
+
date.setFullYear(date.getFullYear() - 12);
|
|
3530
2432
|
this.resetDate();
|
|
3531
2433
|
},
|
|
3532
2434
|
handleConfirm(visible = false) {
|