vxe-table 3.5.0-beta.0 → 3.5.0-beta.1

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.
Files changed (44) hide show
  1. package/helper/vetur/attributes.json +30 -10
  2. package/helper/vetur/tags.json +7 -2
  3. package/lib/form/src/form-item.js +2 -2
  4. package/lib/form/src/form-item.min.js +1 -1
  5. package/lib/form/src/form.js +32 -53
  6. package/lib/form/src/form.min.js +1 -1
  7. package/lib/form/src/render.js +14 -11
  8. package/lib/form/src/render.min.js +1 -1
  9. package/lib/index.css +1 -1
  10. package/lib/index.umd.js +326 -380
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/select/style/style.css +1 -1
  13. package/lib/select/style/style.min.css +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/table/src/cell.js +3 -3
  17. package/lib/table/src/cell.min.js +1 -1
  18. package/lib/table/src/column.js +3 -1
  19. package/lib/table/src/column.min.js +1 -1
  20. package/lib/table/src/columnInfo.js +1 -0
  21. package/lib/table/src/columnInfo.min.js +1 -1
  22. package/lib/table/src/methods.js +140 -154
  23. package/lib/table/src/methods.min.js +1 -1
  24. package/lib/table/src/table.js +20 -63
  25. package/lib/table/src/table.min.js +1 -1
  26. package/lib/tooltip/src/tooltip.js +51 -28
  27. package/lib/tooltip/src/tooltip.min.js +1 -1
  28. package/lib/tooltip/style/style.css +1 -1
  29. package/lib/tooltip/style/style.min.css +1 -1
  30. package/lib/v-x-e-table/src/conf.js +8 -6
  31. package/lib/v-x-e-table/src/conf.min.js +1 -1
  32. package/package.json +1 -1
  33. package/packages/form/src/form-item.js +2 -2
  34. package/packages/form/src/form.js +12 -25
  35. package/packages/form/src/render.js +7 -7
  36. package/packages/table/src/cell.js +3 -3
  37. package/packages/table/src/column.js +3 -1
  38. package/packages/table/src/columnInfo.js +1 -0
  39. package/packages/table/src/methods.js +22 -44
  40. package/packages/table/src/table.js +13 -58
  41. package/packages/tooltip/src/tooltip.js +44 -25
  42. package/packages/v-x-e-table/src/conf.js +8 -6
  43. package/styles/select.scss +1 -1
  44. package/styles/tooltip.scss +1 -1
@@ -2827,14 +2827,7 @@ var Methods = {
2827
2827
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
2828
2828
  tableColumn = fixedColumn;
2829
2829
  } else {
2830
- tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
2831
- // if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
2832
- // tableColumn = fixedColumn
2833
- // } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
2834
- // tableColumn = fixedColumn
2835
- // } else {
2836
- // tableColumn = visibleColumn
2837
- // }
2830
+ tableColumn = visibleColumn;
2838
2831
  }
