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