@94ai/nf-double-year 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-year.cjs.js +73 -1202
- package/lib/nf-double-year.esm-bundler.js +63 -1192
- package/package.json +3 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const Vue = require("vue");
|
|
4
|
+
const dateUtil = require("element-ui/src/utils/date-util");
|
|
4
5
|
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
6
|
+
const Locale = require("element-ui/lib/mixins/locale");
|
|
5
7
|
function _mergeNamespaces(n, m) {
|
|
6
8
|
for (var i = 0; i < m.length; i++) {
|
|
7
9
|
const e = m[i];
|
|
@@ -135,669 +137,6 @@ const Clickoutside = {
|
|
|
135
137
|
delete el[ctx];
|
|
136
138
|
}
|
|
137
139
|
};
|
|
138
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
139
|
-
function getDefaultExportFromCjs(x) {
|
|
140
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
141
|
-
}
|
|
142
|
-
function getAugmentedNamespace(n) {
|
|
143
|
-
if (n.__esModule)
|
|
144
|
-
return n;
|
|
145
|
-
var f = n.default;
|
|
146
|
-
if (typeof f == "function") {
|
|
147
|
-
var a = function a2() {
|
|
148
|
-
if (this instanceof a2) {
|
|
149
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
150
|
-
}
|
|
151
|
-
return f.apply(this, arguments);
|
|
152
|
-
};
|
|
153
|
-
a.prototype = f.prototype;
|
|
154
|
-
} else
|
|
155
|
-
a = {};
|
|
156
|
-
Object.defineProperty(a, "__esModule", {
|
|
157
|
-
value: true
|
|
158
|
-
});
|
|
159
|
-
Object.keys(n).forEach(function(k) {
|
|
160
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
161
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
162
|
-
enumerable: true,
|
|
163
|
-
get: function() {
|
|
164
|
-
return n[k];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
return a;
|
|
169
|
-
}
|
|
170
|
-
var date = { exports: {} };
|
|
171
|
-
(function(module2) {
|
|
172
|
-
(function(main) {
|
|
173
|
-
var fecha2 = {};
|
|
174
|
-
var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
175
|
-
var twoDigits = "\\d\\d?";
|
|
176
|
-
var threeDigits = "\\d{3}";
|
|
177
|
-
var fourDigits = "\\d{4}";
|
|
178
|
-
var word = "[^\\s]+";
|
|
179
|
-
var literal = /\[([^]*?)\]/gm;
|
|
180
|
-
var noop2 = function() {
|
|
181
|
-
};
|
|
182
|
-
function regexEscape(str) {
|
|
183
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
|
|
184
|
-
}
|
|
185
|
-
function shorten(arr, sLen) {
|
|
186
|
-
var newArr = [];
|
|
187
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
188
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
189
|
-
}
|
|
190
|
-
return newArr;
|
|
191
|
-
}
|
|
192
|
-
function monthUpdate(arrName) {
|
|
193
|
-
return function(d, v, i18n3) {
|
|
194
|
-
var index = i18n3[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
|
|
195
|
-
if (~index) {
|
|
196
|
-
d.month = index;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function pad(val, len) {
|
|
201
|
-
val = String(val);
|
|
202
|
-
len = len || 2;
|
|
203
|
-
while (val.length < len) {
|
|
204
|
-
val = "0" + val;
|
|
205
|
-
}
|
|
206
|
-
return val;
|
|
207
|
-
}
|
|
208
|
-
var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
209
|
-
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
210
|
-
var monthNamesShort = shorten(monthNames, 3);
|
|
211
|
-
var dayNamesShort = shorten(dayNames, 3);
|
|
212
|
-
fecha2.i18n = {
|
|
213
|
-
dayNamesShort,
|
|
214
|
-
dayNames,
|
|
215
|
-
monthNamesShort,
|
|
216
|
-
monthNames,
|
|
217
|
-
amPm: ["am", "pm"],
|
|
218
|
-
DoFn: function DoFn(D) {
|
|
219
|
-
return D + ["th", "st", "nd", "rd"][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
var formatFlags = {
|
|
223
|
-
D: function(dateObj) {
|
|
224
|
-
return dateObj.getDay();
|
|
225
|
-
},
|
|
226
|
-
DD: function(dateObj) {
|
|
227
|
-
return pad(dateObj.getDay());
|
|
228
|
-
},
|
|
229
|
-
Do: function(dateObj, i18n3) {
|
|
230
|
-
return i18n3.DoFn(dateObj.getDate());
|
|
231
|
-
},
|
|
232
|
-
d: function(dateObj) {
|
|
233
|
-
return dateObj.getDate();
|
|
234
|
-
},
|
|
235
|
-
dd: function(dateObj) {
|
|
236
|
-
return pad(dateObj.getDate());
|
|
237
|
-
},
|
|
238
|
-
ddd: function(dateObj, i18n3) {
|
|
239
|
-
return i18n3.dayNamesShort[dateObj.getDay()];
|
|
240
|
-
},
|
|
241
|
-
dddd: function(dateObj, i18n3) {
|
|
242
|
-
return i18n3.dayNames[dateObj.getDay()];
|
|
243
|
-
},
|
|
244
|
-
M: function(dateObj) {
|
|
245
|
-
return dateObj.getMonth() + 1;
|
|
246
|
-
},
|
|
247
|
-
MM: function(dateObj) {
|
|
248
|
-
return pad(dateObj.getMonth() + 1);
|
|
249
|
-
},
|
|
250
|
-
MMM: function(dateObj, i18n3) {
|
|
251
|
-
return i18n3.monthNamesShort[dateObj.getMonth()];
|
|
252
|
-
},
|
|
253
|
-
MMMM: function(dateObj, i18n3) {
|
|
254
|
-
return i18n3.monthNames[dateObj.getMonth()];
|
|
255
|
-
},
|
|
256
|
-
yy: function(dateObj) {
|
|
257
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
258
|
-
},
|
|
259
|
-
yyyy: function(dateObj) {
|
|
260
|
-
return pad(dateObj.getFullYear(), 4);
|
|
261
|
-
},
|
|
262
|
-
h: function(dateObj) {
|
|
263
|
-
return dateObj.getHours() % 12 || 12;
|
|
264
|
-
},
|
|
265
|
-
hh: function(dateObj) {
|
|
266
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
267
|
-
},
|
|
268
|
-
H: function(dateObj) {
|
|
269
|
-
return dateObj.getHours();
|
|
270
|
-
},
|
|
271
|
-
HH: function(dateObj) {
|
|
272
|
-
return pad(dateObj.getHours());
|
|
273
|
-
},
|
|
274
|
-
m: function(dateObj) {
|
|
275
|
-
return dateObj.getMinutes();
|
|
276
|
-
},
|
|
277
|
-
mm: function(dateObj) {
|
|
278
|
-
return pad(dateObj.getMinutes());
|
|
279
|
-
},
|
|
280
|
-
s: function(dateObj) {
|
|
281
|
-
return dateObj.getSeconds();
|
|
282
|
-
},
|
|
283
|
-
ss: function(dateObj) {
|
|
284
|
-
return pad(dateObj.getSeconds());
|
|
285
|
-
},
|
|
286
|
-
S: function(dateObj) {
|
|
287
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
288
|
-
},
|
|
289
|
-
SS: function(dateObj) {
|
|
290
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
291
|
-
},
|
|
292
|
-
SSS: function(dateObj) {
|
|
293
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
294
|
-
},
|
|
295
|
-
a: function(dateObj, i18n3) {
|
|
296
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0] : i18n3.amPm[1];
|
|
297
|
-
},
|
|
298
|
-
A: function(dateObj, i18n3) {
|
|
299
|
-
return dateObj.getHours() < 12 ? i18n3.amPm[0].toUpperCase() : i18n3.amPm[1].toUpperCase();
|
|
300
|
-
},
|
|
301
|
-
ZZ: function(dateObj) {
|
|
302
|
-
var o = dateObj.getTimezoneOffset();
|
|
303
|
-
return (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
var parseFlags = {
|
|
307
|
-
d: [twoDigits, function(d, v) {
|
|
308
|
-
d.day = v;
|
|
309
|
-
}],
|
|
310
|
-
Do: [twoDigits + word, function(d, v) {
|
|
311
|
-
d.day = parseInt(v, 10);
|
|
312
|
-
}],
|
|
313
|
-
M: [twoDigits, function(d, v) {
|
|
314
|
-
d.month = v - 1;
|
|
315
|
-
}],
|
|
316
|
-
yy: [twoDigits, function(d, v) {
|
|
317
|
-
var da = /* @__PURE__ */ new Date(), cent = +("" + da.getFullYear()).substr(0, 2);
|
|
318
|
-
d.year = "" + (v > 68 ? cent - 1 : cent) + v;
|
|
319
|
-
}],
|
|
320
|
-
h: [twoDigits, function(d, v) {
|
|
321
|
-
d.hour = v;
|
|
322
|
-
}],
|
|
323
|
-
m: [twoDigits, function(d, v) {
|
|
324
|
-
d.minute = v;
|
|
325
|
-
}],
|
|
326
|
-
s: [twoDigits, function(d, v) {
|
|
327
|
-
d.second = v;
|
|
328
|
-
}],
|
|
329
|
-
yyyy: [fourDigits, function(d, v) {
|
|
330
|
-
d.year = v;
|
|
331
|
-
}],
|
|
332
|
-
S: ["\\d", function(d, v) {
|
|
333
|
-
d.millisecond = v * 100;
|
|
334
|
-
}],
|
|
335
|
-
SS: ["\\d{2}", function(d, v) {
|
|
336
|
-
d.millisecond = v * 10;
|
|
337
|
-
}],
|
|
338
|
-
SSS: [threeDigits, function(d, v) {
|
|
339
|
-
d.millisecond = v;
|
|
340
|
-
}],
|
|
341
|
-
D: [twoDigits, noop2],
|
|
342
|
-
ddd: [word, noop2],
|
|
343
|
-
MMM: [word, monthUpdate("monthNamesShort")],
|
|
344
|
-
MMMM: [word, monthUpdate("monthNames")],
|
|
345
|
-
a: [word, function(d, v, i18n3) {
|
|
346
|
-
var val = v.toLowerCase();
|
|
347
|
-
if (val === i18n3.amPm[0]) {
|
|
348
|
-
d.isPm = false;
|
|
349
|
-
} else if (val === i18n3.amPm[1]) {
|
|
350
|
-
d.isPm = true;
|
|
351
|
-
}
|
|
352
|
-
}],
|
|
353
|
-
ZZ: ["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z", function(d, v) {
|
|
354
|
-
var parts = (v + "").match(/([+-]|\d\d)/gi), minutes;
|
|
355
|
-
if (parts) {
|
|
356
|
-
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
357
|
-
d.timezoneOffset = parts[0] === "+" ? minutes : -minutes;
|
|
358
|
-
}
|
|
359
|
-
}]
|
|
360
|
-
};
|
|
361
|
-
parseFlags.dd = parseFlags.d;
|
|
362
|
-
parseFlags.dddd = parseFlags.ddd;
|
|
363
|
-
parseFlags.DD = parseFlags.D;
|
|
364
|
-
parseFlags.mm = parseFlags.m;
|
|
365
|
-
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
366
|
-
parseFlags.MM = parseFlags.M;
|
|
367
|
-
parseFlags.ss = parseFlags.s;
|
|
368
|
-
parseFlags.A = parseFlags.a;
|
|
369
|
-
fecha2.masks = {
|
|
370
|
-
default: "ddd MMM dd yyyy HH:mm:ss",
|
|
371
|
-
shortDate: "M/D/yy",
|
|
372
|
-
mediumDate: "MMM d, yyyy",
|
|
373
|
-
longDate: "MMMM d, yyyy",
|
|
374
|
-
fullDate: "dddd, MMMM d, yyyy",
|
|
375
|
-
shortTime: "HH:mm",
|
|
376
|
-
mediumTime: "HH:mm:ss",
|
|
377
|
-
longTime: "HH:mm:ss.SSS"
|
|
378
|
-
};
|
|
379
|
-
fecha2.format = function(dateObj, mask, i18nSettings) {
|
|
380
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
381
|
-
if (typeof dateObj === "number") {
|
|
382
|
-
dateObj = new Date(dateObj);
|
|
383
|
-
}
|
|
384
|
-
if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
|
|
385
|
-
throw new Error("Invalid Date in fecha.format");
|
|
386
|
-
}
|
|
387
|
-
mask = fecha2.masks[mask] || mask || fecha2.masks["default"];
|
|
388
|
-
var literals = [];
|
|
389
|
-
mask = mask.replace(literal, function($0, $1) {
|
|
390
|
-
literals.push($1);
|
|
391
|
-
return "@@@";
|
|
392
|
-
});
|
|
393
|
-
mask = mask.replace(token, function($0) {
|
|
394
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n3) : $0.slice(1, $0.length - 1);
|
|
395
|
-
});
|
|
396
|
-
return mask.replace(/@@@/g, function() {
|
|
397
|
-
return literals.shift();
|
|
398
|
-
});
|
|
399
|
-
};
|
|
400
|
-
fecha2.parse = function(dateStr, format2, i18nSettings) {
|
|
401
|
-
var i18n3 = i18nSettings || fecha2.i18n;
|
|
402
|
-
if (typeof format2 !== "string") {
|
|
403
|
-
throw new Error("Invalid format in fecha.parse");
|
|
404
|
-
}
|
|
405
|
-
format2 = fecha2.masks[format2] || format2;
|
|
406
|
-
if (dateStr.length > 1e3) {
|
|
407
|
-
return null;
|
|
408
|
-
}
|
|
409
|
-
var dateInfo = {};
|
|
410
|
-
var parseInfo = [];
|
|
411
|
-
var literals = [];
|
|
412
|
-
format2 = format2.replace(literal, function($0, $1) {
|
|
413
|
-
literals.push($1);
|
|
414
|
-
return "@@@";
|
|
415
|
-
});
|
|
416
|
-
var newFormat = regexEscape(format2).replace(token, function($0) {
|
|
417
|
-
if (parseFlags[$0]) {
|
|
418
|
-
var info = parseFlags[$0];
|
|
419
|
-
parseInfo.push(info[1]);
|
|
420
|
-
return "(" + info[0] + ")";
|
|
421
|
-
}
|
|
422
|
-
return $0;
|
|
423
|
-
});
|
|
424
|
-
newFormat = newFormat.replace(/@@@/g, function() {
|
|
425
|
-
return literals.shift();
|
|
426
|
-
});
|
|
427
|
-
var matches = dateStr.match(new RegExp(newFormat, "i"));
|
|
428
|
-
if (!matches) {
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
for (var i = 1; i < matches.length; i++) {
|
|
432
|
-
parseInfo[i - 1](dateInfo, matches[i], i18n3);
|
|
433
|
-
}
|
|
434
|
-
var today = /* @__PURE__ */ new Date();
|
|
435
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
436
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
437
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
438
|
-
dateInfo.hour = 0;
|
|
439
|
-
}
|
|
440
|
-
var date2;
|
|
441
|
-
if (dateInfo.timezoneOffset != null) {
|
|
442
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
443
|
-
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));
|
|
444
|
-
} else {
|
|
445
|
-
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);
|
|
446
|
-
}
|
|
447
|
-
return date2;
|
|
448
|
-
};
|
|
449
|
-
if (module2.exports) {
|
|
450
|
-
module2.exports = fecha2;
|
|
451
|
-
} else {
|
|
452
|
-
main.fecha = fecha2;
|
|
453
|
-
}
|
|
454
|
-
})(commonjsGlobal);
|
|
455
|
-
})(date);
|
|
456
|
-
var dateExports = date.exports;
|
|
457
|
-
const fecha = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
|
|
458
|
-
const defaultLang = {
|
|
459
|
-
el: {
|
|
460
|
-
colorpicker: {
|
|
461
|
-
confirm: "确定",
|
|
462
|
-
clear: "清空"
|
|
463
|
-
},
|
|
464
|
-
datepicker: {
|
|
465
|
-
now: "此刻",
|
|
466
|
-
today: "今天",
|
|
467
|
-
cancel: "取消",
|
|
468
|
-
clear: "清空",
|
|
469
|
-
confirm: "确定",
|
|
470
|
-
selectDate: "选择日期",
|
|
471
|
-
selectTime: "选择时间",
|
|
472
|
-
startDate: "开始日期",
|
|
473
|
-
startTime: "开始时间",
|
|
474
|
-
endDate: "结束日期",
|
|
475
|
-
endTime: "结束时间",
|
|
476
|
-
prevYear: "前一年",
|
|
477
|
-
nextYear: "后一年",
|
|
478
|
-
prevMonth: "上个月",
|
|
479
|
-
nextMonth: "下个月",
|
|
480
|
-
year: "年",
|
|
481
|
-
month1: "1 月",
|
|
482
|
-
month2: "2 月",
|
|
483
|
-
month3: "3 月",
|
|
484
|
-
month4: "4 月",
|
|
485
|
-
month5: "5 月",
|
|
486
|
-
month6: "6 月",
|
|
487
|
-
month7: "7 月",
|
|
488
|
-
month8: "8 月",
|
|
489
|
-
month9: "9 月",
|
|
490
|
-
month10: "10 月",
|
|
491
|
-
month11: "11 月",
|
|
492
|
-
month12: "12 月",
|
|
493
|
-
// week: '周次',
|
|
494
|
-
weeks: {
|
|
495
|
-
sun: "日",
|
|
496
|
-
mon: "一",
|
|
497
|
-
tue: "二",
|
|
498
|
-
wed: "三",
|
|
499
|
-
thu: "四",
|
|
500
|
-
fri: "五",
|
|
501
|
-
sat: "六"
|
|
502
|
-
},
|
|
503
|
-
months: {
|
|
504
|
-
jan: "一月",
|
|
505
|
-
feb: "二月",
|
|
506
|
-
mar: "三月",
|
|
507
|
-
apr: "四月",
|
|
508
|
-
may: "五月",
|
|
509
|
-
jun: "六月",
|
|
510
|
-
jul: "七月",
|
|
511
|
-
aug: "八月",
|
|
512
|
-
sep: "九月",
|
|
513
|
-
oct: "十月",
|
|
514
|
-
nov: "十一月",
|
|
515
|
-
dec: "十二月"
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
select: {
|
|
519
|
-
loading: "加载中",
|
|
520
|
-
noMatch: "无匹配数据",
|
|
521
|
-
noData: "无数据",
|
|
522
|
-
placeholder: "请选择"
|
|
523
|
-
},
|
|
524
|
-
cascader: {
|
|
525
|
-
noMatch: "无匹配数据",
|
|
526
|
-
loading: "加载中",
|
|
527
|
-
placeholder: "请选择",
|
|
528
|
-
noData: "暂无数据"
|
|
529
|
-
},
|
|
530
|
-
pagination: {
|
|
531
|
-
goto: "前往",
|
|
532
|
-
pagesize: "条/页",
|
|
533
|
-
total: "共 {total} 条",
|
|
534
|
-
pageClassifier: "页"
|
|
535
|
-
},
|
|
536
|
-
messagebox: {
|
|
537
|
-
title: "提示",
|
|
538
|
-
confirm: "确定",
|
|
539
|
-
cancel: "取消",
|
|
540
|
-
error: "输入的数据不合法!"
|
|
541
|
-
},
|
|
542
|
-
upload: {
|
|
543
|
-
deleteTip: "按 delete 键可删除",
|
|
544
|
-
delete: "删除",
|
|
545
|
-
preview: "查看图片",
|
|
546
|
-
continue: "继续上传"
|
|
547
|
-
},
|
|
548
|
-
table: {
|
|
549
|
-
emptyText: "暂无数据",
|
|
550
|
-
confirmFilter: "筛选",
|
|
551
|
-
resetFilter: "重置",
|
|
552
|
-
clearFilter: "全部",
|
|
553
|
-
sumText: "合计"
|
|
554
|
-
},
|
|
555
|
-
tree: {
|
|
556
|
-
emptyText: "暂无数据"
|
|
557
|
-
},
|
|
558
|
-
transfer: {
|
|
559
|
-
noMatch: "无匹配数据",
|
|
560
|
-
noData: "无数据",
|
|
561
|
-
titles: ["列表 1", "列表 2"],
|
|
562
|
-
filterPlaceholder: "请输入搜索内容",
|
|
563
|
-
noCheckedFormat: "共 {total} 项",
|
|
564
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
565
|
-
},
|
|
566
|
-
image: {
|
|
567
|
-
error: "加载失败"
|
|
568
|
-
},
|
|
569
|
-
pageHeader: {
|
|
570
|
-
title: "返回"
|
|
571
|
-
},
|
|
572
|
-
popconfirm: {
|
|
573
|
-
confirmButtonText: "确定",
|
|
574
|
-
cancelButtonText: "取消"
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
579
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
580
|
-
};
|
|
581
|
-
function isNonNullObject(value) {
|
|
582
|
-
return !!value && typeof value === "object";
|
|
583
|
-
}
|
|
584
|
-
function isSpecial(value) {
|
|
585
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
586
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
587
|
-
}
|
|
588
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
589
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
590
|
-
function isReactElement(value) {
|
|
591
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
592
|
-
}
|
|
593
|
-
function emptyTarget(val) {
|
|
594
|
-
return Array.isArray(val) ? [] : {};
|
|
595
|
-
}
|
|
596
|
-
function cloneIfNecessary(value, optionsArgument) {
|
|
597
|
-
var clone = optionsArgument && optionsArgument.clone === true;
|
|
598
|
-
return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
|
|
599
|
-
}
|
|
600
|
-
function defaultArrayMerge(target, source, optionsArgument) {
|
|
601
|
-
var destination = target.slice();
|
|
602
|
-
source.forEach(function(e, i) {
|
|
603
|
-
if (typeof destination[i] === "undefined") {
|
|
604
|
-
destination[i] = cloneIfNecessary(e, optionsArgument);
|
|
605
|
-
} else if (isMergeableObject(e)) {
|
|
606
|
-
destination[i] = deepmerge(target[i], e, optionsArgument);
|
|
607
|
-
} else if (target.indexOf(e) === -1) {
|
|
608
|
-
destination.push(cloneIfNecessary(e, optionsArgument));
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
return destination;
|
|
612
|
-
}
|
|
613
|
-
function mergeObject(target, source, optionsArgument) {
|
|
614
|
-
var destination = {};
|
|
615
|
-
if (isMergeableObject(target)) {
|
|
616
|
-
Object.keys(target).forEach(function(key) {
|
|
617
|
-
destination[key] = cloneIfNecessary(target[key], optionsArgument);
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
Object.keys(source).forEach(function(key) {
|
|
621
|
-
if (!isMergeableObject(source[key]) || !target[key]) {
|
|
622
|
-
destination[key] = cloneIfNecessary(source[key], optionsArgument);
|
|
623
|
-
} else {
|
|
624
|
-
destination[key] = deepmerge(target[key], source[key], optionsArgument);
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
return destination;
|
|
628
|
-
}
|
|
629
|
-
function deepmerge(target, source, optionsArgument) {
|
|
630
|
-
var sourceIsArray = Array.isArray(source);
|
|
631
|
-
var targetIsArray = Array.isArray(target);
|
|
632
|
-
var options = optionsArgument || {
|
|
633
|
-
arrayMerge: defaultArrayMerge
|
|
634
|
-
};
|
|
635
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
636
|
-
if (!sourceAndTargetTypesMatch) {
|
|
637
|
-
return cloneIfNecessary(source, optionsArgument);
|
|
638
|
-
} else if (sourceIsArray) {
|
|
639
|
-
var arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
640
|
-
return arrayMerge(target, source, optionsArgument);
|
|
641
|
-
} else {
|
|
642
|
-
return mergeObject(target, source, optionsArgument);
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
646
|
-
if (!Array.isArray(array) || array.length < 2) {
|
|
647
|
-
throw new Error("first argument should be an array with at least two elements");
|
|
648
|
-
}
|
|
649
|
-
return array.reduce(function(prev, next) {
|
|
650
|
-
return deepmerge(prev, next, optionsArgument);
|
|
651
|
-
});
|
|
652
|
-
};
|
|
653
|
-
var deepmerge_1 = deepmerge;
|
|
654
|
-
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
655
|
-
__proto__: null,
|
|
656
|
-
default: deepmerge_1
|
|
657
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
658
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
659
|
-
function hasOwn$1(obj, key) {
|
|
660
|
-
return hasOwnProperty$1.call(obj, key);
|
|
661
|
-
}
|
|
662
|
-
const arrayFindIndex$1 = function(arr, pred) {
|
|
663
|
-
for (let i = 0; i !== arr.length; ++i) {
|
|
664
|
-
if (pred(arr[i])) {
|
|
665
|
-
return i;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
return -1;
|
|
669
|
-
};
|
|
670
|
-
const coerceTruthyValueToArray = function(val) {
|
|
671
|
-
if (Array.isArray(val)) {
|
|
672
|
-
return val;
|
|
673
|
-
} else if (val) {
|
|
674
|
-
return [val];
|
|
675
|
-
} else {
|
|
676
|
-
return [];
|
|
677
|
-
}
|
|
678
|
-
};
|
|
679
|
-
const RE_NARGS$1 = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
680
|
-
function Format(Vue2) {
|
|
681
|
-
function template(string, ...args) {
|
|
682
|
-
if (args.length === 1 && typeof args[0] === "object") {
|
|
683
|
-
args = args[0];
|
|
684
|
-
}
|
|
685
|
-
if (!args || !args.hasOwnProperty) {
|
|
686
|
-
args = {};
|
|
687
|
-
}
|
|
688
|
-
return string.replace(RE_NARGS$1, (match, prefix, i, index) => {
|
|
689
|
-
let result;
|
|
690
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
691
|
-
return i;
|
|
692
|
-
} else {
|
|
693
|
-
result = hasOwn$1(args, i) ? args[i] : null;
|
|
694
|
-
if (result === null || result === void 0) {
|
|
695
|
-
return "";
|
|
696
|
-
}
|
|
697
|
-
return result;
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
return template;
|
|
702
|
-
}
|
|
703
|
-
const format$2 = Format();
|
|
704
|
-
let lang$1 = defaultLang;
|
|
705
|
-
let merged$1 = false;
|
|
706
|
-
let i18nHandler$1 = function() {
|
|
707
|
-
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
708
|
-
if (typeof vuei18n === "function" && !!Vue.locale) {
|
|
709
|
-
if (!merged$1) {
|
|
710
|
-
merged$1 = true;
|
|
711
|
-
Vue.locale(Vue.config.lang, deepmerge_1(lang$1, Vue.locale(Vue.config.lang) || {}, {
|
|
712
|
-
clone: true
|
|
713
|
-
}));
|
|
714
|
-
}
|
|
715
|
-
return vuei18n.apply(this, arguments);
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
const t$1 = function(path, options) {
|
|
719
|
-
let value = i18nHandler$1.apply(this, arguments);
|
|
720
|
-
if (value !== null && value !== void 0)
|
|
721
|
-
return value;
|
|
722
|
-
const array = path.split(".");
|
|
723
|
-
let current = lang$1;
|
|
724
|
-
for (let i = 0, j = array.length; i < j; i++) {
|
|
725
|
-
const property = array[i];
|
|
726
|
-
value = current[property];
|
|
727
|
-
if (i === j - 1)
|
|
728
|
-
return format$2(value, options);
|
|
729
|
-
if (!value)
|
|
730
|
-
return "";
|
|
731
|
-
current = value;
|
|
732
|
-
}
|
|
733
|
-
return "";
|
|
734
|
-
};
|
|
735
|
-
const weeks = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
736
|
-
const months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
737
|
-
const getI18nSettings = () => {
|
|
738
|
-
return {
|
|
739
|
-
dayNamesShort: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
740
|
-
dayNames: weeks.map((week) => t$1(`el.datepicker.weeks.${week}`)),
|
|
741
|
-
monthNamesShort: months.map((month) => t$1(`el.datepicker.months.${month}`)),
|
|
742
|
-
monthNames: months.map((month, index) => t$1(`el.datepicker.month${index + 1}`)),
|
|
743
|
-
amPm: ["am", "pm"]
|
|
744
|
-
};
|
|
745
|
-
};
|
|
746
|
-
const toDate = function(date2) {
|
|
747
|
-
return isDate(date2) ? new Date(date2) : null;
|
|
748
|
-
};
|
|
749
|
-
const isDate = function(date2) {
|
|
750
|
-
if (date2 === null || date2 === void 0)
|
|
751
|
-
return false;
|
|
752
|
-
if (isNaN(new Date(date2).getTime()))
|
|
753
|
-
return false;
|
|
754
|
-
if (Array.isArray(date2))
|
|
755
|
-
return false;
|
|
756
|
-
return true;
|
|
757
|
-
};
|
|
758
|
-
const isDateObject = function(val) {
|
|
759
|
-
return val instanceof Date;
|
|
760
|
-
};
|
|
761
|
-
const formatDate = function(date2, format2) {
|
|
762
|
-
date2 = toDate(date2);
|
|
763
|
-
if (!date2)
|
|
764
|
-
return "";
|
|
765
|
-
return fecha.format(date2, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
766
|
-
};
|
|
767
|
-
const parseDate = function(string, format2) {
|
|
768
|
-
return fecha.parse(string, format2 || "yyyy-MM-dd", getI18nSettings());
|
|
769
|
-
};
|
|
770
|
-
const getDayCountOfYear = function(year) {
|
|
771
|
-
const isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
|
|
772
|
-
return isLeapYear ? 366 : 365;
|
|
773
|
-
};
|
|
774
|
-
const nextDate = function(date2, amount = 1) {
|
|
775
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate() + amount);
|
|
776
|
-
};
|
|
777
|
-
const getWeekNumber = function(src) {
|
|
778
|
-
if (!isDate(src))
|
|
779
|
-
return null;
|
|
780
|
-
const date2 = new Date(src.getTime());
|
|
781
|
-
date2.setHours(0, 0, 0, 0);
|
|
782
|
-
date2.setDate(date2.getDate() + 3 - (date2.getDay() + 6) % 7);
|
|
783
|
-
const week1 = new Date(date2.getFullYear(), 0, 4);
|
|
784
|
-
return 1 + Math.round(((date2.getTime() - week1.getTime()) / 864e5 - 3 + (week1.getDay() + 6) % 7) / 7);
|
|
785
|
-
};
|
|
786
|
-
const range = function(n) {
|
|
787
|
-
return Array.apply(null, {
|
|
788
|
-
length: n
|
|
789
|
-
}).map((_, n2) => n2);
|
|
790
|
-
};
|
|
791
|
-
const modifyTime = function(date2, h, m, s) {
|
|
792
|
-
return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), h, m, s, date2.getMilliseconds());
|
|
793
|
-
};
|
|
794
|
-
const modifyWithTimeString = (date2, time) => {
|
|
795
|
-
if (date2 == null || !time) {
|
|
796
|
-
return date2;
|
|
797
|
-
}
|
|
798
|
-
time = parseDate(time, "HH:mm:ss");
|
|
799
|
-
return modifyTime(date2, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
800
|
-
};
|
|
801
140
|
function merge(target) {
|
|
802
141
|
for (let i = 1, j = arguments.length; i < j; i++) {
|
|
803
142
|
let source = arguments[i] || {};
|
|
@@ -979,6 +318,10 @@ if (!Vue.prototype.$isServer) {
|
|
|
979
318
|
}
|
|
980
319
|
});
|
|
981
320
|
}
|
|
321
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
322
|
+
function getDefaultExportFromCjs(x) {
|
|
323
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
324
|
+
}
|
|
982
325
|
var popper$1 = { exports: {} };
|
|
983
326
|
/**
|
|
984
327
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
@@ -1267,7 +610,7 @@ var popper$1 = { exports: {} };
|
|
|
1267
610
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
1268
611
|
}
|
|
1269
612
|
modifiersToRun.forEach((function(modifier) {
|
|
1270
|
-
if (
|
|
613
|
+
if (isFunction(modifier)) {
|
|
1271
614
|
data = modifier.call(this, data);
|
|
1272
615
|
}
|
|
1273
616
|
}).bind(this));
|
|
@@ -1579,7 +922,7 @@ var popper$1 = { exports: {} };
|
|
|
1579
922
|
element.style[prop] = styles[prop] + unit;
|
|
1580
923
|
});
|
|
1581
924
|
}
|
|
1582
|
-
function
|
|
925
|
+
function isFunction(functionToCheck) {
|
|
1583
926
|
var getType = {};
|
|
1584
927
|
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
1585
928
|
}
|
|
@@ -1596,8 +939,8 @@ var popper$1 = { exports: {} };
|
|
|
1596
939
|
}
|
|
1597
940
|
function getBoundingClientRect(element) {
|
|
1598
941
|
var rect = element.getBoundingClientRect();
|
|
1599
|
-
var
|
|
1600
|
-
var rectTop =
|
|
942
|
+
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
|
943
|
+
var rectTop = isIE && element.tagName === "HTML" ? -element.scrollTop : rect.top;
|
|
1601
944
|
return {
|
|
1602
945
|
left: rect.left,
|
|
1603
946
|
top: rectTop,
|
|
@@ -1902,34 +1245,34 @@ const DEFAULT_FORMATS = {
|
|
|
1902
1245
|
yearrange: "yyyy"
|
|
1903
1246
|
};
|
|
1904
1247
|
const HAVE_TRIGGER_TYPES = ["date", "datetime", "time", "time-select", "week", "month", "year", "yearrange", "daterange", "monthrange", "timerange", "datetimerange", "dates"];
|
|
1905
|
-
const DATE_FORMATTER = function(value,
|
|
1906
|
-
if (
|
|
1248
|
+
const DATE_FORMATTER = function(value, format) {
|
|
1249
|
+
if (format === "timestamp")
|
|
1907
1250
|
return value.getTime();
|
|
1908
|
-
return formatDate(value,
|
|
1251
|
+
return dateUtil.formatDate(value, format);
|
|
1909
1252
|
};
|
|
1910
|
-
const DATE_PARSER = function(text,
|
|
1911
|
-
if (
|
|
1253
|
+
const DATE_PARSER = function(text, format) {
|
|
1254
|
+
if (format === "timestamp")
|
|
1912
1255
|
return new Date(Number(text));
|
|
1913
|
-
return parseDate(text,
|
|
1256
|
+
return dateUtil.parseDate(text, format);
|
|
1914
1257
|
};
|
|
1915
|
-
const RANGE_FORMATTER = function(value,
|
|
1258
|
+
const RANGE_FORMATTER = function(value, format) {
|
|
1916
1259
|
if (Array.isArray(value) && value.length === 2) {
|
|
1917
1260
|
const start = value[0];
|
|
1918
1261
|
const end = value[1];
|
|
1919
1262
|
if (start && end) {
|
|
1920
|
-
return [DATE_FORMATTER(start,
|
|
1263
|
+
return [DATE_FORMATTER(start, format), DATE_FORMATTER(end, format)];
|
|
1921
1264
|
}
|
|
1922
1265
|
}
|
|
1923
1266
|
return "";
|
|
1924
1267
|
};
|
|
1925
|
-
const RANGE_PARSER = function(array,
|
|
1268
|
+
const RANGE_PARSER = function(array, format, separator) {
|
|
1926
1269
|
if (!Array.isArray(array)) {
|
|
1927
1270
|
array = array.split(separator);
|
|
1928
1271
|
}
|
|
1929
1272
|
if (array.length === 2) {
|
|
1930
1273
|
const range1 = array[0];
|
|
1931
1274
|
const range2 = array[1];
|
|
1932
|
-
return [DATE_PARSER(range1,
|
|
1275
|
+
return [DATE_PARSER(range1, format), DATE_PARSER(range2, format)];
|
|
1933
1276
|
}
|
|
1934
1277
|
return [];
|
|
1935
1278
|
};
|
|
@@ -1947,20 +1290,20 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
1947
1290
|
}
|
|
1948
1291
|
},
|
|
1949
1292
|
week: {
|
|
1950
|
-
formatter(value,
|
|
1951
|
-
let week = getWeekNumber(value);
|
|
1293
|
+
formatter(value, format) {
|
|
1294
|
+
let week = dateUtil.getWeekNumber(value);
|
|
1952
1295
|
let month = value.getMonth();
|
|
1953
1296
|
const trueDate = new Date(value);
|
|
1954
1297
|
if (week === 1 && month === 11) {
|
|
1955
1298
|
trueDate.setHours(0, 0, 0, 0);
|
|
1956
1299
|
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
|
1957
1300
|
}
|
|
1958
|
-
let
|
|
1959
|
-
|
|
1960
|
-
return
|
|
1301
|
+
let date = dateUtil.formatDate(trueDate, format);
|
|
1302
|
+
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
|
|
1303
|
+
return date;
|
|
1961
1304
|
},
|
|
1962
|
-
parser(text,
|
|
1963
|
-
return TYPE_VALUE_RESOLVER_MAP.date.parser(text,
|
|
1305
|
+
parser(text, format) {
|
|
1306
|
+
return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
|
|
1964
1307
|
}
|
|
1965
1308
|
},
|
|
1966
1309
|
date: {
|
|
@@ -2019,11 +1362,11 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
|
2019
1362
|
}
|
|
2020
1363
|
},
|
|
2021
1364
|
dates: {
|
|
2022
|
-
formatter(value,
|
|
2023
|
-
return value.map((
|
|
1365
|
+
formatter(value, format) {
|
|
1366
|
+
return value.map((date) => DATE_FORMATTER(date, format));
|
|
2024
1367
|
},
|
|
2025
|
-
parser(value,
|
|
2026
|
-
return (typeof value === "string" ? value.split(", ") : value).map((
|
|
1368
|
+
parser(value, format) {
|
|
1369
|
+
return (typeof value === "string" ? value.split(", ") : value).map((date) => date instanceof Date ? date : DATE_PARSER(date, format));
|
|
2027
1370
|
}
|
|
2028
1371
|
}
|
|
2029
1372
|
};
|
|
@@ -2036,15 +1379,15 @@ const parseAsFormatAndType = (value, customFormat, type, rangeSeparator = "-") =
|
|
|
2036
1379
|
if (!value)
|
|
2037
1380
|
return null;
|
|
2038
1381
|
const parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).parser;
|
|
2039
|
-
const
|
|
2040
|
-
return parser(value,
|
|
1382
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1383
|
+
return parser(value, format, rangeSeparator);
|
|
2041
1384
|
};
|
|
2042
1385
|
const formatAsFormatAndType = (value, customFormat, type) => {
|
|
2043
1386
|
if (!value)
|
|
2044
1387
|
return null;
|
|
2045
1388
|
const formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP["default"]).formatter;
|
|
2046
|
-
const
|
|
2047
|
-
return formatter(value,
|
|
1389
|
+
const format = customFormat || DEFAULT_FORMATS[type];
|
|
1390
|
+
return formatter(value, format);
|
|
2048
1391
|
};
|
|
2049
1392
|
const valueEquals = function(a, b) {
|
|
2050
1393
|
const dateEquals = function(a2, b2) {
|
|
@@ -2071,11 +1414,11 @@ const valueEquals = function(a, b) {
|
|
|
2071
1414
|
}
|
|
2072
1415
|
return false;
|
|
2073
1416
|
};
|
|
2074
|
-
const isString
|
|
1417
|
+
const isString = function(val) {
|
|
2075
1418
|
return typeof val === "string" || val instanceof String;
|
|
2076
1419
|
};
|
|
2077
1420
|
const validator = function(val) {
|
|
2078
|
-
return val === null || val === void 0 || isString
|
|
1421
|
+
return val === null || val === void 0 || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
|
|
2079
1422
|
};
|
|
2080
1423
|
const _sfc_main$3 = {
|
|
2081
1424
|
mixins: [Emitter, NewPopper],
|
|
@@ -2262,7 +1605,7 @@ const _sfc_main$3 = {
|
|
|
2262
1605
|
return this.value;
|
|
2263
1606
|
if (this.type === "time-select")
|
|
2264
1607
|
return this.value;
|
|
2265
|
-
const valueIsDateObject = isDateObject(this.value) || Array.isArray(this.value) && this.value.every(isDateObject);
|
|
1608
|
+
const valueIsDateObject = dateUtil.isDateObject(this.value) || Array.isArray(this.value) && this.value.every(dateUtil.isDateObject);
|
|
2266
1609
|
if (valueIsDateObject) {
|
|
2267
1610
|
return this.value;
|
|
2268
1611
|
}
|
|
@@ -2324,19 +1667,19 @@ const _sfc_main$3 = {
|
|
|
2324
1667
|
},
|
|
2325
1668
|
// {parse, formatTo} Value deals maps component value with internal Date
|
|
2326
1669
|
parseValue(value) {
|
|
2327
|
-
const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
|
|
1670
|
+
const isParsed = dateUtil.isDateObject(value) || Array.isArray(value) && value.every(dateUtil.isDateObject);
|
|
2328
1671
|
if (this.valueFormat && !isParsed) {
|
|
2329
1672
|
return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
|
|
2330
1673
|
} else {
|
|
2331
1674
|
return value;
|
|
2332
1675
|
}
|
|
2333
1676
|
},
|
|
2334
|
-
formatToValue(
|
|
2335
|
-
const isFormattable = isDateObject(
|
|
1677
|
+
formatToValue(date) {
|
|
1678
|
+
const isFormattable = dateUtil.isDateObject(date) || Array.isArray(date) && date.every(dateUtil.isDateObject);
|
|
2336
1679
|
if (this.valueFormat && isFormattable) {
|
|
2337
|
-
return formatAsFormatAndType(
|
|
1680
|
+
return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
|
|
2338
1681
|
} else {
|
|
2339
|
-
return
|
|
1682
|
+
return date;
|
|
2340
1683
|
}
|
|
2341
1684
|
},
|
|
2342
1685
|
// {parse, formatTo} String deals with user input
|
|
@@ -2525,17 +1868,17 @@ const _sfc_main$3 = {
|
|
|
2525
1868
|
this.picker.selectionMode = this.selectionMode;
|
|
2526
1869
|
this.picker.unlinkPanels = this.unlinkPanels;
|
|
2527
1870
|
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
|
|
2528
|
-
this.$watch("format", (
|
|
2529
|
-
this.picker.format =
|
|
1871
|
+
this.$watch("format", (format) => {
|
|
1872
|
+
this.picker.format = format;
|
|
2530
1873
|
});
|
|
2531
1874
|
const updateOptions = () => {
|
|
2532
1875
|
const options = this.pickerOptions;
|
|
2533
1876
|
if (options && options.selectableRange) {
|
|
2534
1877
|
let ranges = options.selectableRange;
|
|
2535
1878
|
const parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
|
|
2536
|
-
const
|
|
1879
|
+
const format = DEFAULT_FORMATS.timerange;
|
|
2537
1880
|
ranges = Array.isArray(ranges) ? ranges : [ranges];
|
|
2538
|
-
this.picker.selectableRange = ranges.map((
|
|
1881
|
+
this.picker.selectableRange = ranges.map((range) => parser(range, format, this.rangeSeparator));
|
|
2539
1882
|
}
|
|
2540
1883
|
for (const option in options) {
|
|
2541
1884
|
if (options.hasOwnProperty(option) && // 忽略 time-picker 的该配置项
|
|
@@ -2554,10 +1897,10 @@ const _sfc_main$3 = {
|
|
|
2554
1897
|
this.$el.appendChild(this.picker.$el);
|
|
2555
1898
|
this.picker.resetView && this.picker.resetView();
|
|
2556
1899
|
this.picker.$on("dodestroy", this.doDestroy);
|
|
2557
|
-
this.picker.$on("pick", (
|
|
1900
|
+
this.picker.$on("pick", (date = "", visible = false) => {
|
|
2558
1901
|
this.userInput = null;
|
|
2559
1902
|
this.pickerVisible = this.picker.visible = visible;
|
|
2560
|
-
this.emitInput(
|
|
1903
|
+
this.emitInput(date);
|
|
2561
1904
|
this.picker.resetView && this.picker.resetView();
|
|
2562
1905
|
});
|
|
2563
1906
|
this.picker.$on("select-range", (start, end, pos) => {
|
|
@@ -2737,275 +2080,15 @@ var _sfc_render$3 = function render() {
|
|
|
2737
2080
|
var _sfc_staticRenderFns$3 = [];
|
|
2738
2081
|
var __component__$3 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$3, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
|
|
2739
2082
|
const Picker = __component__$3.exports;
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
zhCN.__esModule = true;
|
|
2743
|
-
zhCN.default = {
|
|
2744
|
-
el: {
|
|
2745
|
-
colorpicker: {
|
|
2746
|
-
confirm: "确定",
|
|
2747
|
-
clear: "清空"
|
|
2748
|
-
},
|
|
2749
|
-
datepicker: {
|
|
2750
|
-
now: "此刻",
|
|
2751
|
-
today: "今天",
|
|
2752
|
-
cancel: "取消",
|
|
2753
|
-
clear: "清空",
|
|
2754
|
-
confirm: "确定",
|
|
2755
|
-
selectDate: "选择日期",
|
|
2756
|
-
selectTime: "选择时间",
|
|
2757
|
-
startDate: "开始日期",
|
|
2758
|
-
startTime: "开始时间",
|
|
2759
|
-
endDate: "结束日期",
|
|
2760
|
-
endTime: "结束时间",
|
|
2761
|
-
prevYear: "前一年",
|
|
2762
|
-
nextYear: "后一年",
|
|
2763
|
-
prevMonth: "上个月",
|
|
2764
|
-
nextMonth: "下个月",
|
|
2765
|
-
year: "年",
|
|
2766
|
-
month1: "1 月",
|
|
2767
|
-
month2: "2 月",
|
|
2768
|
-
month3: "3 月",
|
|
2769
|
-
month4: "4 月",
|
|
2770
|
-
month5: "5 月",
|
|
2771
|
-
month6: "6 月",
|
|
2772
|
-
month7: "7 月",
|
|
2773
|
-
month8: "8 月",
|
|
2774
|
-
month9: "9 月",
|
|
2775
|
-
month10: "10 月",
|
|
2776
|
-
month11: "11 月",
|
|
2777
|
-
month12: "12 月",
|
|
2778
|
-
// week: '周次',
|
|
2779
|
-
weeks: {
|
|
2780
|
-
sun: "日",
|
|
2781
|
-
mon: "一",
|
|
2782
|
-
tue: "二",
|
|
2783
|
-
wed: "三",
|
|
2784
|
-
thu: "四",
|
|
2785
|
-
fri: "五",
|
|
2786
|
-
sat: "六"
|
|
2787
|
-
},
|
|
2788
|
-
months: {
|
|
2789
|
-
jan: "一月",
|
|
2790
|
-
feb: "二月",
|
|
2791
|
-
mar: "三月",
|
|
2792
|
-
apr: "四月",
|
|
2793
|
-
may: "五月",
|
|
2794
|
-
jun: "六月",
|
|
2795
|
-
jul: "七月",
|
|
2796
|
-
aug: "八月",
|
|
2797
|
-
sep: "九月",
|
|
2798
|
-
oct: "十月",
|
|
2799
|
-
nov: "十一月",
|
|
2800
|
-
dec: "十二月"
|
|
2801
|
-
}
|
|
2802
|
-
},
|
|
2803
|
-
select: {
|
|
2804
|
-
loading: "加载中",
|
|
2805
|
-
noMatch: "无匹配数据",
|
|
2806
|
-
noData: "无数据",
|
|
2807
|
-
placeholder: "请选择"
|
|
2808
|
-
},
|
|
2809
|
-
cascader: {
|
|
2810
|
-
noMatch: "无匹配数据",
|
|
2811
|
-
loading: "加载中",
|
|
2812
|
-
placeholder: "请选择",
|
|
2813
|
-
noData: "暂无数据"
|
|
2814
|
-
},
|
|
2815
|
-
pagination: {
|
|
2816
|
-
goto: "前往",
|
|
2817
|
-
pagesize: "条/页",
|
|
2818
|
-
total: "共 {total} 条",
|
|
2819
|
-
pageClassifier: "页"
|
|
2820
|
-
},
|
|
2821
|
-
messagebox: {
|
|
2822
|
-
title: "提示",
|
|
2823
|
-
confirm: "确定",
|
|
2824
|
-
cancel: "取消",
|
|
2825
|
-
error: "输入的数据不合法!"
|
|
2826
|
-
},
|
|
2827
|
-
upload: {
|
|
2828
|
-
deleteTip: "按 delete 键可删除",
|
|
2829
|
-
delete: "删除",
|
|
2830
|
-
preview: "查看图片",
|
|
2831
|
-
continue: "继续上传"
|
|
2832
|
-
},
|
|
2833
|
-
table: {
|
|
2834
|
-
emptyText: "暂无数据",
|
|
2835
|
-
confirmFilter: "筛选",
|
|
2836
|
-
resetFilter: "重置",
|
|
2837
|
-
clearFilter: "全部",
|
|
2838
|
-
sumText: "合计"
|
|
2839
|
-
},
|
|
2840
|
-
tree: {
|
|
2841
|
-
emptyText: "暂无数据"
|
|
2842
|
-
},
|
|
2843
|
-
transfer: {
|
|
2844
|
-
noMatch: "无匹配数据",
|
|
2845
|
-
noData: "无数据",
|
|
2846
|
-
titles: ["列表 1", "列表 2"],
|
|
2847
|
-
filterPlaceholder: "请输入搜索内容",
|
|
2848
|
-
noCheckedFormat: "共 {total} 项",
|
|
2849
|
-
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
2850
|
-
},
|
|
2851
|
-
image: {
|
|
2852
|
-
error: "加载失败"
|
|
2853
|
-
},
|
|
2854
|
-
pageHeader: {
|
|
2855
|
-
title: "返回"
|
|
2856
|
-
},
|
|
2857
|
-
popconfirm: {
|
|
2858
|
-
confirmButtonText: "确定",
|
|
2859
|
-
cancelButtonText: "取消"
|
|
2860
|
-
}
|
|
2861
|
-
}
|
|
2862
|
-
};
|
|
2863
|
-
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(es);
|
|
2864
|
-
var format$1 = {};
|
|
2865
|
-
var util = {};
|
|
2866
|
-
var types = {};
|
|
2867
|
-
types.__esModule = true;
|
|
2868
|
-
types.isString = isString;
|
|
2869
|
-
types.isObject = isObject;
|
|
2870
|
-
types.isHtmlElement = isHtmlElement;
|
|
2871
|
-
function isString(obj) {
|
|
2872
|
-
return Object.prototype.toString.call(obj) === "[object String]";
|
|
2873
|
-
}
|
|
2874
|
-
function isObject(obj) {
|
|
2875
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2876
|
-
}
|
|
2877
|
-
function isHtmlElement(node) {
|
|
2878
|
-
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
2879
|
-
}
|
|
2880
|
-
types.isFunction = function isFunction(functionToCheck) {
|
|
2881
|
-
var getType = {};
|
|
2882
|
-
return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
|
|
2883
|
-
};
|
|
2884
|
-
types.isUndefined = function isUndefined(val) {
|
|
2885
|
-
return val === void 0;
|
|
2886
|
-
};
|
|
2887
|
-
types.isDefined = function isDefined(val) {
|
|
2888
|
-
return val !== void 0 && val !== null;
|
|
2889
|
-
};
|
|
2890
|
-
util.__esModule = true;
|
|
2891
|
-
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;
|
|
2892
|
-
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
2893
|
-
return typeof obj;
|
|
2894
|
-
} : function(obj) {
|
|
2895
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2896
|
-
};
|
|
2897
|
-
util.noop = noop;
|
|
2898
|
-
util.hasOwn = hasOwn;
|
|
2899
|
-
util.toObject = toObject;
|
|
2900
|
-
util.getPropByPath = getPropByPath;
|
|
2901
|
-
util.rafThrottle = rafThrottle;
|
|
2902
|
-
util.objToArray = objToArray;
|
|
2903
|
-
var _vue$1 = Vue;
|
|
2904
|
-
var _vue2$1 = _interopRequireDefault$1(_vue$1);
|
|
2905
|
-
var _types = types;
|
|
2906
|
-
function _interopRequireDefault$1(obj) {
|
|
2907
|
-
return obj && obj.__esModule ? obj : {
|
|
2908
|
-
default: obj
|
|
2909
|
-
};
|
|
2910
|
-
}
|
|
2911
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2912
|
-
function noop() {
|
|
2913
|
-
}
|
|
2914
|
-
function hasOwn(obj, key) {
|
|
2915
|
-
return hasOwnProperty.call(obj, key);
|
|
2916
|
-
}
|
|
2917
|
-
function extend(to, _from) {
|
|
2918
|
-
for (var key in _from) {
|
|
2919
|
-
to[key] = _from[key];
|
|
2920
|
-
}
|
|
2921
|
-
return to;
|
|
2922
|
-
}
|
|
2923
|
-
function toObject(arr) {
|
|
2924
|
-
var res = {};
|
|
2925
|
-
for (var i = 0; i < arr.length; i++) {
|
|
2926
|
-
if (arr[i]) {
|
|
2927
|
-
extend(res, arr[i]);
|
|
2928
|
-
}
|
|
2929
|
-
}
|
|
2930
|
-
return res;
|
|
2931
|
-
}
|
|
2932
|
-
util.getValueByPath = function getValueByPath(object, prop) {
|
|
2933
|
-
prop = prop || "";
|
|
2934
|
-
var paths = prop.split(".");
|
|
2935
|
-
var current = object;
|
|
2936
|
-
var result = null;
|
|
2937
|
-
for (var i = 0, j = paths.length; i < j; i++) {
|
|
2938
|
-
var path = paths[i];
|
|
2939
|
-
if (!current)
|
|
2940
|
-
break;
|
|
2941
|
-
if (i === j - 1) {
|
|
2942
|
-
result = current[path];
|
|
2943
|
-
break;
|
|
2944
|
-
}
|
|
2945
|
-
current = current[path];
|
|
2946
|
-
}
|
|
2947
|
-
return result;
|
|
2948
|
-
};
|
|
2949
|
-
function getPropByPath(obj, path, strict) {
|
|
2950
|
-
var tempObj = obj;
|
|
2951
|
-
path = path.replace(/\[(\w+)\]/g, ".$1");
|
|
2952
|
-
path = path.replace(/^\./, "");
|
|
2953
|
-
var keyArr = path.split(".");
|
|
2954
|
-
var i = 0;
|
|
2955
|
-
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
2956
|
-
if (!tempObj && !strict)
|
|
2957
|
-
break;
|
|
2958
|
-
var key = keyArr[i];
|
|
2959
|
-
if (key in tempObj) {
|
|
2960
|
-
tempObj = tempObj[key];
|
|
2961
|
-
} else {
|
|
2962
|
-
if (strict) {
|
|
2963
|
-
throw new Error("please transfer a valid prop path to form item!");
|
|
2964
|
-
}
|
|
2965
|
-
break;
|
|
2966
|
-
}
|
|
2967
|
-
}
|
|
2968
|
-
return {
|
|
2969
|
-
o: tempObj,
|
|
2970
|
-
k: keyArr[i],
|
|
2971
|
-
v: tempObj ? tempObj[keyArr[i]] : null
|
|
2972
|
-
};
|
|
2973
|
-
}
|
|
2974
|
-
util.generateId = function generateId() {
|
|
2975
|
-
return Math.floor(Math.random() * 1e4);
|
|
2976
|
-
};
|
|
2977
|
-
util.valueEquals = function valueEquals2(a, b) {
|
|
2978
|
-
if (a === b)
|
|
2979
|
-
return true;
|
|
2980
|
-
if (!(a instanceof Array))
|
|
2981
|
-
return false;
|
|
2982
|
-
if (!(b instanceof Array))
|
|
2983
|
-
return false;
|
|
2984
|
-
if (a.length !== b.length)
|
|
2985
|
-
return false;
|
|
2986
|
-
for (var i = 0; i !== a.length; ++i) {
|
|
2987
|
-
if (a[i] !== b[i])
|
|
2988
|
-
return false;
|
|
2989
|
-
}
|
|
2990
|
-
return true;
|
|
2991
|
-
};
|
|
2992
|
-
util.escapeRegexpString = function escapeRegexpString() {
|
|
2993
|
-
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
2994
|
-
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
2995
|
-
};
|
|
2996
|
-
var arrayFindIndex = util.arrayFindIndex = function arrayFindIndex2(arr, pred) {
|
|
2997
|
-
for (var i = 0; i !== arr.length; ++i) {
|
|
2083
|
+
const arrayFindIndex = function(arr, pred) {
|
|
2084
|
+
for (let i = 0; i !== arr.length; ++i) {
|
|
2998
2085
|
if (pred(arr[i])) {
|
|
2999
2086
|
return i;
|
|
3000
2087
|
}
|
|
3001
2088
|
}
|
|
3002
2089
|
return -1;
|
|
3003
2090
|
};
|
|
3004
|
-
|
|
3005
|
-
var idx = arrayFindIndex(arr, pred);
|
|
3006
|
-
return idx !== -1 ? arr[idx] : void 0;
|
|
3007
|
-
};
|
|
3008
|
-
util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
2091
|
+
const coerceTruthyValueToArray = function(val) {
|
|
3009
2092
|
if (Array.isArray(val)) {
|
|
3010
2093
|
return val;
|
|
3011
2094
|
} else if (val) {
|
|
@@ -3014,228 +2097,16 @@ util.coerceTruthyValueToArray = function coerceTruthyValueToArray2(val) {
|
|
|
3014
2097
|
return [];
|
|
3015
2098
|
}
|
|
3016
2099
|
};
|
|
3017
|
-
util.isIE = function isIE() {
|
|
3018
|
-
return !_vue2$1.default.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
3019
|
-
};
|
|
3020
|
-
util.isEdge = function isEdge() {
|
|
3021
|
-
return !_vue2$1.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
|
|
3022
|
-
};
|
|
3023
|
-
util.isFirefox = function isFirefox() {
|
|
3024
|
-
return !_vue2$1.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
3025
|
-
};
|
|
3026
|
-
util.autoprefixer = function autoprefixer(style) {
|
|
3027
|
-
if ((typeof style === "undefined" ? "undefined" : _typeof$1(style)) !== "object")
|
|
3028
|
-
return style;
|
|
3029
|
-
var rules = ["transform", "transition", "animation"];
|
|
3030
|
-
var prefixes = ["ms-", "webkit-"];
|
|
3031
|
-
rules.forEach(function(rule) {
|
|
3032
|
-
var value = style[rule];
|
|
3033
|
-
if (rule && value) {
|
|
3034
|
-
prefixes.forEach(function(prefix) {
|
|
3035
|
-
style[prefix + rule] = value;
|
|
3036
|
-
});
|
|
3037
|
-
}
|
|
3038
|
-
});
|
|
3039
|
-
return style;
|
|
3040
|
-
};
|
|
3041
|
-
util.kebabCase = function kebabCase(str) {
|
|
3042
|
-
var hyphenateRE = /([^-])([A-Z])/g;
|
|
3043
|
-
return str.replace(hyphenateRE, "$1-$2").replace(hyphenateRE, "$1-$2").toLowerCase();
|
|
3044
|
-
};
|
|
3045
|
-
util.capitalize = function capitalize(str) {
|
|
3046
|
-
if (!(0, _types.isString)(str))
|
|
3047
|
-
return str;
|
|
3048
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
3049
|
-
};
|
|
3050
|
-
var looseEqual = util.looseEqual = function looseEqual2(a, b) {
|
|
3051
|
-
var isObjectA = (0, _types.isObject)(a);
|
|
3052
|
-
var isObjectB = (0, _types.isObject)(b);
|
|
3053
|
-
if (isObjectA && isObjectB) {
|
|
3054
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
3055
|
-
} else if (!isObjectA && !isObjectB) {
|
|
3056
|
-
return String(a) === String(b);
|
|
3057
|
-
} else {
|
|
3058
|
-
return false;
|
|
3059
|
-
}
|
|
3060
|
-
};
|
|
3061
|
-
var arrayEquals = util.arrayEquals = function arrayEquals2(arrayA, arrayB) {
|
|
3062
|
-
arrayA = arrayA || [];
|
|
3063
|
-
arrayB = arrayB || [];
|
|
3064
|
-
if (arrayA.length !== arrayB.length) {
|
|
3065
|
-
return false;
|
|
3066
|
-
}
|
|
3067
|
-
for (var i = 0; i < arrayA.length; i++) {
|
|
3068
|
-
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
3069
|
-
return false;
|
|
3070
|
-
}
|
|
3071
|
-
}
|
|
3072
|
-
return true;
|
|
3073
|
-
};
|
|
3074
|
-
util.isEqual = function isEqual(value1, value2) {
|
|
3075
|
-
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
3076
|
-
return arrayEquals(value1, value2);
|
|
3077
|
-
}
|
|
3078
|
-
return looseEqual(value1, value2);
|
|
3079
|
-
};
|
|
3080
|
-
var isEmpty = util.isEmpty = function isEmpty2(val) {
|
|
3081
|
-
if (val == null)
|
|
3082
|
-
return true;
|
|
3083
|
-
if (typeof val === "boolean")
|
|
3084
|
-
return false;
|
|
3085
|
-
if (typeof val === "number")
|
|
3086
|
-
return !val;
|
|
3087
|
-
if (val instanceof Error)
|
|
3088
|
-
return val.message === "";
|
|
3089
|
-
switch (Object.prototype.toString.call(val)) {
|
|
3090
|
-
case "[object String]":
|
|
3091
|
-
case "[object Array]":
|
|
3092
|
-
return !val.length;
|
|
3093
|
-
case "[object File]":
|
|
3094
|
-
case "[object Map]":
|
|
3095
|
-
case "[object Set]": {
|
|
3096
|
-
return !val.size;
|
|
3097
|
-
}
|
|
3098
|
-
case "[object Object]": {
|
|
3099
|
-
return !Object.keys(val).length;
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
return false;
|
|
3103
|
-
};
|
|
3104
|
-
function rafThrottle(fn) {
|
|
3105
|
-
var locked = false;
|
|
3106
|
-
return function() {
|
|
3107
|
-
var _this = this;
|
|
3108
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3109
|
-
args[_key] = arguments[_key];
|
|
3110
|
-
}
|
|
3111
|
-
if (locked)
|
|
3112
|
-
return;
|
|
3113
|
-
locked = true;
|
|
3114
|
-
window.requestAnimationFrame(function(_) {
|
|
3115
|
-
fn.apply(_this, args);
|
|
3116
|
-
locked = false;
|
|
3117
|
-
});
|
|
3118
|
-
};
|
|
3119
|
-
}
|
|
3120
|
-
function objToArray(obj) {
|
|
3121
|
-
if (Array.isArray(obj)) {
|
|
3122
|
-
return obj;
|
|
3123
|
-
}
|
|
3124
|
-
return isEmpty(obj) ? [] : [obj];
|
|
3125
|
-
}
|
|
3126
|
-
format$1.__esModule = true;
|
|
3127
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
3128
|
-
return typeof obj;
|
|
3129
|
-
} : function(obj) {
|
|
3130
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3131
|
-
};
|
|
3132
|
-
format$1.default = function(Vue2) {
|
|
3133
|
-
function template(string) {
|
|
3134
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3135
|
-
args[_key - 1] = arguments[_key];
|
|
3136
|
-
}
|
|
3137
|
-
if (args.length === 1 && _typeof(args[0]) === "object") {
|
|
3138
|
-
args = args[0];
|
|
3139
|
-
}
|
|
3140
|
-
if (!args || !args.hasOwnProperty) {
|
|
3141
|
-
args = {};
|
|
3142
|
-
}
|
|
3143
|
-
return string.replace(RE_NARGS, function(match, prefix, i, index) {
|
|
3144
|
-
var result = void 0;
|
|
3145
|
-
if (string[index - 1] === "{" && string[index + match.length] === "}") {
|
|
3146
|
-
return i;
|
|
3147
|
-
} else {
|
|
3148
|
-
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
3149
|
-
if (result === null || result === void 0) {
|
|
3150
|
-
return "";
|
|
3151
|
-
}
|
|
3152
|
-
return result;
|
|
3153
|
-
}
|
|
3154
|
-
});
|
|
3155
|
-
}
|
|
3156
|
-
return template;
|
|
3157
|
-
};
|
|
3158
|
-
var _util = util;
|
|
3159
|
-
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
3160
|
-
locale.__esModule = true;
|
|
3161
|
-
locale.i18n = locale.use = locale.t = void 0;
|
|
3162
|
-
var _zhCN = zhCN;
|
|
3163
|
-
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
3164
|
-
var _vue = Vue;
|
|
3165
|
-
var _vue2 = _interopRequireDefault(_vue);
|
|
3166
|
-
var _deepmerge = require$$2;
|
|
3167
|
-
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
3168
|
-
var _format = format$1;
|
|
3169
|
-
var _format2 = _interopRequireDefault(_format);
|
|
3170
|
-
function _interopRequireDefault(obj) {
|
|
3171
|
-
return obj && obj.__esModule ? obj : {
|
|
3172
|
-
default: obj
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
var format = (0, _format2.default)(_vue2.default);
|
|
3176
|
-
var lang = _zhCN2.default;
|
|
3177
|
-
var merged = false;
|
|
3178
|
-
var i18nHandler = function i18nHandler2() {
|
|
3179
|
-
var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
|
|
3180
|
-
if (typeof vuei18n === "function" && !!_vue2.default.locale) {
|
|
3181
|
-
if (!merged) {
|
|
3182
|
-
merged = true;
|
|
3183
|
-
_vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
|
|
3184
|
-
clone: true
|
|
3185
|
-
}));
|
|
3186
|
-
}
|
|
3187
|
-
return vuei18n.apply(this, arguments);
|
|
3188
|
-
}
|
|
3189
|
-
};
|
|
3190
|
-
var t = locale.t = function t2(path, options) {
|
|
3191
|
-
var value = i18nHandler.apply(this, arguments);
|
|
3192
|
-
if (value !== null && value !== void 0)
|
|
3193
|
-
return value;
|
|
3194
|
-
var array = path.split(".");
|
|
3195
|
-
var current = lang;
|
|
3196
|
-
for (var i = 0, j = array.length; i < j; i++) {
|
|
3197
|
-
var property = array[i];
|
|
3198
|
-
value = current[property];
|
|
3199
|
-
if (i === j - 1)
|
|
3200
|
-
return format(value, options);
|
|
3201
|
-
if (!value)
|
|
3202
|
-
return "";
|
|
3203
|
-
current = value;
|
|
3204
|
-
}
|
|
3205
|
-
return "";
|
|
3206
|
-
};
|
|
3207
|
-
var use = locale.use = function use2(l) {
|
|
3208
|
-
lang = l || lang;
|
|
3209
|
-
};
|
|
3210
|
-
var i18n = locale.i18n = function i18n2(fn) {
|
|
3211
|
-
i18nHandler = fn || i18nHandler;
|
|
3212
|
-
};
|
|
3213
|
-
locale.default = {
|
|
3214
|
-
use,
|
|
3215
|
-
t,
|
|
3216
|
-
i18n
|
|
3217
|
-
};
|
|
3218
|
-
var _locale = locale;
|
|
3219
|
-
var _default = {
|
|
3220
|
-
methods: {
|
|
3221
|
-
t: function t3() {
|
|
3222
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
3223
|
-
args[_key] = arguments[_key];
|
|
3224
|
-
}
|
|
3225
|
-
return _locale.t.apply(this, args);
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
};
|
|
3229
2100
|
const datesInYear = (year) => {
|
|
3230
|
-
const numOfDays = getDayCountOfYear(year);
|
|
2101
|
+
const numOfDays = dateUtil.getDayCountOfYear(year);
|
|
3231
2102
|
const firstDay = new Date(year, 0, 1);
|
|
3232
|
-
return range(numOfDays).map((n) => nextDate(firstDay, n));
|
|
2103
|
+
return dateUtil.range(numOfDays).map((n) => dateUtil.nextDate(firstDay, n));
|
|
3233
2104
|
};
|
|
3234
2105
|
const _sfc_main$2 = {
|
|
3235
2106
|
props: {
|
|
3236
2107
|
defaultValue: {
|
|
3237
2108
|
validator(val) {
|
|
3238
|
-
return val === null || val instanceof Date && isDate(val);
|
|
2109
|
+
return val === null || val instanceof Date && dateUtil.isDate(val);
|
|
3239
2110
|
}
|
|
3240
2111
|
},
|
|
3241
2112
|
disabledDate: {},
|
|
@@ -3276,7 +2147,7 @@ const _sfc_main$2 = {
|
|
|
3276
2147
|
style["end-date"] = minYear && year === maxYear;
|
|
3277
2148
|
style["in-range"] = minYear && year >= minYear && year <= maxYear;
|
|
3278
2149
|
} else {
|
|
3279
|
-
style.current = arrayFindIndex
|
|
2150
|
+
style.current = arrayFindIndex(coerceTruthyValueToArray(this.value), (date) => date.getFullYear() === year) >= 0;
|
|
3280
2151
|
}
|
|
3281
2152
|
return style;
|
|
3282
2153
|
},
|
|
@@ -3430,19 +2301,19 @@ var _sfc_staticRenderFns$2 = [];
|
|
|
3430
2301
|
var __component__$2 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
|
|
3431
2302
|
const yearTable = __component__$2.exports;
|
|
3432
2303
|
const calcDefaultValue = (defaultValue) => {
|
|
3433
|
-
var
|
|
2304
|
+
var date;
|
|
3434
2305
|
if (Array.isArray(defaultValue)) {
|
|
3435
2306
|
return [new Date(defaultValue[0]), new Date(defaultValue[1])];
|
|
3436
2307
|
} else if (defaultValue) {
|
|
3437
|
-
|
|
3438
|
-
return [new Date(
|
|
2308
|
+
date = new Date(defaultValue);
|
|
2309
|
+
return [new Date(date), new Date(date.setFullYear(date.getFullYear() + 12))];
|
|
3439
2310
|
} else {
|
|
3440
|
-
|
|
3441
|
-
return [/* @__PURE__ */ new Date(), new Date(
|
|
2311
|
+
date = /* @__PURE__ */ new Date();
|
|
2312
|
+
return [/* @__PURE__ */ new Date(), new Date(date.setFullYear(date.getFullYear() + 12))];
|
|
3442
2313
|
}
|
|
3443
2314
|
};
|
|
3444
2315
|
const _sfc_main$1 = {
|
|
3445
|
-
mixins: [
|
|
2316
|
+
mixins: [Locale],
|
|
3446
2317
|
directives: {
|
|
3447
2318
|
Clickoutside
|
|
3448
2319
|
},
|
|
@@ -3494,8 +2365,8 @@ const _sfc_main$1 = {
|
|
|
3494
2365
|
this.minDate = null;
|
|
3495
2366
|
this.maxDate = null;
|
|
3496
2367
|
} else if (Array.isArray(newVal)) {
|
|
3497
|
-
this.minDate = newVal[0] ? (_a = toDate(newVal[0])) == null ? void 0 : _a.getFullYear() : null;
|
|
3498
|
-
this.maxDate = newVal[1] ? (_b = toDate(newVal[1])) == null ? void 0 : _b.getFullYear() : null;
|
|
2368
|
+
this.minDate = newVal[0] ? (_a = dateUtil.toDate(newVal[0])) == null ? void 0 : _a.getFullYear() : null;
|
|
2369
|
+
this.maxDate = newVal[1] ? (_b = dateUtil.toDate(newVal[1])) == null ? void 0 : _b.getFullYear() : null;
|
|
3499
2370
|
this.date = new Date(this.minDate, 0, 1);
|
|
3500
2371
|
this.rangeState.endDate = null;
|
|
3501
2372
|
}
|
|
@@ -3503,9 +2374,9 @@ const _sfc_main$1 = {
|
|
|
3503
2374
|
immediate: true
|
|
3504
2375
|
},
|
|
3505
2376
|
date(val) {
|
|
3506
|
-
const
|
|
3507
|
-
if (!this.unlinkPanels ||
|
|
3508
|
-
this.rightDate = new Date(
|
|
2377
|
+
const date = new Date(val);
|
|
2378
|
+
if (!this.unlinkPanels || date.getFullYear() + 12 > this.rightDate.getFullYear()) {
|
|
2379
|
+
this.rightDate = new Date(date.setFullYear(date.getFullYear() + 12));
|
|
3509
2380
|
}
|
|
3510
2381
|
},
|
|
3511
2382
|
defaultValue(val) {
|
|
@@ -3531,8 +2402,8 @@ const _sfc_main$1 = {
|
|
|
3531
2402
|
},
|
|
3532
2403
|
handleRangePick(val, close = true) {
|
|
3533
2404
|
const defaultTime = this.defaultTime || [];
|
|
3534
|
-
const minDate = modifyWithTimeString(val.minDate, defaultTime[0]);
|
|
3535
|
-
const maxDate = modifyWithTimeString(val.maxDate, defaultTime[1]);
|
|
2405
|
+
const minDate = dateUtil.modifyWithTimeString(val.minDate, defaultTime[0]);
|
|
2406
|
+
const maxDate = dateUtil.modifyWithTimeString(val.maxDate, defaultTime[1]);
|
|
3536
2407
|
if (this.maxDate === maxDate && this.minDate === minDate) {
|
|
3537
2408
|
return;
|
|
3538
2409
|
}
|
|
@@ -3553,13 +2424,13 @@ const _sfc_main$1 = {
|
|
|
3553
2424
|
}
|
|
3554
2425
|
},
|
|
3555
2426
|
nextYear(left = false) {
|
|
3556
|
-
const
|
|
3557
|
-
|
|
2427
|
+
const date = left || !this.unlinkPanels ? this.date : this.rightDate;
|
|
2428
|
+
date.setFullYear(date.getFullYear() + 12);
|
|
3558
2429
|
this.resetDate();
|
|
3559
2430
|
},
|
|
3560
2431
|
prevYear(left = false) {
|
|
3561
|
-
const
|
|
3562
|
-
|
|
2432
|
+
const date = left ? this.date : this.rightDate;
|
|
2433
|
+
date.setFullYear(date.getFullYear() - 12);
|
|
3563
2434
|
this.resetDate();
|
|
3564
2435
|
},
|
|
3565
2436
|
handleConfirm(visible = false) {
|