2839
2832
  } else {
2840
2833
  tableColumn = visibleColumn;
@@ -2862,14 +2855,7 @@ var Methods = {
2862
2855
  if (!mergeFooterList.length || !footerSpanMethod) {
2863
2856
  tableColumn = fixedColumn;
2864
2857
  } else {
2865
- tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
2866
- // if (mergeFooterList.length && !isMergeFooterLeftFixedExceeded && fixedType === 'left') {
2867
- // tableColumn = fixedColumn
2868
- // } else if (mergeFooterList.length && !isMergeFooterRightFixedExceeded && fixedType === 'right') {
2869
- // tableColumn = fixedColumn
2870
- // } else {
2871
- // tableColumn = visibleColumn
2872
- // }
2858
+ tableColumn = visibleColumn;
2873
2859
  }
2874
2860
  } else {
2875
2861
  tableColumn = visibleColumn;
@@ -3164,6 +3150,8 @@ var Methods = {
3164
3150
 
3165
3151
  if (isEsc) {
3166
3152
  this.preventEvent(evnt, 'event.keydown', null, function () {
3153
+ _this27.emitEvent('keydown-start', {}, evnt);
3154
+
3167
3155
  if (keyboardConfig && mouseConfig && mouseOpts.area && _this27.handleKeyboardEvent) {
3168
3156
  _this27.handleKeyboardEvent(evnt);
3169
3157
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
@@ -3191,6 +3179,8 @@ var Methods = {
3191
3179
  }
3192
3180
 
3193
3181
  _this27.emitEvent('keydown', {}, evnt);
3182
+
3183
+ _this27.emitEvent('keydown-end', {}, evnt);
3194
3184
  });
3195
3185
  }
3196
3186
  },
@@ -3513,21 +3503,9 @@ var Methods = {
3513
3503
  this.updateCellAreas();
3514
3504
  this.recalculate(true);
3515
3505
  },
3516
- handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
3517
- var _this29 = this;
3518
-
3519
- var tooltipOpts = this.tooltipOpts;
3520
- setTimeout(function () {
3521
- if (!_this29.tooltipActive) {
3522
- _this29.closeTooltip();
3523
- }
3524
- }, tooltipOpts.leaveDelay);
3525
- return false;
3526
- },
3527
3506
  handleTargetEnterEvent: function handleTargetEnterEvent(isClear) {
3528
3507
  var $tooltip = this.$refs.tooltip;
3529
3508
  clearTimeout(this.tooltipTimeout);
3530
- this.tooltipActive = true;
3531
3509
 
3532
3510
  if (isClear) {
3533
3511
  this.closeTooltip();
@@ -3538,11 +3516,10 @@ var Methods = {
3538
3516
  }
3539
3517
  },
3540
3518
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
3541
- var _this30 = this;
3519
+ var _this29 = this;
3542
3520
 
3543
3521
  var tooltipOpts = this.tooltipOpts;
3544
3522
  var $tooltip = this.$refs.tooltip;
3545
- this.tooltipActive = false;
3546
3523
 
3547
3524
  if ($tooltip) {
3548
3525
  $tooltip.setActived(false);
@@ -3550,10 +3527,10 @@ var Methods = {
3550
3527
 
3551
3528
  if (tooltipOpts.enterable) {
3552
3529
  this.tooltipTimeout = setTimeout(function () {
3553
- $tooltip = _this30.$refs.tooltip;
3530
+ $tooltip = _this29.$refs.tooltip;
3554
3531
 
3555
3532
  if ($tooltip && !$tooltip.isActived()) {
3556
- _this30.closeTooltip();
3533
+ _this29.closeTooltip();
3557
3534
  }
3558
3535
  }, tooltipOpts.leaveDelay);
3559
3536
  } else {
@@ -3562,19 +3539,24 @@ var Methods = {
3562
3539
  },
3563
3540
  triggerHeaderHelpEvent: function triggerHeaderHelpEvent(evnt, params) {
3564
3541
  var column = params.column;
3565
- var titleHelp = column.titleHelp;
3542
+ var titlePrefix = column.titlePrefix || column.titleHelp;
3566
3543
 
3567
- if (titleHelp.content || titleHelp.message) {
3544
+ if (titlePrefix.content || titlePrefix.message) {
3568
3545
  var $refs = this.$refs,
3569
3546
  tooltipStore = this.tooltipStore;
3570
- var $tooltip = $refs.tooltip;
3571
- var content = (0, _utils.getFuncText)(titleHelp.content || titleHelp.message);
3547
+ var content = (0, _utils.getFuncText)(titlePrefix.content || titlePrefix.message);
3572
3548
  this.handleTargetEnterEvent(true);
3573
3549
  tooltipStore.visible = true;
3550
+ tooltipStore.currOpts = _objectSpread(_objectSpread({}, titlePrefix), {}, {
3551
+ content: null
3552
+ });
3553
+ this.$nextTick(function () {
3554
+ var $tooltip = $refs.tooltip;
3574
3555
 
3575
- if ($tooltip) {
3576
- $tooltip.open(evnt.currentTarget, content);
3577
- }
3556
+ if ($tooltip) {
3557
+ $tooltip.open(evnt.currentTarget, content);
3558
+ }
3559
+ });
3578
3560
  }
3579
3561
  },
3580
3562
 
@@ -3660,7 +3642,6 @@ var Methods = {
3660
3642
  var showAll = tooltipOpts.showAll,
3661
3643
  enabled = tooltipOpts.enabled,
3662
3644
  contentMethod = tooltipOpts.contentMethod;
3663
- var tooltip = $refs.tooltip;
3664
3645
  var customContent = contentMethod ? contentMethod(params) : null;
3665
3646
  var useCustom = contentMethod && !_xeUtils.default.eqNull(customContent);
3666
3647
  var content = useCustom ? customContent : (column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim();
@@ -3670,12 +3651,16 @@ var Methods = {
3670
3651
  Object.assign(tooltipStore, {
3671
3652
  row: row,
3672
3653
  column: column,
3673
- visible: true
3654
+ visible: true,
3655
+ currOpts: null
3674
3656
  });
3657
+ this.$nextTick(function () {
3658
+ var $tooltip = $refs.tooltip;
3675
3659
 
3676
- if (tooltip) {
3677
- tooltip.open(isCellOverflow ? overflowElem : tipElem || overflowElem, _utils.default.formatText(content));
3678
- }
3660
+ if ($tooltip) {
3661
+ $tooltip.open(isCellOverflow ? overflowElem : tipElem || overflowElem, _utils.default.formatText(content));
3662
+ }
3663
+ });
3679
3664
  }
3680
3665
 
3681
3666
  return this.$nextTick();
@@ -3705,7 +3690,8 @@ var Methods = {
3705
3690
  row: null,
3706
3691
  column: null,
3707
3692
  content: null,
3708
- visible: false
3693
+ visible: false,
3694
+ currOpts: null
3709
3695
  });
3710
3696
 
3711
3697
  if (tooltip) {
@@ -3783,14 +3769,14 @@ var Methods = {
3783
3769
  * @param {Boolean} value 是否选中
3784
3770
  */
3785
3771
  setCheckboxRow: function setCheckboxRow(rows, value) {
3786
- var _this31 = this;
3772
+ var _this30 = this;
3787
3773
 
3788
3774
  if (rows && !_xeUtils.default.isArray(rows)) {
3789
3775
  rows = [rows];
3790
3776
  }
3791
3777
 
3792
3778
  rows.forEach(function (row) {
3793
- return _this31.handleSelectRow({
3779
+ return _this30.handleSelectRow({
3794
3780
  row: row
3795
3781
  }, !!value);
3796
3782
  });
@@ -3814,7 +3800,7 @@ var Methods = {
3814
3800
  * value 选中true 不选false 半选-1
3815
3801
  */
3816
3802
  handleSelectRow: function handleSelectRow(_ref6, value) {
3817
- var _this32 = this;
3803
+ var _this31 = this;
3818
3804
 
3819
3805
  var row = _ref6.row;
3820
3806
  var selection = this.selection,
@@ -3847,7 +3833,7 @@ var Methods = {
3847
3833
  return half === item;
3848
3834
  });
3849
3835
 
3850
- _this32.handleCheckboxReserveRow(row, value);
3836
+ _this31.handleCheckboxReserveRow(row, value);
3851
3837
  }
3852
3838
  }, treeOpts);
3853
3839
  } // 如果存在父节点,更新父节点状态
@@ -3921,7 +3907,7 @@ var Methods = {
3921
3907
  return half === item;
3922
3908
  });
3923
3909
 
3924
- _this32.handleCheckboxReserveRow(row, value);
3910
+ _this31.handleCheckboxReserveRow(row, value);
3925
3911
  }
3926
3912
  }, treeOpts);
3927
3913
  } // 如果存在父节点,更新父节点状态
@@ -4025,7 +4011,7 @@ var Methods = {
4025
4011
  * @param {Boolean} value 是否选中
4026
4012
  */
4027
4013
  setAllCheckboxRow: function setAllCheckboxRow(value) {
4028
- var _this33 = this;
4014
+ var _this32 = this;
4029
4015
 
4030
4016
  var afterFullData = this.afterFullData,
4031
4017
  treeConfig = this.treeConfig,
@@ -4138,11 +4124,11 @@ var Methods = {
4138
4124
  if (reserve) {
4139
4125
  if (value) {
4140
4126
  selectRows.forEach(function (row) {
4141
- checkboxReserveRowMap[getRowid(_this33, row)] = row;
4127
+ checkboxReserveRowMap[getRowid(_this32, row)] = row;
4142
4128
  });
4143
4129
  } else {
4144
4130
  afterFullData.forEach(function (row) {
4145
- return _this33.handleCheckboxReserveRow(row, false);
4131
+ return _this32.handleCheckboxReserveRow(row, false);
4146
4132
  });
4147
4133
  }
4148
4134
  }
@@ -4362,7 +4348,7 @@ var Methods = {
4362
4348
  * 获取复选框保留选中的行
4363
4349
  */
4364
4350
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
4365
- var _this34 = this;
4351
+ var _this33 = this;
4366
4352
 
4367
4353
  var fullDataRowIdData = this.fullDataRowIdData,
4368
4354
  afterFullData = this.afterFullData,
@@ -4377,11 +4363,11 @@ var Methods = {
4377
4363
 
4378
4364
  if (treeConfig) {
4379
4365
  _xeUtils.default.eachTree(afterFullData, function (row) {
4380
- afterFullIdMaps[getRowid(_this34, row)] = 1;
4366
+ afterFullIdMaps[getRowid(_this33, row)] = 1;
4381
4367
  }, treeOpts);
4382
4368
  } else {
4383
4369
  afterFullData.forEach(function (row) {
4384
- afterFullIdMaps[getRowid(_this34, row)] = 1;
4370
+ afterFullIdMaps[getRowid(_this33, row)] = 1;
4385
4371
  });
4386
4372
  }
4387
4373
 
@@ -4447,7 +4433,7 @@ var Methods = {
4447
4433
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
4448
4434
  */
4449
4435
  clearCheckboxRow: function clearCheckboxRow() {
4450
- var _this35 = this;
4436
+ var _this34 = this;
4451
4437
 
4452
4438
  var tableFullData = this.tableFullData,
4453
4439
  treeConfig = this.treeConfig,
@@ -4470,7 +4456,7 @@ var Methods = {
4470
4456
 
4471
4457
  if (reserve) {
4472
4458
  tableFullData.forEach(function (row) {
4473
- return _this35.handleCheckboxReserveRow(row, false);
4459
+ return _this34.handleCheckboxReserveRow(row, false);
4474
4460
  });
4475
4461
  }
4476
4462
 
@@ -4762,13 +4748,13 @@ var Methods = {
4762
4748
  * 如果存在规则,则校验
4763
4749
  */
4764
4750
  handleChangeCell: function handleChangeCell(evnt, params) {
4765
- var _this36 = this;
4751
+ var _this35 = this;
4766
4752
 
4767
4753
  this.checkValidate('blur').catch(function (e) {
4768
4754
  return e;
4769
4755
  }).then(function () {
4770
- _this36.handleActived(params, evnt).then(function () {
4771
- return _this36.checkValidate('change');
4756
+ _this35.handleActived(params, evnt).then(function () {
4757
+ return _this35.checkValidate('change');
4772
4758
  }).catch(function (e) {
4773
4759
  return e;
4774
4760
  });
@@ -4871,7 +4857,7 @@ var Methods = {
4871
4857
  * 如果是双击模式,则激活为编辑状态
4872
4858
  */
4873
4859
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
4874
- var _this37 = this;
4860
+ var _this36 = this;
4875
4861
 
4876
4862
  var editStore = this.editStore,
4877
4863
  editConfig = this.editConfig,
@@ -4886,15 +4872,15 @@ var Methods = {
4886
4872
  this.checkValidate('blur').catch(function (e) {
4887
4873
  return e;
4888
4874
  }).then(function () {
4889
- _this37.handleActived(params, evnt).then(function () {
4890
- return _this37.checkValidate('change');
4875
+ _this36.handleActived(params, evnt).then(function () {
4876
+ return _this36.checkValidate('change');
4891
4877
  }).catch(function (e) {
4892
4878
  return e;
4893
4879
  });
4894
4880
  });
4895
4881
  } else if (editOpts.mode === 'cell') {
4896
4882
  this.handleActived(params, evnt).then(function () {
4897
- return _this37.checkValidate('change');
4883
+ return _this36.checkValidate('change');
4898
4884
  }).catch(function (e) {
4899
4885
  return e;
4900
4886
  });
@@ -4905,7 +4891,7 @@ var Methods = {
4905
4891
  this.emitEvent('cell-dblclick', params, evnt);
4906
4892
  },
4907
4893
  handleDefaultSort: function handleDefaultSort() {
4908
- var _this38 = this;
4894
+ var _this37 = this;
4909
4895
 
4910
4896
  var sortConfig = this.sortConfig,
4911
4897
  sortOpts = this.sortOpts;
@@ -4922,7 +4908,7 @@ var Methods = {
4922
4908
  order = item.order;
4923
4909
 
4924
4910
  if (field && order) {
4925
- var column = _this38.getColumnByField(field);
4911
+ var column = _this37.getColumnByField(field);
4926
4912
 
4927
4913
  if (column && column.sortable) {
4928
4914
  column.order = order;
@@ -4965,7 +4951,7 @@ var Methods = {
4965
4951
  }
4966
4952
  },
4967
4953
  sort: function sort(sortConfs, sortOrder) {
4968
- var _this39 = this;
4954
+ var _this38 = this;
4969
4955
 
4970
4956
  var sortOpts = this.sortOpts;
4971
4957
  var multiple = sortOpts.multiple,
@@ -4998,7 +4984,7 @@ var Methods = {
4998
4984
  var column = field;
4999
4985
 
5000
4986
  if (_xeUtils.default.isString(field)) {
5001
- column = _this39.getColumnByField(field);
4987
+ column = _this38.getColumnByField(field);
5002
4988
  }
5003
4989
 
5004
4990
  if (column && (column.sortable || column.remoteSort)) {
@@ -5007,7 +4993,7 @@ var Methods = {
5007
4993
  }
5008
4994
 
5009
4995
  if (orders.indexOf(order) === -1) {
5010
- order = getNextSortOrder(_this39, column);
4996
+ order = getNextSortOrder(_this38, column);
5011
4997
  }
5012
4998
 
5013
4999
  if (column.order !== order) {
@@ -5160,7 +5146,7 @@ var Methods = {
5160
5146
  * @param {Row} row 行对象
5161
5147
  */
5162
5148
  reloadRowExpand: function reloadRowExpand(row) {
5163
- var _this40 = this;
5149
+ var _this39 = this;
5164
5150
 
5165
5151
  var expandOpts = this.expandOpts,
5166
5152
  expandLazyLoadeds = this.expandLazyLoadeds;
@@ -5168,7 +5154,7 @@ var Methods = {
5168
5154
 
5169
5155
  if (lazy && expandLazyLoadeds.indexOf(row) === -1) {
5170
5156
  this.clearRowExpandLoaded(row).then(function () {
5171
- return _this40.handleAsyncRowExpand(row);
5157
+ return _this39.handleAsyncRowExpand(row);
5172
5158
  });
5173
5159
  }
5174
5160
 
@@ -5247,29 +5233,29 @@ var Methods = {
5247
5233
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
5248
5234
  },
5249
5235
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
5250
- var _this41 = this;
5236
+ var _this40 = this;
5251
5237
 
5252
5238
  var rest = this.fullAllDataRowMap.get(row);
5253
5239
  return new Promise(function (resolve) {
5254
- _this41.expandLazyLoadeds.push(row);
5240
+ _this40.expandLazyLoadeds.push(row);
5255
5241
 
5256
- _this41.expandOpts.loadMethod({
5257
- $table: _this41,
5242
+ _this40.expandOpts.loadMethod({
5243
+ $table: _this40,
5258
5244
  row: row,
5259
- rowIndex: _this41.getRowIndex(row),
5260
- $rowIndex: _this41.getVMRowIndex(row)
5245
+ rowIndex: _this40.getRowIndex(row),
5246
+ $rowIndex: _this40.getVMRowIndex(row)
5261
5247
  }).catch(function (e) {
5262
5248
  return e;
5263
5249
  }).then(function () {
5264
5250
  rest.expandLoaded = true;
5265
5251
 
5266
- _xeUtils.default.remove(_this41.expandLazyLoadeds, function (item) {
5252
+ _xeUtils.default.remove(_this40.expandLazyLoadeds, function (item) {
5267
5253
  return item === row;
5268
5254
  });
5269
5255
 
5270
- _this41.rowExpandeds.push(row);
5256
+ _this40.rowExpandeds.push(row);
5271
5257
 
5272
- resolve(_this41.$nextTick().then(_this41.recalculate));
5258
+ resolve(_this40.$nextTick().then(_this40.recalculate));
5273
5259
  });
5274
5260
  });
5275
5261
  },
@@ -5282,7 +5268,7 @@ var Methods = {
5282
5268
  * @param {Boolean} expanded 是否展开
5283
5269
  */
5284
5270
  setRowExpand: function setRowExpand(rows, expanded) {
5285
- var _this42 = this;
5271
+ var _this41 = this;
5286
5272
 
5287
5273
  var fullAllDataRowMap = this.fullAllDataRowMap,
5288
5274
  expandLazyLoadeds = this.expandLazyLoadeds,
@@ -5315,8 +5301,8 @@ var Methods = {
5315
5301
  columnIndex: columnIndex,
5316
5302
  $columnIndex: $columnIndex,
5317
5303
  row: row,
5318
- rowIndex: _this42.getRowIndex(row),
5319
- $rowIndex: _this42.getVMRowIndex(row)
5304
+ rowIndex: _this41.getRowIndex(row),
5305
+ $rowIndex: _this41.getVMRowIndex(row)
5320
5306
  });
5321
5307
  }) : rows;
5322
5308
 
@@ -5327,7 +5313,7 @@ var Methods = {
5327
5313
  var isLoad = lazy && !rest.expandLoaded && expandLazyLoadeds.indexOf(row) === -1;
5328
5314
 
5329
5315
  if (isLoad) {
5330
- lazyRests.push(_this42.handleAsyncRowExpand(row));
5316
+ lazyRests.push(_this41.handleAsyncRowExpand(row));
5331
5317
  } else {
5332
5318
  rowExpandeds.push(row);
5333
5319
  }
@@ -5341,7 +5327,7 @@ var Methods = {
5341
5327
 
5342
5328
  if (reserve) {
5343
5329
  validRows.forEach(function (row) {
5344
- return _this42.handleRowExpandReserve(row, expanded);
5330
+ return _this41.handleRowExpandReserve(row, expanded);
5345
5331
  });
5346
5332
  }
5347
5333
  }
@@ -5362,7 +5348,7 @@ var Methods = {
5362
5348
  * 手动清空展开行状态,数据会恢复成未展开的状态
5363
5349
  */
5364
5350
  clearRowExpand: function clearRowExpand() {
5365
- var _this43 = this;
5351
+ var _this42 = this;
5366
5352
 
5367
5353
  var expandOpts = this.expandOpts,
5368
5354
  rowExpandeds = this.rowExpandeds,
@@ -5373,13 +5359,13 @@ var Methods = {
5373
5359
 
5374
5360
  if (reserve) {
5375
5361
  tableFullData.forEach(function (row) {
5376
- return _this43.handleRowExpandReserve(row, false);
5362
+ return _this42.handleRowExpandReserve(row, false);
5377
5363
  });
5378
5364
  }
5379
5365
 
5380
5366
  return this.$nextTick().then(function () {
5381
5367
  if (isExists) {
5382
- _this43.recalculate();
5368
+ _this42.recalculate();
5383
5369
  }
5384
5370
  });
5385
5371
  },
@@ -5459,7 +5445,7 @@ var Methods = {
5459
5445
  * @param {Row} row 行对象
5460
5446
  */
5461
5447
  reloadTreeExpand: function reloadTreeExpand(row) {
5462
- var _this44 = this;
5448
+ var _this43 = this;
5463
5449
 
5464
5450
  var treeOpts = this.treeOpts,
5465
5451
  treeLazyLoadeds = this.treeLazyLoadeds;
@@ -5469,15 +5455,15 @@ var Methods = {
5469
5455
 
5470
5456
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
5471
5457
  this.clearTreeExpandLoaded(row).then(function () {
5472
- return _this44.handleAsyncTreeExpandChilds(row);
5458
+ return _this43.handleAsyncTreeExpandChilds(row);
5473
5459
  }).then(function () {
5474
5460
  if (transform) {
5475
- _this44.handleVirtualTreeToList();
5461
+ _this43.handleVirtualTreeToList();
5476
5462
 
5477
- return _this44.handleTableData();
5463
+ return _this43.handleTableData();
5478
5464
  }
5479
5465
  }).then(function () {
5480
- return _this44.recalculate();
5466
+ return _this43.recalculate();
5481
5467
  });
5482
5468
  }
5483
5469
 
@@ -5555,7 +5541,7 @@ var Methods = {
5555
5541
  }
5556
5542
  },
5557
5543
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
5558
- var _this45 = this;
5544
+ var _this44 = this;
5559
5545
 
5560
5546
  var fullAllDataRowMap = this.fullAllDataRowMap,
5561
5547
  treeExpandeds = this.treeExpandeds,
@@ -5569,7 +5555,7 @@ var Methods = {
5569
5555
  return new Promise(function (resolve) {
5570
5556
  treeLazyLoadeds.push(row);
5571
5557
  loadMethod({
5572
- $table: _this45,
5558
+ $table: _this44,
5573
5559
  row: row
5574
5560
  }).catch(function () {
5575
5561
  return [];
@@ -5585,29 +5571,29 @@ var Methods = {
5585
5571
  }
5586
5572
 
5587
5573
  if (childRecords) {
5588
- _this45.loadTreeChildren(row, childRecords).then(function (childRows) {
5574
+ _this44.loadTreeChildren(row, childRecords).then(function (childRows) {
5589
5575
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
5590
5576
  treeExpandeds.push(row);
5591
5577
  } // 如果当前节点已选中,则展开后子节点也被选中
5592
5578
 
5593
5579
 
5594
- if (!checkStrictly && _this45.isCheckedByCheckboxRow(row)) {
5595
- _this45.setCheckboxRow(childRows, true);
5580
+ if (!checkStrictly && _this44.isCheckedByCheckboxRow(row)) {
5581
+ _this44.setCheckboxRow(childRows, true);
5596
5582
  }
5597
5583
 
5598
- _this45.$nextTick().then(function () {
5584
+ _this44.$nextTick().then(function () {
5599
5585
  if (transform) {
5600
- return _this45.handleTableData();
5586
+ return _this44.handleTableData();
5601
5587
  }
5602
5588
  }).then(function () {
5603
- return _this45.recalculate();
5589
+ return _this44.recalculate();
5604
5590
  }).then(function () {
5605
5591
  return resolve();
5606
5592
  });
5607
5593
  });
5608
5594
  } else {
5609
- _this45.$nextTick().then(function () {
5610
- return _this45.recalculate();
5595
+ _this44.$nextTick().then(function () {
5596
+ return _this44.recalculate();
5611
5597
  }).then(function () {
5612
5598
  return resolve();
5613
5599
  });
@@ -5645,7 +5631,7 @@ var Methods = {
5645
5631
  * @returns
5646
5632
  */
5647
5633
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
5648
- var _this46 = this;
5634
+ var _this45 = this;
5649
5635
 
5650
5636
  var fullAllDataRowMap = this.fullAllDataRowMap,
5651
5637
  tableFullData = this.tableFullData,
@@ -5693,7 +5679,7 @@ var Methods = {
5693
5679
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1; // 是否使用懒加载
5694
5680
 
5695
5681
  if (isLoad) {
5696
- result.push(_this46.handleAsyncTreeExpandChilds(row));
5682
+ result.push(_this45.handleAsyncTreeExpandChilds(row));
5697
5683
  } else {
5698
5684
  if (row[children] && row[children].length) {
5699
5685
  treeExpandeds.push(row);
@@ -5709,7 +5695,7 @@ var Methods = {
5709
5695
 
5710
5696
  if (reserve) {
5711
5697
  validRows.forEach(function (row) {
5712
- return _this46.handleTreeExpandReserve(row, expanded);
5698
+ return _this45.handleTreeExpandReserve(row, expanded);
5713
5699
  });
5714
5700
  }
5715
5701
 
@@ -5723,14 +5709,14 @@ var Methods = {
5723
5709
  * @returns
5724
5710
  */
5725
5711
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
5726
- var _this47 = this;
5712
+ var _this46 = this;
5727
5713
 
5728
5714
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
5729
- _this47.handleVirtualTreeToList();
5715
+ _this46.handleVirtualTreeToList();
5730
5716
 
5731
- return _this47.handleTableData();
5717
+ return _this46.handleTableData();
5732
5718
  }).then(function () {
5733
- return _this47.recalculate();
5719
+ return _this46.recalculate();
5734
5720
  });
5735
5721
  },
5736
5722
 
@@ -5775,7 +5761,7 @@ var Methods = {
5775
5761
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
5776
5762
  */
5777
5763
  clearTreeExpand: function clearTreeExpand() {
5778
- var _this48 = this;
5764
+ var _this47 = this;
5779
5765
 
5780
5766
  var treeOpts = this.treeOpts,
5781
5767
  treeExpandeds = this.treeExpandeds,
@@ -5787,19 +5773,19 @@ var Methods = {
5787
5773
 
5788
5774
  if (reserve) {
5789
5775
  _xeUtils.default.eachTree(tableFullData, function (row) {
5790
- return _this48.handleTreeExpandReserve(row, false);
5776
+ return _this47.handleTreeExpandReserve(row, false);
5791
5777
  }, treeOpts);
5792
5778
  }
5793
5779
 
5794
5780
  return this.handleTableData().then(function () {
5795
5781
  if (transform) {
5796
- _this48.handleVirtualTreeToList();
5782
+ _this47.handleVirtualTreeToList();
5797
5783
 
5798
- return _this48.handleTableData();
5784
+ return _this47.handleTableData();
5799
5785
  }
5800
5786
  }).then(function () {
5801
5787
  if (isExists) {
5802
- _this48.recalculate();
5788
+ _this47.recalculate();
5803
5789
  }
5804
5790
  });
5805
5791
  },
@@ -5929,18 +5915,18 @@ var Methods = {
5929
5915
  },
5930
5916
  // 计算可视渲染相关数据
5931
5917
  computeScrollLoad: function computeScrollLoad() {
5932
- var _this49 = this;
5918
+ var _this48 = this;
5933
5919
 
5934
5920
  return this.$nextTick().then(function () {
5935
- var sYOpts = _this49.sYOpts,
5936
- sXOpts = _this49.sXOpts,
5937
- scrollXLoad = _this49.scrollXLoad,
5938
- scrollYLoad = _this49.scrollYLoad,
5939
- scrollXStore = _this49.scrollXStore,
5940
- scrollYStore = _this49.scrollYStore; // 计算 X 逻辑
5921
+ var sYOpts = _this48.sYOpts,
5922
+ sXOpts = _this48.sXOpts,
5923
+ scrollXLoad = _this48.scrollXLoad,
5924
+ scrollYLoad = _this48.scrollYLoad,
5925
+ scrollXStore = _this48.scrollXStore,
5926
+ scrollYStore = _this48.scrollYStore; // 计算 X 逻辑
5941
5927
 
5942
5928
  if (scrollXLoad) {
5943
- var _computeVirtualX3 = computeVirtualX(_this49),
5929
+ var _computeVirtualX3 = computeVirtualX(_this48),
5944
5930
  visibleXSize = _computeVirtualX3.visibleSize;
5945
5931
 
5946
5932
  var offsetXSize = sXOpts.oSize ? _xeUtils.default.toNumber(sXOpts.oSize) : _dom.browse.msie ? 10 : _dom.browse.edge ? 5 : 0;
@@ -5948,13 +5934,13 @@ var Methods = {
5948
5934
  scrollXStore.visibleSize = visibleXSize;
5949
5935
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
5950
5936
 
5951
- _this49.updateScrollXData();
5937
+ _this48.updateScrollXData();
5952
5938
  } else {
5953
- _this49.updateScrollXSpace();
5939
+ _this48.updateScrollXSpace();
5954
5940
  } // 计算 Y 逻辑
5955
5941
 
5956
5942
 
5957
- var _computeVirtualY = computeVirtualY(_this49),
5943
+ var _computeVirtualY = computeVirtualY(_this48),
5958
5944
  rowHeight = _computeVirtualY.rowHeight,
5959
5945
  visibleYSize = _computeVirtualY.visibleSize;
5960
5946
 
@@ -5966,14 +5952,14 @@ var Methods = {
5966
5952
  scrollYStore.visibleSize = visibleYSize;
5967
5953
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
5968
5954
 
5969
- _this49.updateScrollYData();
5955
+ _this48.updateScrollYData();
5970
5956
  } else {
5971
- _this49.updateScrollYSpace();
5957
+ _this48.updateScrollYSpace();
5972
5958
  }
5973
5959
 
5974
- _this49.rowHeight = rowHeight;
5960
+ _this48.rowHeight = rowHeight;
5975
5961
 
5976
- _this49.$nextTick(_this49.updateStyle);
5962
+ _this48.$nextTick(_this48.updateStyle);
5977
5963
  });
5978
5964
  },
5979
5965
  handleTableColumn: function handleTableColumn() {
@@ -6087,7 +6073,7 @@ var Methods = {
6087
6073
  * @param {Number} scrollTop 上距离
6088
6074
  */
6089
6075
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
6090
- var _this50 = this;
6076
+ var _this49 = this;
6091
6077
 
6092
6078
  var $refs = this.$refs;
6093
6079
  var tableBody = $refs.tableBody,
@@ -6108,7 +6094,7 @@ var Methods = {
6108
6094
  if (this.scrollXLoad || this.scrollYLoad) {
6109
6095
  return new Promise(function (resolve) {
6110
6096
  return setTimeout(function () {
6111
- return resolve(_this50.$nextTick());
6097
+ return resolve(_this49.$nextTick());
6112
6098
  }, 50);
6113
6099
  });
6114
6100
  }
@@ -6159,7 +6145,7 @@ var Methods = {
6159
6145
  * @param {Row} row 行对象
6160
6146
  */
6161
6147
  scrollToTreeRow: function scrollToTreeRow(row) {
6162
- var _this51 = this;
6148
+ var _this50 = this;
6163
6149
 
6164
6150
  var tableFullData = this.tableFullData,
6165
6151
  treeConfig = this.treeConfig,
@@ -6174,15 +6160,15 @@ var Methods = {
6174
6160
  if (matchObj) {
6175
6161
  var nodes = matchObj.nodes;
6176
6162
  nodes.forEach(function (row, index) {
6177
- if (index < nodes.length - 1 && !_this51.isTreeExpandByRow(row)) {
6178
- rests.push(_this51.setTreeExpand(row, true));
6163
+ if (index < nodes.length - 1 && !_this50.isTreeExpandByRow(row)) {
6164
+ rests.push(_this50.setTreeExpand(row, true));
6179
6165
  }
6180
6166
  });
6181
6167
  }
6182
6168
  }
6183
6169
 
6184
6170
  return Promise.all(rests).then(function () {
6185
- return _dom.default.rowToVisible(_this51, row);
6171
+ return _dom.default.rowToVisible(_this50, row);
6186
6172
  });
6187
6173
  },
6188
6174
 
@@ -6246,29 +6232,29 @@ var Methods = {
6246
6232
  * 如果单元格配置了校验规则,则会进行校验
6247
6233
  */
6248
6234
  updateStatus: function updateStatus(scope, cellValue) {
6249
- var _this52 = this;
6235
+ var _this51 = this;
6250
6236
 
6251
6237
  var customVal = !_xeUtils.default.isUndefined(cellValue);
6252
6238
  return this.$nextTick().then(function () {
6253
- var $refs = _this52.$refs,
6254
- editRules = _this52.editRules,
6255
- validStore = _this52.validStore;
6239
+ var $refs = _this51.$refs,
6240
+ editRules = _this51.editRules,
6241
+ validStore = _this51.validStore;
6256
6242
 
6257
6243
  if (scope && $refs.tableBody && editRules) {
6258
6244
  var row = scope.row,
6259
6245
  column = scope.column;
6260
6246
  var type = 'change';
6261
6247
 
6262
- if (_this52.hasCellRules(type, row, column)) {
6263
- var cell = _this52.getCell(row, column);
6248
+ if (_this51.hasCellRules(type, row, column)) {
6249
+ var cell = _this51.getCell(row, column);
6264
6250
 
6265
6251
  if (cell) {
6266
- return _this52.validCellRules(type, row, column, cellValue).then(function () {
6252
+ return _this51.validCellRules(type, row, column, cellValue).then(function () {
6267
6253
  if (customVal && validStore.visible) {
6268
6254
  setCellValue(row, column, cellValue);
6269
6255
  }
6270
6256
 
6271
- _this52.clearValidate();
6257
+ _this51.clearValidate();
6272
6258
  }).catch(function (_ref8) {
6273
6259
  var rule = _ref8.rule;
6274
6260
 
@@ -6276,7 +6262,7 @@ var Methods = {
6276
6262
  setCellValue(row, column, cellValue);
6277
6263
  }
6278
6264
 
6279
- _this52.showValidTooltip({
6265
+ _this51.showValidTooltip({
6280
6266
  rule: rule,
6281
6267
  row: row,
6282
6268
  column: column,
@@ -6297,7 +6283,7 @@ var Methods = {
6297
6283
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
6298
6284
  */
6299
6285
  setMergeCells: function setMergeCells(merges) {
6300
- var _this53 = this;
6286
+ var _this52 = this;
6301
6287
 
6302
6288
  if (this.spanMethod) {
6303
6289
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -6305,7 +6291,7 @@ var Methods = {
6305
6291
 
6306
6292
  setMerges(this, merges, this.mergeList, this.afterFullData);
6307
6293
  return this.$nextTick().then(function () {
6308
- return _this53.updateCellAreas();
6294
+ return _this52.updateCellAreas();
6309
6295
  });
6310
6296
  },
6311
6297
 
@@ -6314,7 +6300,7 @@ var Methods = {
6314
6300
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
6315
6301
  */
6316
6302
  removeMergeCells: function removeMergeCells(merges) {
6317
- var _this54 = this;
6303
+ var _this53 = this;
6318
6304
 
6319
6305
  if (this.spanMethod) {
6320
6306
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -6322,7 +6308,7 @@ var Methods = {
6322
6308
 
6323
6309
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
6324
6310
  return this.$nextTick().then(function () {
6325
- _this54.updateCellAreas();
6311
+ _this53.updateCellAreas();
6326
6312
 
6327
6313
  return rest;
6328
6314
  });
@@ -6346,7 +6332,7 @@ var Methods = {
6346
6332
  this.setMergeFooterItems(this.mergeFooterItems);
6347
6333
  },
6348
6334
  setMergeFooterItems: function setMergeFooterItems(merges) {
6349
- var _this55 = this;
6335
+ var _this54 = this;
6350
6336
 
6351
6337
  if (this.footerSpanMethod) {
6352
6338
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -6354,11 +6340,11 @@ var Methods = {
6354
6340
 
6355
6341
  setMerges(this, merges, this.mergeFooterList, null);
6356
6342
  return this.$nextTick().then(function () {
6357
- return _this55.updateCellAreas();
6343
+ return _this54.updateCellAreas();
6358
6344
  });
6359
6345
  },
6360
6346
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
6361
- var _this56 = this;
6347
+ var _this55 = this;
6362
6348
 
6363
6349
  if (this.footerSpanMethod) {
6364
6350
  (0, _log.errLog)('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -6366,7 +6352,7 @@ var Methods = {
6366
6352
 
6367
6353
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
6368
6354
  return this.$nextTick().then(function () {
6369
- _this56.updateCellAreas();
6355
+ _this55.updateCellAreas();
6370
6356
 
6371
6357
  return rest;
6372
6358
  });