vxe-table 3.5.4 → 3.5.5-beta.0

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/index.umd.js CHANGED
@@ -6021,6 +6021,54 @@ module.exports = function (METHOD_NAME, argument) {
6021
6021
  };
6022
6022
 
6023
6023
 
6024
+ /***/ }),
6025
+
6026
+ /***/ "a79d":
6027
+ /***/ (function(module, exports, __webpack_require__) {
6028
+
6029
+ "use strict";
6030
+
6031
+ var $ = __webpack_require__("23e7");
6032
+ var IS_PURE = __webpack_require__("c430");
6033
+ var NativePromise = __webpack_require__("fea9");
6034
+ var fails = __webpack_require__("d039");
6035
+ var getBuiltIn = __webpack_require__("d066");
6036
+ var isCallable = __webpack_require__("1626");
6037
+ var speciesConstructor = __webpack_require__("4840");
6038
+ var promiseResolve = __webpack_require__("cdf9");
6039
+ var redefine = __webpack_require__("6eeb");
6040
+
6041
+ // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
6042
+ var NON_GENERIC = !!NativePromise && fails(function () {
6043
+ NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
6044
+ });
6045
+
6046
+ // `Promise.prototype.finally` method
6047
+ // https://tc39.es/ecma262/#sec-promise.prototype.finally
6048
+ $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
6049
+ 'finally': function (onFinally) {
6050
+ var C = speciesConstructor(this, getBuiltIn('Promise'));
6051
+ var isFunction = isCallable(onFinally);
6052
+ return this.then(
6053
+ isFunction ? function (x) {
6054
+ return promiseResolve(C, onFinally()).then(function () { return x; });
6055
+ } : onFinally,
6056
+ isFunction ? function (e) {
6057
+ return promiseResolve(C, onFinally()).then(function () { throw e; });
6058
+ } : onFinally
6059
+ );
6060
+ }
6061
+ });
6062
+
6063
+ // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
6064
+ if (!IS_PURE && isCallable(NativePromise)) {
6065
+ var method = getBuiltIn('Promise').prototype['finally'];
6066
+ if (NativePromise.prototype['finally'] !== method) {
6067
+ redefine(NativePromise.prototype, 'finally', method, { unsafe: true });
6068
+ }
6069
+ }
6070
+
6071
+
6024
6072
  /***/ }),
6025
6073
 
6026
6074
  /***/ "a9e3":
@@ -8756,7 +8804,7 @@ var es_array_concat = __webpack_require__("99af");
8756
8804
 
8757
8805
 
8758
8806
  function getLog(message, params) {
8759
- return "[vxe-table v".concat("3.5.4", "] ").concat(conf.i18n(message, params));
8807
+ return "[vxe-table v".concat("3.5.5-beta.0", "] ").concat(conf.i18n(message, params));
8760
8808
  }
8761
8809
 
