@weitutech/by-components 1.1.105 → 1.1.107
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/by-components.common.js +422 -368
- package/lib/by-components.umd.js +78 -24
- package/lib/by-components.umd.min.js +8 -8
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -3755,7 +3755,7 @@ __webpack_require__(1701);
|
|
|
3755
3755
|
__webpack_require__(3579);
|
|
3756
3756
|
exports.__esModule = true;
|
|
3757
3757
|
exports.validateRangeInOneMonth = exports.extractTimeFormat = exports.extractDateFormat = exports.nextYear = exports.prevYear = exports.nextMonth = exports.prevMonth = exports.changeYearMonthAndClampDate = exports.timeWithinRange = exports.limitTimeRange = exports.clearMilliseconds = exports.clearTime = exports.modifyWithTimeString = exports.modifyTime = exports.modifyDate = exports.range = exports.getRangeMinutes = exports.getMonthDays = exports.getPrevMonthLastDays = exports.getRangeHours = exports.getWeekNumber = exports.getStartDateOfMonth = exports.nextDate = exports.prevDate = exports.getFirstDayOfMonth = exports.getDayCountOfYear = exports.getDayCountOfMonth = exports.parseDate = exports.formatDate = exports.isDateObject = exports.isDate = exports.toDate = exports.getI18nSettings = undefined;
|
|
3758
|
-
var _date = __webpack_require__(
|
|
3758
|
+
var _date = __webpack_require__(7551);
|
|
3759
3759
|
var _date2 = _interopRequireDefault(_date);
|
|
3760
3760
|
var _locale = __webpack_require__(766);
|
|
3761
3761
|
function _interopRequireDefault(obj) {
|
|
@@ -20492,7 +20492,7 @@ __webpack_require__(4114);__webpack_require__(8111);__webpack_require__(1148);__
|
|
|
20492
20492
|
/******/__nested_webpack_require_604__.n=function(module){/******/var getter=module&&module.__esModule?/******/function getDefault(){return module['default'];}:/******/function getModuleExports(){return module;};/******/__nested_webpack_require_604__.d(getter,'a',getter);/******/return getter;/******/};/******//******/// Object.prototype.hasOwnProperty.call
|
|
20493
20493
|
/******/__nested_webpack_require_604__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};/******//******/// __webpack_public_path__
|
|
20494
20494
|
/******/__nested_webpack_require_604__.p="/dist/";/******//******//******/// Load entry module and return exports
|
|
20495
|
-
/******/return __nested_webpack_require_604__(__nested_webpack_require_604__.s=46);/******/}/************************************************************************//******/([(/* 0 *//***/function(module,exports){module.exports=__webpack_require__(1538);/***/}),(/* 1 *//***/function(module,exports){module.exports=__webpack_require__(125);/***/}),(/* 2 *//***/function(module,exports){module.exports=__webpack_require__(2101);/***/}),(/* 3 *//***/function(module,exports){module.exports=__webpack_require__(6656);/***/}),(/* 4 *//***/function(module,exports){module.exports=__webpack_require__(9886);/***/}),(/* 5 *//***/function(module,exports){module.exports=__webpack_require__(2712);/***/}),(/* 6 *//***/function(module,exports){module.exports=__webpack_require__(1719);/***/}),(/* 7 *//***/function(module,exports){module.exports=__webpack_require__(7873);/***/}),(/* 8 *//***/function(module,exports){module.exports=__webpack_require__(1987);/***/}),(/* 9 *//***/function(module,exports){module.exports=__webpack_require__(3840);/***/}),(/* 10 *//***/function(module,exports){module.exports=__webpack_require__(6346);/***/}),(/* 11 *//***/function(module,exports){module.exports=__webpack_require__(8235);/***/}),(/* 12 *//***/function(module,exports){module.exports=__webpack_require__(766);/***/}),(/* 13 *//***/function(module,exports){module.exports=__webpack_require__(7579);/***/}),(/* 14 *//***/function(module,exports){module.exports=__webpack_require__(4546);/***/}),(/* 15 *//***/function(module,exports){module.exports=__webpack_require__(8212);/***/}),(/* 16 *//***/function(module,exports){module.exports=__webpack_require__(2220);/***/}),(/* 17 *//***/function(module,exports){module.exports=__webpack_require__(8283);/***/}),(/* 18 *//***/function(module,exports){module.exports=__webpack_require__(4817);/***/}),(/* 19 *//***/function(module,exports){module.exports=__webpack_require__(4360);/***/}),(/* 20 *//***/function(module,exports){module.exports=__webpack_require__(
|
|
20495
|
+
/******/return __nested_webpack_require_604__(__nested_webpack_require_604__.s=46);/******/}/************************************************************************//******/([(/* 0 *//***/function(module,exports){module.exports=__webpack_require__(1538);/***/}),(/* 1 *//***/function(module,exports){module.exports=__webpack_require__(125);/***/}),(/* 2 *//***/function(module,exports){module.exports=__webpack_require__(2101);/***/}),(/* 3 *//***/function(module,exports){module.exports=__webpack_require__(6656);/***/}),(/* 4 *//***/function(module,exports){module.exports=__webpack_require__(9886);/***/}),(/* 5 *//***/function(module,exports){module.exports=__webpack_require__(2712);/***/}),(/* 6 *//***/function(module,exports){module.exports=__webpack_require__(1719);/***/}),(/* 7 *//***/function(module,exports){module.exports=__webpack_require__(7873);/***/}),(/* 8 *//***/function(module,exports){module.exports=__webpack_require__(1987);/***/}),(/* 9 *//***/function(module,exports){module.exports=__webpack_require__(3840);/***/}),(/* 10 *//***/function(module,exports){module.exports=__webpack_require__(6346);/***/}),(/* 11 *//***/function(module,exports){module.exports=__webpack_require__(8235);/***/}),(/* 12 *//***/function(module,exports){module.exports=__webpack_require__(766);/***/}),(/* 13 *//***/function(module,exports){module.exports=__webpack_require__(7579);/***/}),(/* 14 *//***/function(module,exports){module.exports=__webpack_require__(4546);/***/}),(/* 15 *//***/function(module,exports){module.exports=__webpack_require__(8212);/***/}),(/* 16 *//***/function(module,exports){module.exports=__webpack_require__(2220);/***/}),(/* 17 *//***/function(module,exports){module.exports=__webpack_require__(8283);/***/}),(/* 18 *//***/function(module,exports){module.exports=__webpack_require__(4817);/***/}),(/* 19 *//***/function(module,exports){module.exports=__webpack_require__(4360);/***/}),(/* 20 *//***/function(module,exports){module.exports=__webpack_require__(7551);/***/}),(/* 21 *//***/function(module,exports){module.exports=__webpack_require__(9537);/***/}),(/* 22 *//***/function(module,exports){module.exports=__webpack_require__(8107);/***/}),(/* 23 *//***/function(module,exports){module.exports=__webpack_require__(3550);/***/}),(/* 24 *//***/function(module,exports){module.exports=__webpack_require__(3930);/***/}),(/* 25 *//***/function(module,exports){module.exports=__webpack_require__(9764);/***/}),(/* 26 *//***/function(module,exports){module.exports=__webpack_require__(9528);/***/}),(/* 27 *//***/function(module,exports){module.exports=__webpack_require__(4581);/***/}),(/* 28 *//***/function(module,exports){module.exports=__webpack_require__(8540);/***/}),(/* 29 *//***/function(module,exports){module.exports=__webpack_require__(8101);/***/}),(/* 30 *//***/function(module,exports){module.exports=__webpack_require__(9983);/***/}),(/* 31 *//***/function(module,exports){module.exports=__webpack_require__(8242);/***/}),(/* 32 *//***/function(module,exports){module.exports=__webpack_require__(2908);/***/}),(/* 33 *//***/function(module,exports){module.exports=__webpack_require__(1521);/***/}),(/* 34 *//***/function(module,exports){module.exports=__webpack_require__(4699);/***/}),(/* 35 *//***/function(module,exports){module.exports=__webpack_require__(3024);/***/}),(/* 36 *//***/function(module,exports){module.exports=__webpack_require__(8518);/***/}),(/* 37 *//***/function(module,exports){module.exports=__webpack_require__(9087);/***/}),(/* 38 *//***/function(module,exports){module.exports=__webpack_require__(1722);/***/}),(/* 39 *//***/function(module,exports){module.exports=__webpack_require__(4147);/***/}),(/* 40 *//***/function(module,exports){module.exports=__webpack_require__(2105);/***/}),(/* 41 *//***/function(module,exports){module.exports=__webpack_require__(8122);/***/}),(/* 42 *//***/function(module,exports){module.exports=__webpack_require__(4565);/***/}),(/* 43 *//***/function(module,exports){module.exports=__webpack_require__(3780);/***/}),(/* 44 *//***/function(module,exports){module.exports=__webpack_require__(9352);/***/}),(/* 45 *//***/function(module,exports){module.exports=__webpack_require__(270);/***/}),(/* 46 *//***/function(module,exports,__nested_webpack_require_8292__){module.exports=__nested_webpack_require_8292__(47);/***/}),(/* 47 *//***/function(module,__nested_webpack_exports__,__nested_webpack_require_8410__){"use strict";__nested_webpack_require_8410__.r(__nested_webpack_exports__);// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
|
|
20496
20496
|
var pagervue_type_template_id_7274f267_render=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("ul",{staticClass:"el-pager",on:{click:_vm.onPagerClick}},[_vm.pageCount>0?_c("li",{staticClass:"number",class:{active:_vm.currentPage===1,disabled:_vm.disabled}},[_vm._v("1")]):_vm._e(),_vm.showPrevMore?_c("li",{staticClass:"el-icon more btn-quickprev",class:[_vm.quickprevIconClass,{disabled:_vm.disabled}],on:{mouseenter:function($event){_vm.onMouseenter("left");},mouseleave:function($event){_vm.quickprevIconClass="el-icon-more";}}}):_vm._e(),_vm._l(_vm.pagers,function(pager){return _c("li",{key:pager,staticClass:"number",class:{active:_vm.currentPage===pager,disabled:_vm.disabled}},[_vm._v(_vm._s(pager))]);}),_vm.showNextMore?_c("li",{staticClass:"el-icon more btn-quicknext",class:[_vm.quicknextIconClass,{disabled:_vm.disabled}],on:{mouseenter:function($event){_vm.onMouseenter("right");},mouseleave:function($event){_vm.quicknextIconClass="el-icon-more";}}}):_vm._e(),_vm.pageCount>1?_c("li",{staticClass:"number",class:{active:_vm.currentPage===_vm.pageCount,disabled:_vm.disabled}},[_vm._v(_vm._s(_vm.pageCount))]):_vm._e()],2);};var staticRenderFns=[];pagervue_type_template_id_7274f267_render._withStripped=true;// CONCATENATED MODULE: ./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
|
|
20497
20497
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=script&lang=js&
|
|
20498
20498
|
//
|
|
@@ -31129,6 +31129,363 @@ module.exports = function (fn) {
|
|
|
31129
31129
|
|
|
31130
31130
|
/***/ }),
|
|
31131
31131
|
|
|
31132
|
+
/***/ 7551:
|
|
31133
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
31134
|
+
|
|
31135
|
+
"use strict";
|
|
31136
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
31137
|
+
|
|
31138
|
+
/* Modified from https://github.com/taylorhakes/fecha
|
|
31139
|
+
*
|
|
31140
|
+
* The MIT License (MIT)
|
|
31141
|
+
*
|
|
31142
|
+
* Copyright (c) 2015 Taylor Hakes
|
|
31143
|
+
*
|
|
31144
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31145
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
31146
|
+
* in the Software without restriction, including without limitation the rights
|
|
31147
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31148
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
31149
|
+
* furnished to do so, subject to the following conditions:
|
|
31150
|
+
*
|
|
31151
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
31152
|
+
* copies or substantial portions of the Software.
|
|
31153
|
+
*
|
|
31154
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31155
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31156
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31157
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31158
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31159
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31160
|
+
* SOFTWARE.
|
|
31161
|
+
*/
|
|
31162
|
+
|
|
31163
|
+
/*eslint-disable*/
|
|
31164
|
+
// 把 YYYY-MM-DD 改成了 yyyy-MM-dd
|
|
31165
|
+
__webpack_require__(4114);
|
|
31166
|
+
(function (main) {
|
|
31167
|
+
'use strict';
|
|
31168
|
+
|
|
31169
|
+
/**
|
|
31170
|
+
* Parse or format dates
|
|
31171
|
+
* @class fecha
|
|
31172
|
+
*/
|
|
31173
|
+
var fecha = {};
|
|
31174
|
+
var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
31175
|
+
var twoDigits = '\\d\\d?';
|
|
31176
|
+
var threeDigits = '\\d{3}';
|
|
31177
|
+
var fourDigits = '\\d{4}';
|
|
31178
|
+
var word = '[^\\s]+';
|
|
31179
|
+
var literal = /\[([^]*?)\]/gm;
|
|
31180
|
+
var noop = function noop() {};
|
|
31181
|
+
function regexEscape(str) {
|
|
31182
|
+
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
31183
|
+
}
|
|
31184
|
+
function shorten(arr, sLen) {
|
|
31185
|
+
var newArr = [];
|
|
31186
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
31187
|
+
newArr.push(arr[i].substr(0, sLen));
|
|
31188
|
+
}
|
|
31189
|
+
return newArr;
|
|
31190
|
+
}
|
|
31191
|
+
function monthUpdate(arrName) {
|
|
31192
|
+
return function (d, v, i18n) {
|
|
31193
|
+
var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
|
|
31194
|
+
if (~index) {
|
|
31195
|
+
d.month = index;
|
|
31196
|
+
}
|
|
31197
|
+
};
|
|
31198
|
+
}
|
|
31199
|
+
function pad(val, len) {
|
|
31200
|
+
val = String(val);
|
|
31201
|
+
len = len || 2;
|
|
31202
|
+
while (val.length < len) {
|
|
31203
|
+
val = '0' + val;
|
|
31204
|
+
}
|
|
31205
|
+
return val;
|
|
31206
|
+
}
|
|
31207
|
+
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
31208
|
+
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
31209
|
+
var monthNamesShort = shorten(monthNames, 3);
|
|
31210
|
+
var dayNamesShort = shorten(dayNames, 3);
|
|
31211
|
+
fecha.i18n = {
|
|
31212
|
+
dayNamesShort: dayNamesShort,
|
|
31213
|
+
dayNames: dayNames,
|
|
31214
|
+
monthNamesShort: monthNamesShort,
|
|
31215
|
+
monthNames: monthNames,
|
|
31216
|
+
amPm: ['am', 'pm'],
|
|
31217
|
+
DoFn: function DoFn(D) {
|
|
31218
|
+
return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
|
|
31219
|
+
}
|
|
31220
|
+
};
|
|
31221
|
+
var formatFlags = {
|
|
31222
|
+
D: function D(dateObj) {
|
|
31223
|
+
return dateObj.getDay();
|
|
31224
|
+
},
|
|
31225
|
+
DD: function DD(dateObj) {
|
|
31226
|
+
return pad(dateObj.getDay());
|
|
31227
|
+
},
|
|
31228
|
+
Do: function Do(dateObj, i18n) {
|
|
31229
|
+
return i18n.DoFn(dateObj.getDate());
|
|
31230
|
+
},
|
|
31231
|
+
d: function d(dateObj) {
|
|
31232
|
+
return dateObj.getDate();
|
|
31233
|
+
},
|
|
31234
|
+
dd: function dd(dateObj) {
|
|
31235
|
+
return pad(dateObj.getDate());
|
|
31236
|
+
},
|
|
31237
|
+
ddd: function ddd(dateObj, i18n) {
|
|
31238
|
+
return i18n.dayNamesShort[dateObj.getDay()];
|
|
31239
|
+
},
|
|
31240
|
+
dddd: function dddd(dateObj, i18n) {
|
|
31241
|
+
return i18n.dayNames[dateObj.getDay()];
|
|
31242
|
+
},
|
|
31243
|
+
M: function M(dateObj) {
|
|
31244
|
+
return dateObj.getMonth() + 1;
|
|
31245
|
+
},
|
|
31246
|
+
MM: function MM(dateObj) {
|
|
31247
|
+
return pad(dateObj.getMonth() + 1);
|
|
31248
|
+
},
|
|
31249
|
+
MMM: function MMM(dateObj, i18n) {
|
|
31250
|
+
return i18n.monthNamesShort[dateObj.getMonth()];
|
|
31251
|
+
},
|
|
31252
|
+
MMMM: function MMMM(dateObj, i18n) {
|
|
31253
|
+
return i18n.monthNames[dateObj.getMonth()];
|
|
31254
|
+
},
|
|
31255
|
+
yy: function yy(dateObj) {
|
|
31256
|
+
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
31257
|
+
},
|
|
31258
|
+
yyyy: function yyyy(dateObj) {
|
|
31259
|
+
return pad(dateObj.getFullYear(), 4);
|
|
31260
|
+
},
|
|
31261
|
+
h: function h(dateObj) {
|
|
31262
|
+
return dateObj.getHours() % 12 || 12;
|
|
31263
|
+
},
|
|
31264
|
+
hh: function hh(dateObj) {
|
|
31265
|
+
return pad(dateObj.getHours() % 12 || 12);
|
|
31266
|
+
},
|
|
31267
|
+
H: function H(dateObj) {
|
|
31268
|
+
return dateObj.getHours();
|
|
31269
|
+
},
|
|
31270
|
+
HH: function HH(dateObj) {
|
|
31271
|
+
return pad(dateObj.getHours());
|
|
31272
|
+
},
|
|
31273
|
+
m: function m(dateObj) {
|
|
31274
|
+
return dateObj.getMinutes();
|
|
31275
|
+
},
|
|
31276
|
+
mm: function mm(dateObj) {
|
|
31277
|
+
return pad(dateObj.getMinutes());
|
|
31278
|
+
},
|
|
31279
|
+
s: function s(dateObj) {
|
|
31280
|
+
return dateObj.getSeconds();
|
|
31281
|
+
},
|
|
31282
|
+
ss: function ss(dateObj) {
|
|
31283
|
+
return pad(dateObj.getSeconds());
|
|
31284
|
+
},
|
|
31285
|
+
S: function S(dateObj) {
|
|
31286
|
+
return Math.round(dateObj.getMilliseconds() / 100);
|
|
31287
|
+
},
|
|
31288
|
+
SS: function SS(dateObj) {
|
|
31289
|
+
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
31290
|
+
},
|
|
31291
|
+
SSS: function SSS(dateObj) {
|
|
31292
|
+
return pad(dateObj.getMilliseconds(), 3);
|
|
31293
|
+
},
|
|
31294
|
+
a: function a(dateObj, i18n) {
|
|
31295
|
+
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
|
|
31296
|
+
},
|
|
31297
|
+
A: function A(dateObj, i18n) {
|
|
31298
|
+
return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
|
|
31299
|
+
},
|
|
31300
|
+
ZZ: function ZZ(dateObj) {
|
|
31301
|
+
var o = dateObj.getTimezoneOffset();
|
|
31302
|
+
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
31303
|
+
}
|
|
31304
|
+
};
|
|
31305
|
+
var parseFlags = {
|
|
31306
|
+
d: [twoDigits, function (d, v) {
|
|
31307
|
+
d.day = v;
|
|
31308
|
+
}],
|
|
31309
|
+
Do: [twoDigits + word, function (d, v) {
|
|
31310
|
+
d.day = parseInt(v, 10);
|
|
31311
|
+
}],
|
|
31312
|
+
M: [twoDigits, function (d, v) {
|
|
31313
|
+
d.month = v - 1;
|
|
31314
|
+
}],
|
|
31315
|
+
yy: [twoDigits, function (d, v) {
|
|
31316
|
+
var da = new Date(),
|
|
31317
|
+
cent = +('' + da.getFullYear()).substr(0, 2);
|
|
31318
|
+
d.year = '' + (v > 68 ? cent - 1 : cent) + v;
|
|
31319
|
+
}],
|
|
31320
|
+
h: [twoDigits, function (d, v) {
|
|
31321
|
+
d.hour = v;
|
|
31322
|
+
}],
|
|
31323
|
+
m: [twoDigits, function (d, v) {
|
|
31324
|
+
d.minute = v;
|
|
31325
|
+
}],
|
|
31326
|
+
s: [twoDigits, function (d, v) {
|
|
31327
|
+
d.second = v;
|
|
31328
|
+
}],
|
|
31329
|
+
yyyy: [fourDigits, function (d, v) {
|
|
31330
|
+
d.year = v;
|
|
31331
|
+
}],
|
|
31332
|
+
S: ['\\d', function (d, v) {
|
|
31333
|
+
d.millisecond = v * 100;
|
|
31334
|
+
}],
|
|
31335
|
+
SS: ['\\d{2}', function (d, v) {
|
|
31336
|
+
d.millisecond = v * 10;
|
|
31337
|
+
}],
|
|
31338
|
+
SSS: [threeDigits, function (d, v) {
|
|
31339
|
+
d.millisecond = v;
|
|
31340
|
+
}],
|
|
31341
|
+
D: [twoDigits, noop],
|
|
31342
|
+
ddd: [word, noop],
|
|
31343
|
+
MMM: [word, monthUpdate('monthNamesShort')],
|
|
31344
|
+
MMMM: [word, monthUpdate('monthNames')],
|
|
31345
|
+
a: [word, function (d, v, i18n) {
|
|
31346
|
+
var val = v.toLowerCase();
|
|
31347
|
+
if (val === i18n.amPm[0]) {
|
|
31348
|
+
d.isPm = false;
|
|
31349
|
+
} else if (val === i18n.amPm[1]) {
|
|
31350
|
+
d.isPm = true;
|
|
31351
|
+
}
|
|
31352
|
+
}],
|
|
31353
|
+
ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
|
|
31354
|
+
var parts = (v + '').match(/([+-]|\d\d)/gi),
|
|
31355
|
+
minutes;
|
|
31356
|
+
if (parts) {
|
|
31357
|
+
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
31358
|
+
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
|
|
31359
|
+
}
|
|
31360
|
+
}]
|
|
31361
|
+
};
|
|
31362
|
+
parseFlags.dd = parseFlags.d;
|
|
31363
|
+
parseFlags.dddd = parseFlags.ddd;
|
|
31364
|
+
parseFlags.DD = parseFlags.D;
|
|
31365
|
+
parseFlags.mm = parseFlags.m;
|
|
31366
|
+
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
31367
|
+
parseFlags.MM = parseFlags.M;
|
|
31368
|
+
parseFlags.ss = parseFlags.s;
|
|
31369
|
+
parseFlags.A = parseFlags.a;
|
|
31370
|
+
|
|
31371
|
+
// Some common format strings
|
|
31372
|
+
fecha.masks = {
|
|
31373
|
+
default: 'ddd MMM dd yyyy HH:mm:ss',
|
|
31374
|
+
shortDate: 'M/D/yy',
|
|
31375
|
+
mediumDate: 'MMM d, yyyy',
|
|
31376
|
+
longDate: 'MMMM d, yyyy',
|
|
31377
|
+
fullDate: 'dddd, MMMM d, yyyy',
|
|
31378
|
+
shortTime: 'HH:mm',
|
|
31379
|
+
mediumTime: 'HH:mm:ss',
|
|
31380
|
+
longTime: 'HH:mm:ss.SSS'
|
|
31381
|
+
};
|
|
31382
|
+
|
|
31383
|
+
/***
|
|
31384
|
+
* Format a date
|
|
31385
|
+
* @method format
|
|
31386
|
+
* @param {Date|number} dateObj
|
|
31387
|
+
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
|
|
31388
|
+
*/
|
|
31389
|
+
fecha.format = function (dateObj, mask, i18nSettings) {
|
|
31390
|
+
var i18n = i18nSettings || fecha.i18n;
|
|
31391
|
+
if (typeof dateObj === 'number') {
|
|
31392
|
+
dateObj = new Date(dateObj);
|
|
31393
|
+
}
|
|
31394
|
+
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
31395
|
+
throw new Error('Invalid Date in fecha.format');
|
|
31396
|
+
}
|
|
31397
|
+
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
31398
|
+
var literals = [];
|
|
31399
|
+
|
|
31400
|
+
// Make literals inactive by replacing them with ??
|
|
31401
|
+
mask = mask.replace(literal, function ($0, $1) {
|
|
31402
|
+
literals.push($1);
|
|
31403
|
+
return '@@@';
|
|
31404
|
+
});
|
|
31405
|
+
// Apply formatting rules
|
|
31406
|
+
mask = mask.replace(token, function ($0) {
|
|
31407
|
+
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
|
|
31408
|
+
});
|
|
31409
|
+
// Inline literal values back into the formatted value
|
|
31410
|
+
return mask.replace(/@@@/g, function () {
|
|
31411
|
+
return literals.shift();
|
|
31412
|
+
});
|
|
31413
|
+
};
|
|
31414
|
+
|
|
31415
|
+
/**
|
|
31416
|
+
* Parse a date string into an object, changes - into /
|
|
31417
|
+
* @method parse
|
|
31418
|
+
* @param {string} dateStr Date string
|
|
31419
|
+
* @param {string} format Date parse format
|
|
31420
|
+
* @returns {Date|boolean}
|
|
31421
|
+
*/
|
|
31422
|
+
fecha.parse = function (dateStr, format, i18nSettings) {
|
|
31423
|
+
var i18n = i18nSettings || fecha.i18n;
|
|
31424
|
+
if (typeof format !== 'string') {
|
|
31425
|
+
throw new Error('Invalid format in fecha.parse');
|
|
31426
|
+
}
|
|
31427
|
+
format = fecha.masks[format] || format;
|
|
31428
|
+
|
|
31429
|
+
// Avoid regular expression denial of service, fail early for really long strings
|
|
31430
|
+
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
31431
|
+
if (dateStr.length > 1000) {
|
|
31432
|
+
return null;
|
|
31433
|
+
}
|
|
31434
|
+
var dateInfo = {};
|
|
31435
|
+
var parseInfo = [];
|
|
31436
|
+
var literals = [];
|
|
31437
|
+
format = format.replace(literal, function ($0, $1) {
|
|
31438
|
+
literals.push($1);
|
|
31439
|
+
return '@@@';
|
|
31440
|
+
});
|
|
31441
|
+
var newFormat = regexEscape(format).replace(token, function ($0) {
|
|
31442
|
+
if (parseFlags[$0]) {
|
|
31443
|
+
var info = parseFlags[$0];
|
|
31444
|
+
parseInfo.push(info[1]);
|
|
31445
|
+
return '(' + info[0] + ')';
|
|
31446
|
+
}
|
|
31447
|
+
return $0;
|
|
31448
|
+
});
|
|
31449
|
+
newFormat = newFormat.replace(/@@@/g, function () {
|
|
31450
|
+
return literals.shift();
|
|
31451
|
+
});
|
|
31452
|
+
var matches = dateStr.match(new RegExp(newFormat, 'i'));
|
|
31453
|
+
if (!matches) {
|
|
31454
|
+
return null;
|
|
31455
|
+
}
|
|
31456
|
+
for (var i = 1; i < matches.length; i++) {
|
|
31457
|
+
parseInfo[i - 1](dateInfo, matches[i], i18n);
|
|
31458
|
+
}
|
|
31459
|
+
var today = new Date();
|
|
31460
|
+
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
31461
|
+
dateInfo.hour = +dateInfo.hour + 12;
|
|
31462
|
+
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
31463
|
+
dateInfo.hour = 0;
|
|
31464
|
+
}
|
|
31465
|
+
var date;
|
|
31466
|
+
if (dateInfo.timezoneOffset != null) {
|
|
31467
|
+
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
31468
|
+
date = 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));
|
|
31469
|
+
} else {
|
|
31470
|
+
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
31471
|
+
}
|
|
31472
|
+
return date;
|
|
31473
|
+
};
|
|
31474
|
+
|
|
31475
|
+
/* istanbul ignore next */
|
|
31476
|
+
if ( true && module.exports) {
|
|
31477
|
+
module.exports = fecha;
|
|
31478
|
+
} else if (true) {
|
|
31479
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
31480
|
+
return fecha;
|
|
31481
|
+
}).call(exports, __webpack_require__, exports, module),
|
|
31482
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
31483
|
+
} else // removed by dead control flow
|
|
31484
|
+
{}
|
|
31485
|
+
})(undefined);
|
|
31486
|
+
|
|
31487
|
+
/***/ }),
|
|
31488
|
+
|
|
31132
31489
|
/***/ 7579:
|
|
31133
31490
|
/***/ (function(module) {
|
|
31134
31491
|
|
|
@@ -51473,363 +51830,6 @@ __webpack_require__(8237);
|
|
|
51473
51830
|
|
|
51474
51831
|
/***/ }),
|
|
51475
51832
|
|
|
51476
|
-
/***/ 9141:
|
|
51477
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
51478
|
-
|
|
51479
|
-
"use strict";
|
|
51480
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
51481
|
-
|
|
51482
|
-
/* Modified from https://github.com/taylorhakes/fecha
|
|
51483
|
-
*
|
|
51484
|
-
* The MIT License (MIT)
|
|
51485
|
-
*
|
|
51486
|
-
* Copyright (c) 2015 Taylor Hakes
|
|
51487
|
-
*
|
|
51488
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
51489
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
51490
|
-
* in the Software without restriction, including without limitation the rights
|
|
51491
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
51492
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
51493
|
-
* furnished to do so, subject to the following conditions:
|
|
51494
|
-
*
|
|
51495
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
51496
|
-
* copies or substantial portions of the Software.
|
|
51497
|
-
*
|
|
51498
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51499
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
51500
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
51501
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
51502
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
51503
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
51504
|
-
* SOFTWARE.
|
|
51505
|
-
*/
|
|
51506
|
-
|
|
51507
|
-
/*eslint-disable*/
|
|
51508
|
-
// 把 YYYY-MM-DD 改成了 yyyy-MM-dd
|
|
51509
|
-
__webpack_require__(4114);
|
|
51510
|
-
(function (main) {
|
|
51511
|
-
'use strict';
|
|
51512
|
-
|
|
51513
|
-
/**
|
|
51514
|
-
* Parse or format dates
|
|
51515
|
-
* @class fecha
|
|
51516
|
-
*/
|
|
51517
|
-
var fecha = {};
|
|
51518
|
-
var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
51519
|
-
var twoDigits = '\\d\\d?';
|
|
51520
|
-
var threeDigits = '\\d{3}';
|
|
51521
|
-
var fourDigits = '\\d{4}';
|
|
51522
|
-
var word = '[^\\s]+';
|
|
51523
|
-
var literal = /\[([^]*?)\]/gm;
|
|
51524
|
-
var noop = function noop() {};
|
|
51525
|
-
function regexEscape(str) {
|
|
51526
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
51527
|
-
}
|
|
51528
|
-
function shorten(arr, sLen) {
|
|
51529
|
-
var newArr = [];
|
|
51530
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
51531
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
51532
|
-
}
|
|
51533
|
-
return newArr;
|
|
51534
|
-
}
|
|
51535
|
-
function monthUpdate(arrName) {
|
|
51536
|
-
return function (d, v, i18n) {
|
|
51537
|
-
var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
|
|
51538
|
-
if (~index) {
|
|
51539
|
-
d.month = index;
|
|
51540
|
-
}
|
|
51541
|
-
};
|
|
51542
|
-
}
|
|
51543
|
-
function pad(val, len) {
|
|
51544
|
-
val = String(val);
|
|
51545
|
-
len = len || 2;
|
|
51546
|
-
while (val.length < len) {
|
|
51547
|
-
val = '0' + val;
|
|
51548
|
-
}
|
|
51549
|
-
return val;
|
|
51550
|
-
}
|
|
51551
|
-
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
51552
|
-
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
51553
|
-
var monthNamesShort = shorten(monthNames, 3);
|
|
51554
|
-
var dayNamesShort = shorten(dayNames, 3);
|
|
51555
|
-
fecha.i18n = {
|
|
51556
|
-
dayNamesShort: dayNamesShort,
|
|
51557
|
-
dayNames: dayNames,
|
|
51558
|
-
monthNamesShort: monthNamesShort,
|
|
51559
|
-
monthNames: monthNames,
|
|
51560
|
-
amPm: ['am', 'pm'],
|
|
51561
|
-
DoFn: function DoFn(D) {
|
|
51562
|
-
return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
|
|
51563
|
-
}
|
|
51564
|
-
};
|
|
51565
|
-
var formatFlags = {
|
|
51566
|
-
D: function D(dateObj) {
|
|
51567
|
-
return dateObj.getDay();
|
|
51568
|
-
},
|
|
51569
|
-
DD: function DD(dateObj) {
|
|
51570
|
-
return pad(dateObj.getDay());
|
|
51571
|
-
},
|
|
51572
|
-
Do: function Do(dateObj, i18n) {
|
|
51573
|
-
return i18n.DoFn(dateObj.getDate());
|
|
51574
|
-
},
|
|
51575
|
-
d: function d(dateObj) {
|
|
51576
|
-
return dateObj.getDate();
|
|
51577
|
-
},
|
|
51578
|
-
dd: function dd(dateObj) {
|
|
51579
|
-
return pad(dateObj.getDate());
|
|
51580
|
-
},
|
|
51581
|
-
ddd: function ddd(dateObj, i18n) {
|
|
51582
|
-
return i18n.dayNamesShort[dateObj.getDay()];
|
|
51583
|
-
},
|
|
51584
|
-
dddd: function dddd(dateObj, i18n) {
|
|
51585
|
-
return i18n.dayNames[dateObj.getDay()];
|
|
51586
|
-
},
|
|
51587
|
-
M: function M(dateObj) {
|
|
51588
|
-
return dateObj.getMonth() + 1;
|
|
51589
|
-
},
|
|
51590
|
-
MM: function MM(dateObj) {
|
|
51591
|
-
return pad(dateObj.getMonth() + 1);
|
|
51592
|
-
},
|
|
51593
|
-
MMM: function MMM(dateObj, i18n) {
|
|
51594
|
-
return i18n.monthNamesShort[dateObj.getMonth()];
|
|
51595
|
-
},
|
|
51596
|
-
MMMM: function MMMM(dateObj, i18n) {
|
|
51597
|
-
return i18n.monthNames[dateObj.getMonth()];
|
|
51598
|
-
},
|
|
51599
|
-
yy: function yy(dateObj) {
|
|
51600
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
51601
|
-
},
|
|
51602
|
-
yyyy: function yyyy(dateObj) {
|
|
51603
|
-
return pad(dateObj.getFullYear(), 4);
|
|
51604
|
-
},
|
|
51605
|
-
h: function h(dateObj) {
|
|
51606
|
-
return dateObj.getHours() % 12 || 12;
|
|
51607
|
-
},
|
|
51608
|
-
hh: function hh(dateObj) {
|
|
51609
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
51610
|
-
},
|
|
51611
|
-
H: function H(dateObj) {
|
|
51612
|
-
return dateObj.getHours();
|
|
51613
|
-
},
|
|
51614
|
-
HH: function HH(dateObj) {
|
|
51615
|
-
return pad(dateObj.getHours());
|
|
51616
|
-
},
|
|
51617
|
-
m: function m(dateObj) {
|
|
51618
|
-
return dateObj.getMinutes();
|
|
51619
|
-
},
|
|
51620
|
-
mm: function mm(dateObj) {
|
|
51621
|
-
return pad(dateObj.getMinutes());
|
|
51622
|
-
},
|
|
51623
|
-
s: function s(dateObj) {
|
|
51624
|
-
return dateObj.getSeconds();
|
|
51625
|
-
},
|
|
51626
|
-
ss: function ss(dateObj) {
|
|
51627
|
-
return pad(dateObj.getSeconds());
|
|
51628
|
-
},
|
|
51629
|
-
S: function S(dateObj) {
|
|
51630
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
51631
|
-
},
|
|
51632
|
-
SS: function SS(dateObj) {
|
|
51633
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
51634
|
-
},
|
|
51635
|
-
SSS: function SSS(dateObj) {
|
|
51636
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
51637
|
-
},
|
|
51638
|
-
a: function a(dateObj, i18n) {
|
|
51639
|
-
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
|
|
51640
|
-
},
|
|
51641
|
-
A: function A(dateObj, i18n) {
|
|
51642
|
-
return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
|
|
51643
|
-
},
|
|
51644
|
-
ZZ: function ZZ(dateObj) {
|
|
51645
|
-
var o = dateObj.getTimezoneOffset();
|
|
51646
|
-
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
51647
|
-
}
|
|
51648
|
-
};
|
|
51649
|
-
var parseFlags = {
|
|
51650
|
-
d: [twoDigits, function (d, v) {
|
|
51651
|
-
d.day = v;
|
|
51652
|
-
}],
|
|
51653
|
-
Do: [twoDigits + word, function (d, v) {
|
|
51654
|
-
d.day = parseInt(v, 10);
|
|
51655
|
-
}],
|
|
51656
|
-
M: [twoDigits, function (d, v) {
|
|
51657
|
-
d.month = v - 1;
|
|
51658
|
-
}],
|
|
51659
|
-
yy: [twoDigits, function (d, v) {
|
|
51660
|
-
var da = new Date(),
|
|
51661
|
-
cent = +('' + da.getFullYear()).substr(0, 2);
|
|
51662
|
-
d.year = '' + (v > 68 ? cent - 1 : cent) + v;
|
|
51663
|
-
}],
|
|
51664
|
-
h: [twoDigits, function (d, v) {
|
|
51665
|
-
d.hour = v;
|
|
51666
|
-
}],
|
|
51667
|
-
m: [twoDigits, function (d, v) {
|
|
51668
|
-
d.minute = v;
|
|
51669
|
-
}],
|
|
51670
|
-
s: [twoDigits, function (d, v) {
|
|
51671
|
-
d.second = v;
|
|
51672
|
-
}],
|
|
51673
|
-
yyyy: [fourDigits, function (d, v) {
|
|
51674
|
-
d.year = v;
|
|
51675
|
-
}],
|
|
51676
|
-
S: ['\\d', function (d, v) {
|
|
51677
|
-
d.millisecond = v * 100;
|
|
51678
|
-
}],
|
|
51679
|
-
SS: ['\\d{2}', function (d, v) {
|
|
51680
|
-
d.millisecond = v * 10;
|
|
51681
|
-
}],
|
|
51682
|
-
SSS: [threeDigits, function (d, v) {
|
|
51683
|
-
d.millisecond = v;
|
|
51684
|
-
}],
|
|
51685
|
-
D: [twoDigits, noop],
|
|
51686
|
-
ddd: [word, noop],
|
|
51687
|
-
MMM: [word, monthUpdate('monthNamesShort')],
|
|
51688
|
-
MMMM: [word, monthUpdate('monthNames')],
|
|
51689
|
-
a: [word, function (d, v, i18n) {
|
|
51690
|
-
var val = v.toLowerCase();
|
|
51691
|
-
if (val === i18n.amPm[0]) {
|
|
51692
|
-
d.isPm = false;
|
|
51693
|
-
} else if (val === i18n.amPm[1]) {
|
|
51694
|
-
d.isPm = true;
|
|
51695
|
-
}
|
|
51696
|
-
}],
|
|
51697
|
-
ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
|
|
51698
|
-
var parts = (v + '').match(/([+-]|\d\d)/gi),
|
|
51699
|
-
minutes;
|
|
51700
|
-
if (parts) {
|
|
51701
|
-
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
51702
|
-
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
|
|
51703
|
-
}
|
|
51704
|
-
}]
|
|
51705
|
-
};
|
|
51706
|
-
parseFlags.dd = parseFlags.d;
|
|
51707
|
-
parseFlags.dddd = parseFlags.ddd;
|
|
51708
|
-
parseFlags.DD = parseFlags.D;
|
|
51709
|
-
parseFlags.mm = parseFlags.m;
|
|
51710
|
-
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
51711
|
-
parseFlags.MM = parseFlags.M;
|
|
51712
|
-
parseFlags.ss = parseFlags.s;
|
|
51713
|
-
parseFlags.A = parseFlags.a;
|
|
51714
|
-
|
|
51715
|
-
// Some common format strings
|
|
51716
|
-
fecha.masks = {
|
|
51717
|
-
default: 'ddd MMM dd yyyy HH:mm:ss',
|
|
51718
|
-
shortDate: 'M/D/yy',
|
|
51719
|
-
mediumDate: 'MMM d, yyyy',
|
|
51720
|
-
longDate: 'MMMM d, yyyy',
|
|
51721
|
-
fullDate: 'dddd, MMMM d, yyyy',
|
|
51722
|
-
shortTime: 'HH:mm',
|
|
51723
|
-
mediumTime: 'HH:mm:ss',
|
|
51724
|
-
longTime: 'HH:mm:ss.SSS'
|
|
51725
|
-
};
|
|
51726
|
-
|
|
51727
|
-
/***
|
|
51728
|
-
* Format a date
|
|
51729
|
-
* @method format
|
|
51730
|
-
* @param {Date|number} dateObj
|
|
51731
|
-
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
|
|
51732
|
-
*/
|
|
51733
|
-
fecha.format = function (dateObj, mask, i18nSettings) {
|
|
51734
|
-
var i18n = i18nSettings || fecha.i18n;
|
|
51735
|
-
if (typeof dateObj === 'number') {
|
|
51736
|
-
dateObj = new Date(dateObj);
|
|
51737
|
-
}
|
|
51738
|
-
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
51739
|
-
throw new Error('Invalid Date in fecha.format');
|
|
51740
|
-
}
|
|
51741
|
-
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
51742
|
-
var literals = [];
|
|
51743
|
-
|
|
51744
|
-
// Make literals inactive by replacing them with ??
|
|
51745
|
-
mask = mask.replace(literal, function ($0, $1) {
|
|
51746
|
-
literals.push($1);
|
|
51747
|
-
return '@@@';
|
|
51748
|
-
});
|
|
51749
|
-
// Apply formatting rules
|
|
51750
|
-
mask = mask.replace(token, function ($0) {
|
|
51751
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
|
|
51752
|
-
});
|
|
51753
|
-
// Inline literal values back into the formatted value
|
|
51754
|
-
return mask.replace(/@@@/g, function () {
|
|
51755
|
-
return literals.shift();
|
|
51756
|
-
});
|
|
51757
|
-
};
|
|
51758
|
-
|
|
51759
|
-
/**
|
|
51760
|
-
* Parse a date string into an object, changes - into /
|
|
51761
|
-
* @method parse
|
|
51762
|
-
* @param {string} dateStr Date string
|
|
51763
|
-
* @param {string} format Date parse format
|
|
51764
|
-
* @returns {Date|boolean}
|
|
51765
|
-
*/
|
|
51766
|
-
fecha.parse = function (dateStr, format, i18nSettings) {
|
|
51767
|
-
var i18n = i18nSettings || fecha.i18n;
|
|
51768
|
-
if (typeof format !== 'string') {
|
|
51769
|
-
throw new Error('Invalid format in fecha.parse');
|
|
51770
|
-
}
|
|
51771
|
-
format = fecha.masks[format] || format;
|
|
51772
|
-
|
|
51773
|
-
// Avoid regular expression denial of service, fail early for really long strings
|
|
51774
|
-
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
51775
|
-
if (dateStr.length > 1000) {
|
|
51776
|
-
return null;
|
|
51777
|
-
}
|
|
51778
|
-
var dateInfo = {};
|
|
51779
|
-
var parseInfo = [];
|
|
51780
|
-
var literals = [];
|
|
51781
|
-
format = format.replace(literal, function ($0, $1) {
|
|
51782
|
-
literals.push($1);
|
|
51783
|
-
return '@@@';
|
|
51784
|
-
});
|
|
51785
|
-
var newFormat = regexEscape(format).replace(token, function ($0) {
|
|
51786
|
-
if (parseFlags[$0]) {
|
|
51787
|
-
var info = parseFlags[$0];
|
|
51788
|
-
parseInfo.push(info[1]);
|
|
51789
|
-
return '(' + info[0] + ')';
|
|
51790
|
-
}
|
|
51791
|
-
return $0;
|
|
51792
|
-
});
|
|
51793
|
-
newFormat = newFormat.replace(/@@@/g, function () {
|
|
51794
|
-
return literals.shift();
|
|
51795
|
-
});
|
|
51796
|
-
var matches = dateStr.match(new RegExp(newFormat, 'i'));
|
|
51797
|
-
if (!matches) {
|
|
51798
|
-
return null;
|
|
51799
|
-
}
|
|
51800
|
-
for (var i = 1; i < matches.length; i++) {
|
|
51801
|
-
parseInfo[i - 1](dateInfo, matches[i], i18n);
|
|
51802
|
-
}
|
|
51803
|
-
var today = new Date();
|
|
51804
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
51805
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
51806
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
51807
|
-
dateInfo.hour = 0;
|
|
51808
|
-
}
|
|
51809
|
-
var date;
|
|
51810
|
-
if (dateInfo.timezoneOffset != null) {
|
|
51811
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
51812
|
-
date = 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));
|
|
51813
|
-
} else {
|
|
51814
|
-
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
51815
|
-
}
|
|
51816
|
-
return date;
|
|
51817
|
-
};
|
|
51818
|
-
|
|
51819
|
-
/* istanbul ignore next */
|
|
51820
|
-
if ( true && module.exports) {
|
|
51821
|
-
module.exports = fecha;
|
|
51822
|
-
} else if (true) {
|
|
51823
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
51824
|
-
return fecha;
|
|
51825
|
-
}).call(exports, __webpack_require__, exports, module),
|
|
51826
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
51827
|
-
} else // removed by dead control flow
|
|
51828
|
-
{}
|
|
51829
|
-
})(undefined);
|
|
51830
|
-
|
|
51831
|
-
/***/ }),
|
|
51832
|
-
|
|
51833
51833
|
/***/ 9158:
|
|
51834
51834
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
51835
51835
|
|
|
@@ -76934,12 +76934,14 @@ var ByTreeSearch_component = normalizeComponent(
|
|
|
76934
76934
|
)
|
|
76935
76935
|
|
|
76936
76936
|
/* harmony default export */ var ByTreeSearch = (ByTreeSearch_component.exports);
|
|
76937
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=template&id=
|
|
76938
|
-
var
|
|
76937
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=template&id=bc06eb78
|
|
76938
|
+
var ByDialogvue_type_template_id_bc06eb78_render = function render() {
|
|
76939
76939
|
var _vm = this,
|
|
76940
76940
|
_c = _vm._self._c;
|
|
76941
76941
|
return _c('el-dialog', _vm._g(_vm._b({
|
|
76942
|
-
class: ['by-dialog',
|
|
76942
|
+
class: ['by-dialog', {
|
|
76943
|
+
'by-dialog--with-header': !!_vm.$slots.header
|
|
76944
|
+
}, _vm.customClass],
|
|
76943
76945
|
attrs: {
|
|
76944
76946
|
"visible": _vm.dialogVisible,
|
|
76945
76947
|
"title": _vm.title
|
|
@@ -76950,8 +76952,13 @@ var ByDialogvue_type_template_id_3da494cf_render = function render() {
|
|
|
76950
76952
|
},
|
|
76951
76953
|
"close": _vm.handleClose
|
|
76952
76954
|
}
|
|
76953
|
-
}, 'el-dialog', _vm.dialogAttrs, false), _vm.$listeners), [_c('div', {
|
|
76954
|
-
staticClass: "by-
|
|
76955
|
+
}, 'el-dialog', _vm.dialogAttrs, false), _vm.$listeners), [_vm.$slots.header ? _c('div', {
|
|
76956
|
+
staticClass: "by-dialog__header"
|
|
76957
|
+
}, [_vm._t("header")], 2) : _vm._e(), _c('div', {
|
|
76958
|
+
class: ['by-dialog__body', {
|
|
76959
|
+
'by-dialog__body--with-header': !!_vm.$slots.header
|
|
76960
|
+
}],
|
|
76961
|
+
style: _vm.bodyStyle
|
|
76955
76962
|
}, [_vm.content ? _c('div', {
|
|
76956
76963
|
staticClass: "by-dialog__content"
|
|
76957
76964
|
}, [_vm._v(_vm._s(_vm.content))]) : _vm._e(), _vm._t("default")], 2), _vm.showFooter ? _c('div', {
|
|
@@ -77000,7 +77007,7 @@ var ByDialogvue_type_template_id_3da494cf_render = function render() {
|
|
|
77000
77007
|
}, [_vm._v(" " + _vm._s(button.text) + " ")])];
|
|
77001
77008
|
})], 2) : _vm._e()]), _vm._t("footer")], 2) : _vm._e()]);
|
|
77002
77009
|
};
|
|
77003
|
-
var
|
|
77010
|
+
var ByDialogvue_type_template_id_bc06eb78_staticRenderFns = [];
|
|
77004
77011
|
|
|
77005
77012
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=script&lang=js
|
|
77006
77013
|
|
|
@@ -77018,6 +77025,21 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77018
77025
|
type: String,
|
|
77019
77026
|
default: '600px'
|
|
77020
77027
|
},
|
|
77028
|
+
// 大高度时自动收紧与顶部的距离(不影响默认行为)
|
|
77029
|
+
autoAdjustTop: {
|
|
77030
|
+
type: Boolean,
|
|
77031
|
+
default: false
|
|
77032
|
+
},
|
|
77033
|
+
// 内容区固定高度(可选,优先级高于 maxHeight),支持 px/vh/%
|
|
77034
|
+
bodyHeight: {
|
|
77035
|
+
type: [String, Number],
|
|
77036
|
+
default: undefined
|
|
77037
|
+
},
|
|
77038
|
+
// 内容区最大高度(可选),支持 px/vh/%
|
|
77039
|
+
bodyMaxHeight: {
|
|
77040
|
+
type: [String, Number],
|
|
77041
|
+
default: undefined
|
|
77042
|
+
},
|
|
77021
77043
|
// 标题
|
|
77022
77044
|
title: {
|
|
77023
77045
|
type: String,
|
|
@@ -77087,11 +77109,43 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77087
77109
|
} = this.$attrs;
|
|
77088
77110
|
return {
|
|
77089
77111
|
width: this.width,
|
|
77090
|
-
top:
|
|
77112
|
+
top: this.computedTop,
|
|
77091
77113
|
closeOnClickModal: this.closeOnClickModal,
|
|
77092
77114
|
...attrs
|
|
77093
77115
|
};
|
|
77094
77116
|
},
|
|
77117
|
+
computedTop() {
|
|
77118
|
+
if (!this.autoAdjustTop) return '15vh';
|
|
77119
|
+
const toNumber = val => {
|
|
77120
|
+
if (typeof val === 'number') return val;
|
|
77121
|
+
if (typeof val === 'string') {
|
|
77122
|
+
if (val.endsWith('px')) return parseFloat(val);
|
|
77123
|
+
// 对于百分比和其他单位不做换算,返回 NaN 以忽略
|
|
77124
|
+
return parseFloat(val);
|
|
77125
|
+
}
|
|
77126
|
+
return NaN;
|
|
77127
|
+
};
|
|
77128
|
+
const isLargeByPx = px => !isNaN(px) && px >= 600;
|
|
77129
|
+
const isLargeByVh = val => typeof val === 'string' && val.includes('vh') && parseFloat(val) >= 70;
|
|
77130
|
+
const heightPx = toNumber(this.bodyHeight);
|
|
77131
|
+
const maxHeightVal = this.bodyMaxHeight;
|
|
77132
|
+
const largeHeight = isLargeByPx(heightPx) || isLargeByVh(this.bodyHeight);
|
|
77133
|
+
const largeMaxHeight = isLargeByVh(maxHeightVal) || isLargeByPx(toNumber(maxHeightVal));
|
|
77134
|
+
if (largeHeight || largeMaxHeight) {
|
|
77135
|
+
return '8vh';
|
|
77136
|
+
}
|
|
77137
|
+
return '15vh';
|
|
77138
|
+
},
|
|
77139
|
+
bodyStyle() {
|
|
77140
|
+
const style = {};
|
|
77141
|
+
if (this.bodyHeight !== undefined && this.bodyHeight !== '') {
|
|
77142
|
+
style.height = typeof this.bodyHeight === 'number' ? `${this.bodyHeight}px` : this.bodyHeight;
|
|
77143
|
+
}
|
|
77144
|
+
if (this.bodyMaxHeight !== undefined && this.bodyMaxHeight !== '') {
|
|
77145
|
+
style.maxHeight = typeof this.bodyMaxHeight === 'number' ? `${this.bodyMaxHeight}px` : this.bodyMaxHeight;
|
|
77146
|
+
}
|
|
77147
|
+
return style;
|
|
77148
|
+
},
|
|
77095
77149
|
// 左侧按钮
|
|
77096
77150
|
leftButtons() {
|
|
77097
77151
|
return this.buttons.filter(button => button.position === 'left');
|
|
@@ -77149,8 +77203,8 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77149
77203
|
;
|
|
77150
77204
|
var ByDialog_component = normalizeComponent(
|
|
77151
77205
|
by_dialog_ByDialogvue_type_script_lang_js,
|
|
77152
|
-
|
|
77153
|
-
|
|
77206
|
+
ByDialogvue_type_template_id_bc06eb78_render,
|
|
77207
|
+
ByDialogvue_type_template_id_bc06eb78_staticRenderFns,
|
|
77154
77208
|
false,
|
|
77155
77209
|
null,
|
|
77156
77210
|
null,
|