8762
8810
  function outLog(type) {
@@ -10025,7 +10073,7 @@ function _t(key, args) {
10025
10073
  var v = 'v3';
10026
10074
  var VXETable = {
10027
10075
  v: v,
10028
- version: "3.5.4",
10076
+ version: "3.5.5-beta.0",
10029
10077
  reg: reg,
10030
10078
  use: use,
10031
10079
  setup: setup,
@@ -11971,6 +12019,9 @@ var es_string_trim = __webpack_require__("498a");
11971
12019
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
11972
12020
  var es_array_sort = __webpack_require__("4e82");
11973
12021
 
12022
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
12023
+ var es_promise_finally = __webpack_require__("a79d");
12024
+
11974
12025
  // CONCATENATED MODULE: ./packages/table/src/cell.js
11975
12026
 
11976
12027
 
@@ -12928,6 +12979,7 @@ var Cell = {
12928
12979
 
12929
12980
 
12930
12981
 
12982
+
12931
12983
 
12932
12984
 
12933
12985
  var methods_setCellValue = utils.setCellValue,
@@ -17985,16 +18037,16 @@ var Methods = {
17985
18037
  row: row,
17986
18038
  rowIndex: _this40.getRowIndex(row),
17987
18039
  $rowIndex: _this40.getVMRowIndex(row)
17988
- }).catch(function (e) {
17989
- return e;
17990
18040
  }).then(function () {
17991
18041
  rest.expandLoaded = true;
18042
+
18043
+ _this40.rowExpandeds.push(row);
18044
+ }).catch(function () {
18045
+ rest.expandLoaded = false;
18046
+ }).finally(function () {
17992
18047
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(_this40.expandLazyLoadeds, function (item) {
17993
18048
  return item === row;
17994
18049
  });
17995
-
17996
- _this40.rowExpandeds.push(row);
17997
-
17998
18050
  resolve(_this40.$nextTick().then(_this40.recalculate));
17999
18051
  });
18000
18052
  });
@@ -18294,9 +18346,8 @@ var Methods = {
18294
18346
  loadMethod({
18295
18347
  $table: _this44,
18296
18348
  row: row
18297
- }).catch(function () {
18298
- return [];
18299
18349
  }).then(function (childRecords) {
18350
+ // 响应成功后则展开行,并将子节点挂载到该节点下
18300
18351
  rest.treeLoaded = true;
18301
18352
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeLazyLoadeds, function (item) {
18302
18353
  return item === row;
@@ -18307,7 +18358,7 @@ var Methods = {
18307
18358
  }
18308
18359
 
18309
18360
  if (childRecords) {
18310
- _this44.loadTreeChildren(row, childRecords).then(function (childRows) {
18361
+ return _this44.loadTreeChildren(row, childRecords).then(function (childRows) {
18311
18362
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
18312
18363
  treeExpandeds.push(row);
18313
18364
  } // 如果当前节点已选中,则展开后子节点也被选中
@@ -18317,23 +18368,25 @@ var Methods = {
18317
18368
  _this44.setCheckboxRow(childRows, true);
18318
18369
  }
18319
18370
 
18320
- _this44.$nextTick().then(function () {
18371
+ return _this44.$nextTick().then(function () {
18321
18372
  if (transform) {
18322
18373
  return _this44.handleTableData();
18323
18374
  }
18324
- }).then(function () {
18325
- return _this44.recalculate();
18326
- }).then(function () {
18327
- return resolve();
18328
18375
  });
18329
18376
  });
18330
- } else {
18331
- _this44.$nextTick().then(function () {
18332
- return _this44.recalculate();
18333
- }).then(function () {
18334
- return resolve();
18335
- });
18336
18377
  }
18378
+ }).catch(function () {
18379
+ // 如果响应异常,则不展开,再次点击后将重新触发懒加载
18380
+ rest.treeLoaded = false;
18381
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeLazyLoadeds, function (item) {
18382
+ return item === row;
18383
+ });
18384
+ }).finally(function () {
18385
+ _this44.$nextTick().then(function () {
18386
+ return _this44.recalculate();
18387
+ }).then(function () {
18388
+ return resolve();
18389
+ });
18337
18390
  });
18338
18391
  });
18339
18392
  },
@@ -18705,7 +18758,7 @@ var Methods = {
18705
18758
  updateScrollXData: function updateScrollXData() {
18706
18759
  var _this49 = this;
18707
18760
 
18708
- this.tableColumn = [];
18761
+ // this.tableColumn = []
18709
18762
  this.$nextTick(function () {
18710
18763
  _this49.handleTableColumn();
18711
18764
 
@@ -18768,7 +18821,7 @@ var Methods = {
18768
18821
  updateScrollYData: function updateScrollYData() {
18769
18822
  var _this50 = this;
18770
18823
 
18771
- this.tableData = [];
18824
+ // this.tableData = []
18772
18825
  this.$nextTick(function () {
18773
18826
  _this50.handleTableData();
18774
18827
 
@@ -23877,7 +23930,11 @@ function toFloatValueFixed(inputValue, digitsValue) {
23877
23930
 
23878
23931
 
23879
23932
 
23880
- var yearSize = 20;
23933
+
23934
+
23935
+
23936
+
23937
+ var yearSize = 12;
23881
23938
  var monthSize = 20;
23882
23939
  var quarterSize = 8;
23883
23940
 
@@ -23956,7 +24013,9 @@ function renderDateDayTable(h, _vm) {
23956
24013
  dateValue = _vm.dateValue,
23957
24014
  datePanelValue = _vm.datePanelValue,
23958
24015
  dateHeaders = _vm.dateHeaders,
23959
- dayDatas = _vm.dayDatas;
24016
+ dayDatas = _vm.dayDatas,
24017
+ multiple = _vm.multiple,
24018
+ dateListValue = _vm.dateListValue;
23960
24019
  var matchFormat = 'yyyy-MM-dd';
23961
24020
  return [h('table', {
23962
24021
  class: "vxe-input--date-".concat(datePanelType, "-view"),
@@ -23976,7 +24035,9 @@ function renderDateDayTable(h, _vm) {
23976
24035
  'is--now': item.isNow,
23977
24036
  'is--next': item.isNext,
23978
24037
  'is--disabled': isDateDisabled(_vm, item),
23979
- 'is--selected': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24038
+ 'is--selected': multiple ? dateListValue.some(function (val) {
24039
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(val, item.date, matchFormat);
24040
+ }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
23980
24041
  'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(datePanelValue, item.date, matchFormat)
23981
24042
  },
23982
24043
  on: {
@@ -23997,7 +24058,9 @@ function renderDateWeekTable(h, _vm) {
23997
24058
  dateValue = _vm.dateValue,
23998
24059
  datePanelValue = _vm.datePanelValue,
23999
24060
  weekHeaders = _vm.weekHeaders,
24000
- weekDates = _vm.weekDates;
24061
+ weekDates = _vm.weekDates,
24062
+ multiple = _vm.multiple,
24063
+ dateListValue = _vm.dateListValue;
24001
24064
  var matchFormat = 'yyyyMMdd';
24002
24065
  return [h('table', {
24003
24066
  class: "vxe-input--date-".concat(datePanelType, "-view"),
@@ -24009,7 +24072,11 @@ function renderDateWeekTable(h, _vm) {
24009
24072
  }, [h('thead', [h('tr', weekHeaders.map(function (item) {
24010
24073
  return h('th', item.label);
24011
24074
  }))]), h('tbody', weekDates.map(function (rows) {
24012
- var isSelected = rows.some(function (item) {
24075
+ var isSelected = multiple ? rows.some(function (item) {
24076
+ return dateListValue.some(function (val) {
24077
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(val, item.date, matchFormat);
24078
+ });
24079
+ }) : rows.some(function (item) {
24013
24080
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat);
24014
24081
  });
24015
24082
  var isHover = rows.some(function (item) {
@@ -24043,7 +24110,9 @@ function renderDateMonthTable(h, _vm) {
24043
24110
  var dateValue = _vm.dateValue,
24044
24111
  datePanelType = _vm.datePanelType,
24045
24112
  monthDatas = _vm.monthDatas,
24046
- datePanelValue = _vm.datePanelValue;
24113
+ datePanelValue = _vm.datePanelValue,
24114
+ multiple = _vm.multiple,
24115
+ dateListValue = _vm.dateListValue;
24047
24116
  var matchFormat = 'yyyyMM';
24048
24117
  return [h('table', {
24049
24118
  class: "vxe-input--date-".concat(datePanelType, "-view"),
@@ -24061,7 +24130,9 @@ function renderDateMonthTable(h, _vm) {
24061
24130
  'is--now': item.isNow,
24062
24131
  'is--next': item.isNext,
24063
24132
  'is--disabled': isDateDisabled(_vm, item),
24064
- 'is--selected': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24133
+ 'is--selected': multiple ? dateListValue.some(function (val) {
24134
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(val, item.date, matchFormat);
24135
+ }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24065
24136
  'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(datePanelValue, item.date, matchFormat)
24066
24137
  },
24067
24138
  on: {
@@ -24081,7 +24152,9 @@ function renderDateQuarterTable(h, _vm) {
24081
24152
  var dateValue = _vm.dateValue,
24082
24153
  datePanelType = _vm.datePanelType,
24083
24154
  quarterDatas = _vm.quarterDatas,
24084
- datePanelValue = _vm.datePanelValue;
24155
+ datePanelValue = _vm.datePanelValue,
24156
+ multiple = _vm.multiple,
24157
+ dateListValue = _vm.dateListValue;
24085
24158
  var matchFormat = 'yyyyq';
24086
24159
  return [h('table', {
24087
24160
  class: "vxe-input--date-".concat(datePanelType, "-view"),
@@ -24099,7 +24172,9 @@ function renderDateQuarterTable(h, _vm) {
24099
24172
  'is--now': item.isNow,
24100
24173
  'is--next': item.isNext,
24101
24174
  'is--disabled': isDateDisabled(_vm, item),
24102
- 'is--selected': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24175
+ 'is--selected': multiple ? dateListValue.some(function (val) {
24176
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(val, item.date, matchFormat);
24177
+ }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24103
24178
  'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(datePanelValue, item.date, matchFormat)
24104
24179
  },
24105
24180
  on: {
@@ -24119,7 +24194,9 @@ function renderDateYearTable(h, _vm) {
24119
24194
  var dateValue = _vm.dateValue,
24120
24195
  datePanelType = _vm.datePanelType,
24121
24196
  yearDatas = _vm.yearDatas,
24122
- datePanelValue = _vm.datePanelValue;
24197
+ datePanelValue = _vm.datePanelValue,
24198
+ multiple = _vm.multiple,
24199
+ dateListValue = _vm.dateListValue;
24123
24200
  var matchFormat = 'yyyy';
24124
24201
  return [h('table', {
24125
24202
  class: "vxe-input--date-".concat(datePanelType, "-view"),
@@ -24132,10 +24209,14 @@ function renderDateYearTable(h, _vm) {
24132
24209
  return h('tr', rows.map(function (item) {
24133
24210
  return h('td', {
24134
24211
  class: {
24135
- 'is--disabled': isDateDisabled(_vm, item),
24212
+ 'is--prev': item.isPrev,
24136
24213
  'is--current': item.isCurrent,
24137
24214
  'is--now': item.isNow,
24138
- 'is--selected': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24215
+ 'is--next': item.isNext,
24216
+ 'is--disabled': isDateDisabled(item),
24217
+ 'is--selected': multiple ? dateListValue.some(function (val) {
24218
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(val, item.date, matchFormat);
24219
+ }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(dateValue, item.date, matchFormat),
24139
24220
  'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(datePanelValue, item.date, matchFormat)
24140
24221
  },
24141
24222
  on: {
@@ -24175,7 +24256,9 @@ function renderDatePanel(h, _vm) {
24175
24256
  var datePanelType = _vm.datePanelType,
24176
24257
  selectDatePanelLabel = _vm.selectDatePanelLabel,
24177
24258
  isDisabledPrevDateBtn = _vm.isDisabledPrevDateBtn,
24178
- isDisabledNextDateBtn = _vm.isDisabledNextDateBtn;
24259
+ isDisabledNextDateBtn = _vm.isDisabledNextDateBtn,
24260
+ multiple = _vm.multiple,
24261
+ supportMultiples = _vm.supportMultiples;
24179
24262
  return [h('div', {
24180
24263
  class: 'vxe-input--date-picker-header'
24181
24264
  }, [h('div', {
@@ -24214,7 +24297,17 @@ function renderDatePanel(h, _vm) {
24214
24297
  }
24215
24298
  }, [h('i', {
24216
24299
  class: 'vxe-icon--caret-right'
24217
- })])])]), h('div', {
24300
+ })]), multiple && supportMultiples ? h('span', {
24301
+ class: 'vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn'
24302
+ }, [h('button', {
24303
+ class: 'vxe-input--date-picker-confirm',
24304
+ attrs: {
24305
+ type: 'button'
24306
+ },
24307
+ on: {
24308
+ click: _vm.dateConfirmEvent
24309
+ }
24310
+ }, conf.i18n('vxe.button.confirm'))]) : null])]), h('div', {
24218
24311
  class: 'vxe-input--date-picker-body'
24219
24312
  }, renderDateTable(h, _vm))];
24220
24313
  }
@@ -24511,6 +24604,7 @@ function renderExtraSuffixIcon(h, _vm) {
24511
24604
  return conf.input.size || conf.size;
24512
24605
  }
24513
24606
  },
24607
+ multiple: Boolean,
24514
24608
  // number、integer、float
24515
24609
  min: {
24516
24610
  type: [String, Number],
@@ -24631,9 +24725,9 @@ function renderExtraSuffixIcon(h, _vm) {
24631
24725
  return ['number', 'integer', 'float'].indexOf(this.type) > -1;
24632
24726
  },
24633
24727
  isDatePickerType: function isDatePickerType() {
24634
- return this.hasTime || ['date', 'week', 'month', 'quarter', 'year'].indexOf(this.type) > -1;
24728
+ return this.isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(this.type) > -1;
24635
24729
  },
24636
- hasTime: function hasTime() {
24730
+ isDateTimeType: function isDateTimeType() {
24637
24731
  var type = this.type;
24638
24732
  return type === 'time' || type === 'datetime';
24639
24733
  },
@@ -24687,6 +24781,45 @@ function renderExtraSuffixIcon(h, _vm) {
24687
24781
  dateMaxTime: function dateMaxTime() {
24688
24782
  return this.maxDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(this.maxDate) : null;
24689
24783
  },
24784
+ supportMultiples: function supportMultiples() {
24785
+ return ['date', 'week', 'month', 'quarter', 'year'].includes(this.type);
24786
+ },
24787
+ dateListValue: function dateListValue() {
24788
+ var _this = this;
24789
+
24790
+ var value = this.value,
24791
+ multiple = this.multiple,
24792
+ isDatePickerType = this.isDatePickerType,
24793
+ dateValueFormat = this.dateValueFormat;
24794
+
24795
+ if (multiple && value && isDatePickerType) {
24796
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toValueString(value).split(',').map(function (item) {
24797
+ var date = _this.parseDate(item, dateValueFormat);
24798
+
24799
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(date)) {
24800
+ return date;
24801
+ }
24802
+
24803
+ return null;
24804
+ });
24805
+ }
24806
+
24807
+ return [];
24808
+ },
24809
+ dateMultipleValue: function dateMultipleValue() {
24810
+ var dateListValue = this.dateListValue,
24811
+ dateValueFormat = this.dateValueFormat;
24812
+ return dateListValue.map(function (date) {
24813
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat);
24814
+ });
24815
+ },
24816
+ dateMultipleLabel: function dateMultipleLabel() {
24817
+ var dateListValue = this.dateListValue,
24818
+ dateLabelFormat = this.dateLabelFormat;
24819
+ return dateListValue.map(function (date) {
24820
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateLabelFormat);
24821
+ }).join(', ');
24822
+ },
24690
24823
  dateValue: function dateValue() {
24691
24824
  var value = this.value,
24692
24825
  isDatePickerType = this.isDatePickerType,
@@ -24714,7 +24847,7 @@ function renderExtraSuffixIcon(h, _vm) {
24714
24847
  },
24715
24848
  hmsTime: function hmsTime() {
24716
24849
  var dateValue = this.dateValue;
24717
- return dateValue && this.hasTime ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
24850
+ return dateValue && this.isDateTimeType ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
24718
24851
  },
24719
24852
  dateLabelFormat: function dateLabelFormat() {
24720
24853
  if (this.isDatePickerType) {
@@ -24806,15 +24939,18 @@ function renderExtraSuffixIcon(h, _vm) {
24806
24939
 
24807
24940
  if (selectMonth && currentDate) {
24808
24941
  var currFullYear = currentDate.getFullYear();
24809
- var startYear = new Date(('' + selectMonth.getFullYear()).replace(/\d{1}$/, '0'), 0, 1);
24942
+ var selectFullYear = selectMonth.getFullYear();
24943
+ var startYearDate = new Date(selectFullYear - selectFullYear % yearSize, 0, 1);
24810
24944
 
24811
- for (var index = -10; index < yearSize - 10; index++) {
24812
- var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatYear(startYear, index, 'first');
24945
+ for (var index = -4; index < yearSize + 4; index++) {
24946
+ var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatYear(startYearDate, index, 'first');
24813
24947
  var itemFullYear = date.getFullYear();
24814
24948
  months.push({
24815
24949
  date: date,
24816
24950
  isCurrent: true,
24951
+ isPrev: index < 0,
24817
24952
  isNow: currFullYear === itemFullYear,
24953
+ isNext: index >= yearSize,
24818
24954
  year: itemFullYear
24819
24955
  });
24820
24956
  }
@@ -24947,7 +25083,7 @@ function renderExtraSuffixIcon(h, _vm) {
24947
25083
  hourList: function hourList() {
24948
25084
  var list = [];
24949
25085
 
24950
- if (this.hasTime) {
25086
+ if (this.isDateTimeType) {
24951
25087
  for (var index = 0; index < 24; index++) {
24952
25088
  list.push({
24953
25089
  value: index,
@@ -24961,7 +25097,7 @@ function renderExtraSuffixIcon(h, _vm) {
24961
25097
  minuteList: function minuteList() {
24962
25098
  var list = [];
24963
25099
 
24964
- if (this.hasTime) {
25100
+ if (this.isDateTimeType) {
24965
25101
  for (var index = 0; index < 60; index++) {
24966
25102
  list.push({
24967
25103
  value: index,
@@ -25011,8 +25147,9 @@ function renderExtraSuffixIcon(h, _vm) {
25011
25147
  inpReadonly: function inpReadonly() {
25012
25148
  var type = this.type,
25013
25149
  readonly = this.readonly,
25014
- editable = this.editable;
25015
- return readonly || !editable || type === 'week' || type === 'quarter';
25150
+ editable = this.editable,
25151
+ multiple = this.multiple;
25152
+ return readonly || multiple || !editable || type === 'week' || type === 'quarter';
25016
25153
  }
25017
25154
  },
25018
25155
  watch: {
@@ -25036,7 +25173,7 @@ function renderExtraSuffixIcon(h, _vm) {
25036
25173
  dateLabelFormat: function dateLabelFormat() {
25037
25174
  if (this.isDatePickerType) {
25038
25175
  this.dateParseValue(this.datePanelValue);
25039
- this.inputValue = this.datePanelLabel;
25176
+ this.inputValue = this.multiple ? this.dateMultipleLabel : this.datePanelLabel;
25040
25177
  }
25041
25178
  }
25042
25179
  },
@@ -25369,7 +25506,7 @@ function renderExtraSuffixIcon(h, _vm) {
25369
25506
  changeValue: function changeValue() {
25370
25507
  if (this.isDatePickerType) {
25371
25508
  this.dateParseValue(this.inputValue);
25372
- this.inputValue = this.datePanelLabel;
25509
+ this.inputValue = this.multiple ? this.dateMultipleLabel : this.datePanelLabel;
25373
25510
  }
25374
25511
  },
25375
25512
  afterCheckValue: function afterCheckValue() {
@@ -25493,21 +25630,21 @@ function renderExtraSuffixIcon(h, _vm) {
25493
25630
  clearTimeout(this.downbumTimeout);
25494
25631
  },
25495
25632
  numberDownPrevEvent: function numberDownPrevEvent(evnt) {
25496
- var _this = this;
25633
+ var _this2 = this;
25497
25634
 
25498
25635
  this.downbumTimeout = setTimeout(function () {
25499
- _this.numberPrevEvent(evnt);
25636
+ _this2.numberPrevEvent(evnt);
25500
25637
 
25501
- _this.numberDownPrevEvent(evnt);
25638
+ _this2.numberDownPrevEvent(evnt);
25502
25639
  }, 60);
25503
25640
  },
25504
25641
  numberDownNextEvent: function numberDownNextEvent(evnt) {
25505
- var _this2 = this;
25642
+ var _this3 = this;
25506
25643
 
25507
25644
  this.downbumTimeout = setTimeout(function () {
25508
- _this2.numberNextEvent(evnt);
25645
+ _this3.numberNextEvent(evnt);
25509
25646
 
25510
- _this2.numberDownNextEvent(evnt);
25647
+ _this3.numberDownNextEvent(evnt);
25511
25648
  }, 60);
25512
25649
  },
25513
25650
  numberKeydownEvent: function numberKeydownEvent(evnt) {
@@ -25526,7 +25663,7 @@ function renderExtraSuffixIcon(h, _vm) {
25526
25663
  }
25527
25664
  },
25528
25665
  numberMousedownEvent: function numberMousedownEvent(evnt) {
25529
- var _this3 = this;
25666
+ var _this4 = this;
25530
25667
 
25531
25668
  this.numberStopDown();
25532
25669
 
@@ -25541,9 +25678,9 @@ function renderExtraSuffixIcon(h, _vm) {
25541
25678
 
25542
25679
  this.downbumTimeout = setTimeout(function () {
25543
25680
  if (isPrevNumber) {
25544
- _this3.numberDownPrevEvent(evnt);
25681
+ _this4.numberDownPrevEvent(evnt);
25545
25682
  } else {
25546
- _this3.numberDownNextEvent(evnt);
25683
+ _this4.numberDownNextEvent(evnt);
25547
25684
  }
25548
25685
  }, 500);
25549
25686
  }
@@ -25655,8 +25792,12 @@ function renderExtraSuffixIcon(h, _vm) {
25655
25792
  },
25656
25793
  dateTodayMonthEvent: function dateTodayMonthEvent(evnt) {
25657
25794
  this.dateNowHandle();
25658
- this.dateChange(this.currentDate);
25659
- this.hidePanel();
25795
+
25796
+ if (!this.multiple) {
25797
+ this.dateChange(this.currentDate);
25798
+ this.hidePanel();
25799
+ }
25800
+
25660
25801
  this.$emit('date-today', {
25661
25802
  type: this.type,
25662
25803
  $event: evnt
@@ -25699,7 +25840,8 @@ function renderExtraSuffixIcon(h, _vm) {
25699
25840
  },
25700
25841
  dateSelectItem: function dateSelectItem(date) {
25701
25842
  var type = this.type,
25702
- datePanelType = this.datePanelType;
25843
+ datePanelType = this.datePanelType,
25844
+ multiple = this.multiple;
25703
25845
  var isWeekType = type === 'week';
25704
25846
 
25705
25847
  if (type === 'month') {
@@ -25708,18 +25850,27 @@ function renderExtraSuffixIcon(h, _vm) {
25708
25850
  this.dateCheckMonth(date);
25709
25851
  } else {
25710
25852
  this.dateChange(date);
25711
- this.hidePanel();
25853
+
25854
+ if (!multiple) {
25855
+ this.hidePanel();
25856
+ }
25712
25857
  }
25713
25858
  } else if (type === 'year') {
25714
- this.hidePanel();
25715
25859
  this.dateChange(date);
25860
+
25861
+ if (!multiple) {
25862
+ this.hidePanel();
25863
+ }
25716
25864
  } else if (type === 'quarter') {
25717
25865
  if (datePanelType === 'year') {
25718
25866
  this.datePanelType = 'quarter';
25719
25867
  this.dateCheckMonth(date);
25720
25868
  } else {
25721
25869
  this.dateChange(date);
25722
- this.hidePanel();
25870
+
25871
+ if (!multiple) {
25872
+ this.hidePanel();
25873
+ }
25723
25874
  }
25724
25875
  } else {
25725
25876
  if (datePanelType === 'month') {
@@ -25730,7 +25881,10 @@ function renderExtraSuffixIcon(h, _vm) {
25730
25881
  this.dateCheckMonth(date);
25731
25882
  } else {
25732
25883
  this.dateChange(date);
25733
- this.hidePanel();
25884
+
25885
+ if (!multiple) {
25886
+ this.hidePanel();
25887
+ }
25734
25888
  }
25735
25889
  }
25736
25890
 
@@ -25961,12 +26115,14 @@ function renderExtraSuffixIcon(h, _vm) {
25961
26115
  var value = this.value,
25962
26116
  datetimePanelValue = this.datetimePanelValue,
25963
26117
  dateValueFormat = this.dateValueFormat,
25964
- firstDayOfWeek = this.firstDayOfWeek;
26118
+ firstDayOfWeek = this.firstDayOfWeek,
26119
+ isDateTimeType = this.isDateTimeType,
26120
+ multiple = this.multiple;
25965
26121
 
25966
26122
  if (this.type === 'week') {
25967
26123
  var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(this.selectDay);
25968
26124
  date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
25969
- } else if (this.hasTime) {
26125
+ } else if (isDateTimeType) {
25970
26126
  date.setHours(datetimePanelValue.getHours());
25971
26127
  date.setMinutes(datetimePanelValue.getMinutes());
25972
26128
  date.setSeconds(datetimePanelValue.getSeconds());
@@ -25977,10 +26133,51 @@ function renderExtraSuffixIcon(h, _vm) {
25977
26133
  });
25978
26134
  this.dateCheckMonth(date);
25979
26135
 
25980
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(value, inpVal)) {
25981
- this.emitModel(inpVal, {
25982
- type: 'update'
25983
- });
26136
+ if (multiple) {
26137
+ // 如果为多选
26138
+ var dateMultipleValue = this.dateMultipleValue;
26139
+
26140
+ if (isDateTimeType) {
26141
+ // 如果是datetime特殊类型
26142
+ var dateListValue = this.dateListValue;
26143
+ var datetimeRest = [];
26144
+ dateListValue.forEach(function (item) {
26145
+ if (item && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isDateSame(date, item, 'yyyyMMdd')) {
26146
+ item.setHours(datetimePanelValue.getHours());
26147
+ item.setMinutes(datetimePanelValue.getMinutes());
26148
+ item.setSeconds(datetimePanelValue.getSeconds());
26149
+ datetimeRest.push(item);
26150
+ }
26151
+ });
26152
+ datetimeRest.push(date);
26153
+ this.emitModel(datetimeRest.map(function (date) {
26154
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat);
26155
+ }).join(','), {
26156
+ type: 'update'
26157
+ });
26158
+ } else {
26159
+ // 如果是日期类型
26160
+ if (dateMultipleValue.some(function (val) {
26161
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(val, inpVal);
26162
+ })) {
26163
+ this.emitModel(dateMultipleValue.filter(function (val) {
26164
+ return !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(val, inpVal);
26165
+ }).join(','), {
26166
+ type: 'update'
26167
+ });
26168
+ } else {
26169
+ this.emitModel(dateMultipleValue.concat([inpVal]).join(','), {
26170
+ type: 'update'
26171
+ });
26172
+ }
26173
+ }
26174
+ } else {
26175
+ // 如果为单选
26176
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(value, inpVal)) {
26177
+ this.emitModel(inpVal, {
26178
+ type: 'update'
26179
+ });
26180
+ }
25984
26181
  }
25985
26182
  },
25986
26183
  dateCheckMonth: function dateCheckMonth(date) {
@@ -25991,7 +26188,7 @@ function renderExtraSuffixIcon(h, _vm) {
25991
26188
  }
25992
26189
  },
25993
26190
  dateOpenPanel: function dateOpenPanel() {
25994
- var _this4 = this;
26191
+ var _this5 = this;
25995
26192
 
25996
26193
  var type = this.type,
25997
26194
  dateValue = this.dateValue;
@@ -26011,15 +26208,15 @@ function renderExtraSuffixIcon(h, _vm) {
26011
26208
  this.dateNowHandle();
26012
26209
  }
26013
26210
 
26014
- if (this.hasTime) {
26211
+ if (this.isDateTimeType) {
26015
26212
  this.datetimePanelValue = this.datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(Date.now(), 0, 'first');
26016
26213
  this.$nextTick(function () {
26017
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach(_this4.$refs.timeBody.querySelectorAll('li.is--selected'), _this4.updateTimePos);
26214
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach(_this5.$refs.timeBody.querySelectorAll('li.is--selected'), _this5.updateTimePos);
26018
26215
  });
26019
26216
  }
26020
26217
  },
26021
26218
  dateRevert: function dateRevert() {
26022
- this.inputValue = this.datePanelLabel;
26219
+ this.inputValue = this.multiple ? this.dateMultipleLabel : this.datePanelLabel;
26023
26220
  },
26024
26221
  // 日期
26025
26222
  // 弹出面板
@@ -26029,7 +26226,7 @@ function renderExtraSuffixIcon(h, _vm) {
26029
26226
  }
26030
26227
  },
26031
26228
  showPanel: function showPanel() {
26032
- var _this5 = this;
26229
+ var _this6 = this;
26033
26230
 
26034
26231
  var disabled = this.disabled,
26035
26232
  visiblePanel = this.visiblePanel,
@@ -26045,28 +26242,28 @@ function renderExtraSuffixIcon(h, _vm) {
26045
26242
  }
26046
26243
 
26047
26244
  setTimeout(function () {
26048
- _this5.visiblePanel = true;
26245
+ _this6.visiblePanel = true;
26049
26246
  }, 10);
26050
26247
  this.updateZindex();
26051
26248
  this.updatePlacement();
26052
26249
  }
26053
26250
  },
26054
26251
  hidePanel: function hidePanel() {
26055
- var _this6 = this;
26252
+ var _this7 = this;
26056
26253
 
26057
26254
  this.visiblePanel = false;
26058
26255
  this.hidePanelTimeout = setTimeout(function () {
26059
- _this6.animatVisible = false;
26256
+ _this7.animatVisible = false;
26060
26257
  }, 350);
26061
26258
  },
26062
26259
  updatePlacement: function updatePlacement() {
26063
- var _this7 = this;
26260
+ var _this8 = this;
26064
26261
 
26065
26262
  return this.$nextTick().then(function () {
26066
- var $refs = _this7.$refs,
26067
- transfer = _this7.transfer,
26068
- placement = _this7.placement,
26069
- panelIndex = _this7.panelIndex;
26263
+ var $refs = _this8.$refs,
26264
+ transfer = _this8.transfer,
26265
+ placement = _this8.placement,
26266
+ panelIndex = _this8.panelIndex;
26070
26267
  var targetElem = $refs.input;
26071
26268
  var panelElem = $refs.panel;
26072
26269
 
@@ -26140,9 +26337,9 @@ function renderExtraSuffixIcon(h, _vm) {
26140
26337
  }
26141
26338
  }
26142
26339
 
26143
- _this7.panelStyle = panelStyle;
26144
- _this7.panelPlacement = panelPlacement;
26145
- return _this7.$nextTick();
26340
+ _this8.panelStyle = panelStyle;
26341
+ _this8.panelPlacement = panelPlacement;
26342
+ return _this8.$nextTick();
26146
26343
  }
26147
26344
  });
26148
26345
  },
@@ -35924,32 +36121,35 @@ function tooltip_renderContent(h, _vm) {
35924
36121
  content = this.content,
35925
36122
  value = this.value;
35926
36123
  var parentNode = $el.parentNode;
35927
- var target;
35928
- this.tipContent = content;
35929
- this.tipZindex = utils.nextZIndex();
35930
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.children, function (elem, index) {
35931
- if (index > 1) {
35932
- parentNode.insertBefore(elem, $el);
35933
36124
 
35934
- if (!target) {
35935
- target = elem;
36125
+ if (parentNode) {
36126
+ var target;
36127
+ this.tipContent = content;
36128
+ this.tipZindex = utils.nextZIndex();
36129
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.children, function (elem, index) {
36130
+ if (index > 1) {
36131
+ parentNode.insertBefore(elem, $el);
36132
+
36133
+ if (!target) {
36134
+ target = elem;
36135
+ }
35936
36136
  }
35937
- }
35938
- });
35939
- parentNode.removeChild($el);
35940
- this.target = target;
36137
+ });
36138
+ parentNode.removeChild($el);
36139
+ this.target = target;
35941
36140
 
35942
- if (target) {
35943
- if (trigger === 'hover') {
35944
- target.onmouseleave = this.targetMouseleaveEvent;
35945
- target.onmouseenter = this.targetMouseenterEvent;
35946
- } else if (trigger === 'click') {
35947
- target.onclick = this.clickEvent;
36141
+ if (target) {
36142
+ if (trigger === 'hover') {
36143
+ target.onmouseleave = this.targetMouseleaveEvent;
36144
+ target.onmouseenter = this.targetMouseenterEvent;
36145
+ } else if (trigger === 'click') {
36146
+ target.onclick = this.clickEvent;
36147
+ }
35948
36148
  }
35949
- }
35950
36149
 
35951
- if (value) {
35952
- this.open();
36150
+ if (value) {
36151
+ this.open();
36152
+ }
35953
36153
  }
35954
36154
  },
35955
36155
  beforeDestroy: function beforeDestroy() {