vxe-table 3.10.1 → 3.10.2

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 (119) hide show
  1. package/es/locale/lang/en-US.js +3 -2
  2. package/es/locale/lang/es-ES.js +3 -2
  3. package/es/locale/lang/hu-HU.js +3 -2
  4. package/es/locale/lang/ja-JP.js +3 -2
  5. package/es/locale/lang/ko-KR.js +3 -2
  6. package/es/locale/lang/pt-BR.js +3 -2
  7. package/es/locale/lang/ru-RU.js +3 -2
  8. package/es/locale/lang/uk-UA.js +3 -2
  9. package/es/locale/lang/vi-VN.js +3 -2
  10. package/es/locale/lang/zh-CHT.js +3 -2
  11. package/es/locale/lang/zh-CN.js +3 -2
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table/module/edit/mixin.js +9 -4
  15. package/es/table/src/body.js +43 -24
  16. package/es/table/src/cell.js +54 -24
  17. package/es/table/src/column.js +3 -1
  18. package/es/table/src/columnInfo.js +1 -0
  19. package/es/table/src/methods.js +211 -14
  20. package/es/table/src/props.js +2 -0
  21. package/es/table/src/table.js +16 -1
  22. package/es/table/style.css +74 -2
  23. package/es/table/style.min.css +1 -1
  24. package/es/ui/index.js +4 -1
  25. package/es/ui/src/log.js +1 -1
  26. package/es/vxe-table/style.css +74 -2
  27. package/es/vxe-table/style.min.css +1 -1
  28. package/helper/vetur/attributes.json +1 -1
  29. package/helper/vetur/tags.json +1 -1
  30. package/lib/index.umd.js +367 -75
  31. package/lib/index.umd.min.js +1 -1
  32. package/lib/locale/lang/en-US.js +3 -2
  33. package/lib/locale/lang/en-US.min.js +1 -1
  34. package/lib/locale/lang/en-US.umd.js +3 -2
  35. package/lib/locale/lang/es-ES.js +3 -2
  36. package/lib/locale/lang/es-ES.min.js +1 -1
  37. package/lib/locale/lang/es-ES.umd.js +3 -2
  38. package/lib/locale/lang/hu-HU.js +3 -2
  39. package/lib/locale/lang/hu-HU.min.js +1 -1
  40. package/lib/locale/lang/hu-HU.umd.js +3 -2
  41. package/lib/locale/lang/ja-JP.js +3 -2
  42. package/lib/locale/lang/ja-JP.min.js +1 -1
  43. package/lib/locale/lang/ja-JP.umd.js +3 -2
  44. package/lib/locale/lang/ko-KR.js +3 -2
  45. package/lib/locale/lang/ko-KR.min.js +1 -1
  46. package/lib/locale/lang/ko-KR.umd.js +3 -2
  47. package/lib/locale/lang/pt-BR.js +3 -2
  48. package/lib/locale/lang/pt-BR.min.js +1 -1
  49. package/lib/locale/lang/pt-BR.umd.js +3 -2
  50. package/lib/locale/lang/ru-RU.js +3 -2
  51. package/lib/locale/lang/ru-RU.min.js +1 -1
  52. package/lib/locale/lang/ru-RU.umd.js +3 -2
  53. package/lib/locale/lang/uk-UA.js +3 -2
  54. package/lib/locale/lang/uk-UA.min.js +1 -1
  55. package/lib/locale/lang/uk-UA.umd.js +3 -2
  56. package/lib/locale/lang/vi-VN.js +3 -2
  57. package/lib/locale/lang/vi-VN.min.js +1 -1
  58. package/lib/locale/lang/zh-CHT.js +3 -2
  59. package/lib/locale/lang/zh-CHT.min.js +1 -1
  60. package/lib/locale/lang/zh-CHT.umd.js +3 -2
  61. package/lib/locale/lang/zh-CN.js +3 -2
  62. package/lib/locale/lang/zh-CN.min.js +1 -1
  63. package/lib/locale/lang/zh-CN.umd.js +3 -2
  64. package/lib/style.css +1 -1
  65. package/lib/style.min.css +1 -1
  66. package/lib/table/module/edit/mixin.js +9 -4
  67. package/lib/table/module/edit/mixin.min.js +1 -1
  68. package/lib/table/src/body.js +41 -22
  69. package/lib/table/src/body.min.js +1 -1
  70. package/lib/table/src/cell.js +58 -24
  71. package/lib/table/src/cell.min.js +1 -1
  72. package/lib/table/src/column.js +3 -1
  73. package/lib/table/src/column.min.js +1 -1
  74. package/lib/table/src/columnInfo.js +1 -0
  75. package/lib/table/src/columnInfo.min.js +1 -1
  76. package/lib/table/src/methods.js +227 -14
  77. package/lib/table/src/methods.min.js +1 -1
  78. package/lib/table/src/props.js +2 -0
  79. package/lib/table/src/props.min.js +1 -1
  80. package/lib/table/src/table.js +15 -2
  81. package/lib/table/src/table.min.js +1 -1
  82. package/lib/table/style/style.css +74 -2
  83. package/lib/table/style/style.min.css +1 -1
  84. package/lib/ui/index.js +4 -1
  85. package/lib/ui/index.min.js +1 -1
  86. package/lib/ui/src/log.js +1 -1
  87. package/lib/ui/src/log.min.js +1 -1
  88. package/lib/vxe-table/style/style.css +74 -2
  89. package/lib/vxe-table/style/style.min.css +1 -1
  90. package/package.json +2 -2
  91. package/packages/locale/lang/en-US.ts +3 -2
  92. package/packages/locale/lang/es-ES.ts +3 -2
  93. package/packages/locale/lang/hu-HU.ts +3 -2
  94. package/packages/locale/lang/ja-JP.ts +3 -2
  95. package/packages/locale/lang/ko-KR.ts +3 -2
  96. package/packages/locale/lang/pt-BR.ts +3 -2
  97. package/packages/locale/lang/ru-RU.ts +3 -2
  98. package/packages/locale/lang/uk-UA.ts +3 -2
  99. package/packages/locale/lang/vi-VN.ts +3 -2
  100. package/packages/locale/lang/zh-CHT.ts +3 -2
  101. package/packages/locale/lang/zh-CN.ts +3 -2
  102. package/packages/table/module/custom/panel.ts +8 -8
  103. package/packages/table/module/edit/mixin.ts +10 -4
  104. package/packages/table/src/body.ts +43 -24
  105. package/packages/table/src/cell.ts +58 -24
  106. package/packages/table/src/column.ts +3 -1
  107. package/packages/table/src/columnInfo.ts +1 -0
  108. package/packages/table/src/methods.ts +227 -14
  109. package/packages/table/src/props.ts +2 -0
  110. package/packages/table/src/table.ts +16 -1
  111. package/packages/ui/index.ts +3 -0
  112. package/styles/components/table-module/custom.scss +9 -3
  113. package/styles/components/table.scss +80 -0
  114. /package/es/{iconfont.1730710763407.ttf → iconfont.1730873052490.ttf} +0 -0
  115. /package/es/{iconfont.1730710763407.woff → iconfont.1730873052490.woff} +0 -0
  116. /package/es/{iconfont.1730710763407.woff2 → iconfont.1730873052490.woff2} +0 -0
  117. /package/lib/{iconfont.1730710763407.ttf → iconfont.1730873052490.ttf} +0 -0
  118. /package/lib/{iconfont.1730710763407.woff → iconfont.1730873052490.woff} +0 -0
  119. /package/lib/{iconfont.1730710763407.woff2 → iconfont.1730873052490.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.10.1";
2223
+ const version = "3.10.2";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2257,6 +2257,9 @@ core_.VxeUI.setConfig({
2257
2257
  // trigger: 'default'
2258
2258
  strict: true
2259
2259
  },
2260
+ dragConfig: {
2261
+ showIcon: true
2262
+ },
2260
2263
  checkboxConfig: {
2261
2264
  // trigger: 'default',
2262
2265
  strict: true
@@ -2764,7 +2767,7 @@ function isNodeElement(elem) {
2764
2767
  const {
2765
2768
  log: log_log
2766
2769
  } = core_.VxeUI;
2767
- const log_version = `table v${"3.10.1"}`;
2770
+ const log_version = `table v${"3.10.2"}`;
2768
2771
  const warnLog = log_log.create('warn', log_version);
2769
2772
  const errLog = log_log.create('error', log_version);
2770
2773
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -2862,6 +2865,7 @@ class ColumnInfo {
2862
2865
  filterRecoverMethod: _vm.filterRecoverMethod,
2863
2866
  filterRender: _vm.filterRender,
2864
2867
  treeNode: _vm.treeNode,
2868
+ dragSort: _vm.dragSort,
2865
2869
  cellType: _vm.cellType,
2866
2870
  cellRender: _vm.cellRender,
2867
2871
  editRender: _vm.editRender,
@@ -3469,7 +3473,8 @@ const {
3469
3473
  getI18n: cell_getI18n,
3470
3474
  getIcon: cell_getIcon,
3471
3475
  renderer: cell_renderer,
3472
- formats: cell_formats
3476
+ formats: cell_formats,
3477
+ renderEmptyElement
3473
3478
  } = core_.VxeUI;
3474
3479
  function renderTitlePrefixIcon(h, params) {
3475
3480
  const {
@@ -3507,6 +3512,39 @@ function renderTitleSuffixIcon(h, params) {
3507
3512
  }
3508
3513
  })] : [];
3509
3514
  }
3515
+ function renderCellDragIcon(h, params) {
3516
+ const {
3517
+ $table
3518
+ } = params;
3519
+ return h('span', {
3520
+ key: 'dg',
3521
+ class: 'vxe-cell--drag-handle',
3522
+ on: {
3523
+ mousedown(evnt) {
3524
+ $table.handleCellDragMousedownEvent(evnt, params);
3525
+ },
3526
+ mouseup: $table.handleCellDragMouseupEvent
3527
+ }
3528
+ }, [h('i', {
3529
+ class: 'vxe-table-icon-drag-handle'
3530
+ })]);
3531
+ }
3532
+ function renderCellBaseVNs(h, params, content) {
3533
+ const {
3534
+ $table,
3535
+ column
3536
+ } = params;
3537
+ const {
3538
+ dragSort
3539
+ } = column;
3540
+ const vns = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content];
3541
+ const rowOpts = $table.computeRowOpts;
3542
+ const dragOpts = $table.computeDragOpts;
3543
+ if (dragSort && rowOpts.drag && dragOpts.showIcon) {
3544
+ vns.unshift(renderCellDragIcon(h, params));
3545
+ }
3546
+ return vns;
3547
+ }
3510
3548
  function renderTitleContent(h, params, content) {
3511
3549
  const {
3512
3550
  $table,
@@ -3727,7 +3765,7 @@ const Cell = {
3727
3765
  } = column;
3728
3766
  const renderOpts = editRender || cellRender;
3729
3767
  if (slots && slots.default) {
3730
- return $table.callSlot(slots.default, params, h);
3768
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
3731
3769
  }
3732
3770
  if (renderOpts) {
3733
3771
  const compConf = cell_renderer.get(renderOpts.name);
@@ -3735,20 +3773,20 @@ const Cell = {
3735
3773
  const rtCell = compConf ? compConf.renderTableCell || compConf.renderCell : null;
3736
3774
  const renderFn = editRender ? rtCell : rtDefault;
3737
3775
  if (renderFn) {
3738
- return getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({
3776
+ return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({
3739
3777
  $type: editRender ? 'edit' : 'cell'
3740
- }, params)));
3778
+ }, params))));
3741
3779
  }
3742
3780
  }
3743
3781
  const cellValue = $table.getCellLabel(row, column);
3744
3782
  const cellPlaceholder = editRender ? editRender.placeholder : '';
3745
- return [h('span', {
3783
+ return renderCellBaseVNs(h, params, [h('span', {
3746
3784
  class: 'vxe-cell--label'
3747
3785
  }, [
3748
3786
  // 如果设置占位符
3749
3787
  editRender && eqEmptyValue(cellValue) ? h('span', {
3750
3788
  class: 'vxe-cell--placeholder'
3751
- }, formatText(getFuncText(cellPlaceholder), 1)) : h('span', formatText(cellValue, 1))])];
3789
+ }, formatText(getFuncText(cellPlaceholder), 1)) : h('span', formatText(cellValue, 1))])]);
3752
3790
  },
3753
3791
  renderTreeCell(h, params) {
3754
3792
  return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params));
@@ -3858,13 +3896,13 @@ const Cell = {
3858
3896
  slots
3859
3897
  } = column;
3860
3898
  if (slots && slots.default) {
3861
- return $table.callSlot(slots.default, params, h);
3899
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
3862
3900
  }
3863
3901
  const {
3864
3902
  seq
3865
3903
  } = params;
3866
3904
  const seqMethod = seqOpts.seqMethod;
3867
- return [formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)];
3905
+ return renderCellBaseVNs(h, params, [h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)]);
3868
3906
  },
3869
3907
  renderTreeIndexCell(h, params) {
3870
3908
  return Cell.renderTreeIcon(h, params, Cell.renderSeqCell(h, params));
@@ -3936,7 +3974,7 @@ const Cell = {
3936
3974
  visible: isVisible
3937
3975
  };
3938
3976
  if (radioSlot) {
3939
- return $table.callSlot(radioSlot, radioParams, h);
3977
+ return renderCellBaseVNs(h, params, $table.callSlot(radioSlot, radioParams, h));
3940
3978
  }
3941
3979
  const radioVNs = [];
3942
3980
  if (isVisible) {
@@ -3949,13 +3987,13 @@ const Cell = {
3949
3987
  class: 'vxe-radio--label'
3950
3988
  }, defaultSlot ? $table.callSlot(defaultSlot, radioParams, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)));
3951
3989
  }
3952
- return [h('span', {
3990
+ return renderCellBaseVNs(h, params, [h('span', {
3953
3991
  class: ['vxe-cell--radio', {
3954
3992
  'is--checked': isChecked,
3955
3993
  'is--disabled': isDisabled
3956
3994
  }],
3957
3995
  on
3958
- }, radioVNs)];
3996
+ }, radioVNs)]);
3959
3997
  },
3960
3998
  renderTreeRadioCell(h, params) {
3961
3999
  return Cell.renderTreeIcon(h, params, Cell.renderRadioCell(h, params));
@@ -4077,7 +4115,7 @@ const Cell = {
4077
4115
  indeterminate
4078
4116
  };
4079
4117
  if (checkboxSlot) {
4080
- return $table.callSlot(checkboxSlot, checkboxParams, h);
4118
+ return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
4081
4119
  }
4082
4120
  const checkVNs = [];
4083
4121
  if (isVisible) {
@@ -4090,7 +4128,7 @@ const Cell = {
4090
4128
  class: 'vxe-checkbox--label'
4091
4129
  }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)));
4092
4130
  }
4093
- return [h('span', {
4131
+ return renderCellBaseVNs(h, params, [h('span', {
4094
4132
  class: ['vxe-cell--checkbox', {
4095
4133
  'is--checked': isChecked,
4096
4134
  'is--disabled': isDisabled,
@@ -4098,7 +4136,7 @@ const Cell = {
4098
4136
  'is--hidden': !isVisible
4099
4137
  }],
4100
4138
  on
4101
- }, checkVNs)];
4139
+ }, checkVNs)]);
4102
4140
  },
4103
4141
  renderTreeSelectionCell(h, params) {
4104
4142
  return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCell(h, params));
@@ -4161,7 +4199,7 @@ const Cell = {
4161
4199
  indeterminate: isIndeterminate
4162
4200
  };
4163
4201
  if (checkboxSlot) {
4164
- return $table.callSlot(checkboxSlot, checkboxParams, h);
4202
+ return renderCellBaseVNs(h, params, $table.callSlot(checkboxSlot, checkboxParams, h));
4165
4203
  }
4166
4204
  const checkVNs = [];
4167
4205
  if (isVisible) {
@@ -4174,7 +4212,7 @@ const Cell = {
4174
4212
  class: 'vxe-checkbox--label'
4175
4213
  }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)));
4176
4214
  }
4177
- return [h('span', {
4215
+ return renderCellBaseVNs(h, params, [h('span', {
4178
4216
  class: ['vxe-cell--checkbox', {
4179
4217
  'is--checked': isChecked,
4180
4218
  'is--disabled': isDisabled,
@@ -4182,7 +4220,7 @@ const Cell = {
4182
4220
  'is--hidden': !isVisible
4183
4221
  }],
4184
4222
  on
4185
- }, checkVNs)];
4223
+ }, checkVNs)]);
4186
4224
  },
4187
4225
  renderTreeSelectionCellByProp(h, params) {
4188
4226
  return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCellByProp(h, params));
@@ -4218,7 +4256,7 @@ const Cell = {
4218
4256
  let isAceived = false;
4219
4257
  let isLazyLoading = false;
4220
4258
  if (slots && slots.icon) {
4221
- return $table.callSlot(slots.icon, params, h);
4259
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.icon, params, h));
4222
4260
  }
4223
4261
  if (!isHidden) {
4224
4262
  const rowid = getRowid($table, row);
@@ -4227,7 +4265,7 @@ const Cell = {
4227
4265
  isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
4228
4266
  }
4229
4267
  }
4230
- return [showIcon && (!visibleMethod || visibleMethod(params)) ? h('span', {
4268
+ return renderCellBaseVNs(h, params, [showIcon && (!visibleMethod || visibleMethod(params)) ? h('span', {
4231
4269
  class: ['vxe-table--expanded', {
4232
4270
  'is--active': isAceived
4233
4271
  }],
@@ -4238,9 +4276,9 @@ const Cell = {
4238
4276
  }
4239
4277
  }, [h('i', {
4240
4278
  class: ['vxe-table--expand-btn', isLazyLoading ? iconLoaded || cell_getIcon().TABLE_EXPAND_LOADED : isAceived ? iconOpen || cell_getIcon().TABLE_EXPAND_OPEN : iconClose || cell_getIcon().TABLE_EXPAND_CLOSE]
4241
- })]) : null, defaultSlot || labelField ? h('span', {
4279
+ })]) : renderEmptyElement($table), defaultSlot || labelField ? h('span', {
4242
4280
  class: 'vxe-table--expand-label'
4243
- }, defaultSlot ? $table.callSlot(defaultSlot, params, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)) : null];
4281
+ }, defaultSlot ? $table.callSlot(defaultSlot, params, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)) : renderEmptyElement($table)]);
4244
4282
  },
4245
4283
  renderExpandData(h, params) {
4246
4284
  const {
@@ -4275,14 +4313,14 @@ const Cell = {
4275
4313
  slots
4276
4314
  } = column;
4277
4315
  if (slots && slots.default) {
4278
- return $table.callSlot(slots.default, params, h);
4316
+ return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
4279
4317
  }
4280
- return [h('span', {
4318
+ return renderCellBaseVNs(h, params, [h('span', {
4281
4319
  class: 'vxe-cell--html',
4282
4320
  domProps: {
4283
4321
  innerHTML: getDefaultCellLabel(params)
4284
4322
  }
4285
- })];
4323
+ })]);
4286
4324
  },
4287
4325
  renderTreeHTMLCell(h, params) {
4288
4326
  return Cell.renderTreeIcon(h, params, Cell.renderHTMLCell(h, params));
@@ -4569,8 +4607,10 @@ const props = {
4569
4607
  filterRecoverMethod: Function,
4570
4608
  // 筛选模板配置项
4571
4609
  filterRender: Object,
4572
- // 指定为树节点
4610
+ // 设置为树节点
4573
4611
  treeNode: Boolean,
4612
+ // 设置为拖拽排序
4613
+ dragSort: Boolean,
4574
4614
  // 是否可视
4575
4615
  visible: {
4576
4616
  type: Boolean,
@@ -5077,6 +5117,51 @@ function getOrderField(_vm, column) {
5077
5117
  return cellValue;
5078
5118
  };
5079
5119
  }
5120
+ function clearRowDropOrigin($xeTable) {
5121
+ const el = $xeTable.$el;
5122
+ if (el) {
5123
+ const clss = 'row--drag-origin';
5124
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.${clss}`), elem => {
5125
+ elem.draggable = false;
5126
+ removeClass(elem, clss);
5127
+ });
5128
+ }
5129
+ }
5130
+ function clearRowDropTarget($xeTable) {
5131
+ const el = $xeTable.$el;
5132
+ if (el) {
5133
+ const clss = 'row--drag-active-target';
5134
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.${clss}`), elem => {
5135
+ removeClass(elem, clss);
5136
+ });
5137
+ }
5138
+ }
5139
+ function showRowDropTip(evnt, $xeTable) {
5140
+ const rdTipEl = $xeTable.$refs.refRowDragTipElem;
5141
+ if (!rdTipEl) {
5142
+ return;
5143
+ }
5144
+ const el = $xeTable.$el;
5145
+ if (!el) {
5146
+ return;
5147
+ }
5148
+ if (rdTipEl) {
5149
+ const wrapperRect = el.getBoundingClientRect();
5150
+ rdTipEl.style.display = 'block';
5151
+ rdTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
5152
+ rdTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - rdTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
5153
+ }
5154
+ }
5155
+ const hideRowDropTip = $xeTable => {
5156
+ const rdTipEl = $xeTable.$refs.refRowDragTipElem;
5157
+ if (rdTipEl) {
5158
+ rdTipEl.style.display = '';
5159
+ }
5160
+ };
5161
+ const updateRowDropTipContent = ($xeTable, tdEl) => {
5162
+ const reactData = $xeTable;
5163
+ reactData.dragTipText = tdEl.textContent || '';
5164
+ };
5080
5165
  const Methods = {
5081
5166
  callSlot(slotFunc, params, h, vNodes) {
5082
5167
  if (slotFunc) {
@@ -10135,6 +10220,160 @@ const Methods = {
10135
10220
  this.emitEvent('sort-change', params, evnt);
10136
10221
  }
10137
10222
  },
10223
+ handleRowDragDragstartEvent(evnt) {
10224
+ const img = new Image();
10225
+ if (evnt.dataTransfer) {
10226
+ evnt.dataTransfer.setDragImage(img, 0, 0);
10227
+ }
10228
+ },
10229
+ handleRowDragDragendEvent(evnt) {
10230
+ const $xeTable = this;
10231
+ const props = $xeTable;
10232
+ const reactData = $xeTable;
10233
+ const internalData = $xeTable;
10234
+ const {
10235
+ treeConfig
10236
+ } = props;
10237
+ const rowOpts = $xeTable.computeRowOpts;
10238
+ const {
10239
+ dragEndMethod
10240
+ } = rowOpts;
10241
+ const treeOpts = $xeTable.computeTreeOpts;
10242
+ const {
10243
+ transform
10244
+ } = treeOpts;
10245
+ const {
10246
+ dragRow
10247
+ } = reactData;
10248
+ const {
10249
+ afterFullData,
10250
+ tableFullData,
10251
+ prevDragRow,
10252
+ prevDragPos
10253
+ } = internalData;
10254
+ if (prevDragRow && dragRow) {
10255
+ // 判断是否有拖动
10256
+ if (prevDragRow !== dragRow) {
10257
+ Promise.resolve(dragEndMethod ? dragEndMethod({
10258
+ oldRow: dragRow,
10259
+ newRow: prevDragRow
10260
+ }) : true).then(status => {
10261
+ if (!status) {
10262
+ return;
10263
+ }
10264
+ const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
10265
+ // 移出源位置
10266
+ const oafIndex = $xeTable.findRowIndexOf(afterFullData, dragRow);
10267
+ const otfIndex = $xeTable.findRowIndexOf(tableFullData, dragRow);
10268
+ afterFullData.splice(oafIndex, 1);
10269
+ tableFullData.splice(otfIndex, 1);
10270
+ // 插新位置
10271
+ const pafIndex = $xeTable.findRowIndexOf(afterFullData, prevDragRow);
10272
+ const ptfIndex = $xeTable.findRowIndexOf(tableFullData, prevDragRow);
10273
+ const nafIndex = pafIndex + dragOffsetIndex;
10274
+ const ntfIndex = ptfIndex + dragOffsetIndex;
10275
+ afterFullData.splice(nafIndex, 0, dragRow);
10276
+ tableFullData.splice(ntfIndex, 0, dragRow);
10277
+ reactData.isDragRowMove = true;
10278
+ $xeTable.cacheRowMap();
10279
+ $xeTable.updateScrollYStatus();
10280
+ $xeTable.handleTableData(treeConfig && transform);
10281
+ if (!(treeConfig && transform)) {
10282
+ $xeTable.updateAfterDataIndex();
10283
+ }
10284
+ $xeTable.updateFooter();
10285
+ $xeTable.checkSelectionStatus();
10286
+ if (reactData.scrollYLoad) {
10287
+ $xeTable.updateScrollYSpace();
10288
+ }
10289
+ $xeTable.$nextTick().then(() => {
10290
+ $xeTable.updateCellAreas();
10291
+ return $xeTable.recalculate();
10292
+ });
10293
+ $xeTable.dispatchEvent('row-dragend', {
10294
+ oldRow: dragRow,
10295
+ newRow: prevDragRow,
10296
+ _index: {
10297
+ newIndex: nafIndex,
10298
+ oldIndex: oafIndex
10299
+ }
10300
+ }, evnt);
10301
+ }).catch(() => {});
10302
+ }
10303
+ }
10304
+ hideRowDropTip($xeTable);
10305
+ clearRowDropOrigin($xeTable);
10306
+ clearRowDropTarget($xeTable);
10307
+ reactData.dragRow = null;
10308
+ setTimeout(() => {
10309
+ reactData.isDragRowMove = false;
10310
+ }, 500);
10311
+ },
10312
+ handleRowDragDragoverEvent(evnt) {
10313
+ const $xeTable = this;
10314
+ const internalData = $xeTable;
10315
+ const reactData = $xeTable;
10316
+ const trEl = evnt.currentTarget;
10317
+ const rowid = trEl.getAttribute('rowid');
10318
+ const row = $xeTable.getRowById(rowid);
10319
+ clearRowDropTarget($xeTable);
10320
+ if (row) {
10321
+ evnt.preventDefault();
10322
+ evnt.preventDefault();
10323
+ const {
10324
+ dragRow
10325
+ } = reactData;
10326
+ const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
10327
+ const dragPos = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
10328
+ addClass(trEl, 'row--drag-active-target');
10329
+ trEl.setAttribute('drag-pos', dragPos);
10330
+ internalData.prevDragRow = row;
10331
+ internalData.prevDragPos = dragPos;
10332
+ $xeTable.dispatchEvent('row-dragover', {
10333
+ oldRow: dragRow,
10334
+ targetRow: row,
10335
+ dragPos
10336
+ }, evnt);
10337
+ }
10338
+ showRowDropTip(evnt, $xeTable);
10339
+ },
10340
+ handleCellDragMousedownEvent(evnt, params) {
10341
+ const $xeTable = this;
10342
+ const reactData = $xeTable;
10343
+ evnt.stopPropagation();
10344
+ const rowOpts = $xeTable.computeRowOpts;
10345
+ const {
10346
+ dragStartMethod
10347
+ } = rowOpts;
10348
+ const {
10349
+ row
10350
+ } = params;
10351
+ const dragEl = evnt.currentTarget;
10352
+ const tdEl = dragEl.parentNode?.parentNode;
10353
+ const trEl = tdEl.parentNode;
10354
+ reactData.isDragRowMove = false;
10355
+ clearRowDropOrigin($xeTable);
10356
+ if (dragStartMethod && !dragStartMethod(params)) {
10357
+ trEl.draggable = false;
10358
+ reactData.dragRow = null;
10359
+ hideRowDropTip($xeTable);
10360
+ return;
10361
+ }
10362
+ reactData.dragRow = row;
10363
+ trEl.draggable = true;
10364
+ addClass(trEl, 'row--drag-origin');
10365
+ showRowDropTip(evnt, $xeTable);
10366
+ updateRowDropTipContent($xeTable, tdEl);
10367
+ $xeTable.dispatchEvent('row-dragstart', params, evnt);
10368
+ },
10369
+ handleCellDragMouseupEvent() {
10370
+ const $xeTable = this;
10371
+ const reactData = $xeTable;
10372
+ clearRowDropOrigin($xeTable);
10373
+ hideRowDropTip($xeTable);
10374
+ reactData.dragRow = null;
10375
+ reactData.isDragRowMove = false;
10376
+ },
10138
10377
  setPendingRow(rows, status) {
10139
10378
  const pendingMaps = {
10140
10379
  ...this.pendingRowMaps
@@ -11234,7 +11473,7 @@ const Methods = {
11234
11473
  const bodyWidth = bodyElem ? bodyElem.clientWidth : 0;
11235
11474
  const scrollHeight = bodyElem ? bodyElem.scrollHeight : 0;
11236
11475
  const scrollWidth = bodyElem ? bodyElem.scrollWidth : 0;
11237
- $xeTable.dispatchEvent('scroll', {
11476
+ const evntParams = {
11238
11477
  bodyHeight,
11239
11478
  bodyWidth,
11240
11479
  scrollHeight,
@@ -11242,7 +11481,8 @@ const Methods = {
11242
11481
  isX: isRollX,
11243
11482
  isY: isRollY,
11244
11483
  ...params
11245
- }, evnt);
11484
+ };
11485
+ $xeTable.dispatchEvent('scroll', evntParams, evnt);
11246
11486
  },
11247
11487
  /**
11248
11488
  * 纵向 Y 可视渲染事件处理
@@ -11270,15 +11510,23 @@ const Methods = {
11270
11510
  leading: false,
11271
11511
  trailing: true
11272
11512
  }),
11273
- scrollXEvent(evnt) {
11513
+ handleSyncScrollX(scrollLeft) {
11274
11514
  const $xeTable = this;
11275
- const wrapperEl = evnt.currentTarget;
11276
11515
  const tableHeader = $xeTable.$refs.tableHeader;
11277
11516
  const tableBody = $xeTable.$refs.tableBody;
11278
11517
  const tableFooter = $xeTable.$refs.tableFooter;
11279
11518
  const bodyElem = tableBody.$el;
11280
11519
  const headerElem = tableHeader ? tableHeader.$el : null;
11281
11520
  const footerElem = tableFooter ? tableFooter.$el : null;
11521
+ $xeTable.lastScrollLeft = scrollLeft;
11522
+ $xeTable.lastScrollTime = Date.now();
11523
+ setScrollLeft(bodyElem, scrollLeft);
11524
+ setScrollLeft(headerElem, scrollLeft);
11525
+ setScrollLeft(footerElem, scrollLeft);
11526
+ },
11527
+ scrollXEvent(evnt) {
11528
+ const $xeTable = this;
11529
+ const wrapperEl = evnt.currentTarget;
11282
11530
  const {
11283
11531
  scrollTop,
11284
11532
  scrollLeft
@@ -11287,9 +11535,7 @@ const Methods = {
11287
11535
  const isRollY = false;
11288
11536
  $xeTable.lastScrollLeft = scrollLeft;
11289
11537
  $xeTable.lastScrollTime = Date.now();
11290
- setScrollLeft(bodyElem, scrollLeft);
11291
- setScrollLeft(headerElem, scrollLeft);
11292
- setScrollLeft(footerElem, scrollLeft);
11538
+ $xeTable.handleSyncScrollX(scrollLeft);
11293
11539
  $xeTable.triggerScrollXEvent(evnt);
11294
11540
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
11295
11541
  type: 'table',
@@ -11304,15 +11550,23 @@ const Methods = {
11304
11550
  leading: false,
11305
11551
  trailing: true
11306
11552
  }),
11307
- scrollYEvent(evnt) {
11553
+ handleSyncScrollY(scrollTop) {
11308
11554
  const $xeTable = this;
11309
- const wrapperEl = evnt.currentTarget;
11310
11555
  const tableBody = $xeTable.$refs.tableBody;
11311
11556
  const leftBody = $xeTable.$refs.leftBody;
11312
11557
  const rightBody = $xeTable.$refs.rightBody;
11313
11558
  const bodyElem = tableBody.$el;
11314
11559
  const leftElem = leftBody ? leftBody.$el : null;
11315
11560
  const rightElem = rightBody ? rightBody.$el : null;
11561
+ $xeTable.lastScrollTop = scrollTop;
11562
+ $xeTable.lastScrollTime = Date.now();
11563
+ setScrollTop(bodyElem, scrollTop);
11564
+ setScrollTop(leftElem, scrollTop);
11565
+ setScrollTop(rightElem, scrollTop);
11566
+ },
11567
+ scrollYEvent(evnt) {
11568
+ const $xeTable = this;
11569
+ const wrapperEl = evnt.currentTarget;
11316
11570
  const {
11317
11571
  scrollTop,
11318
11572
  scrollLeft
@@ -11321,9 +11575,7 @@ const Methods = {
11321
11575
  const isRollY = true;
11322
11576
  $xeTable.lastScrollTop = scrollTop;
11323
11577
  $xeTable.lastScrollTime = Date.now();
11324
- setScrollTop(bodyElem, scrollTop);
11325
- setScrollTop(leftElem, scrollTop);
11326
- setScrollTop(rightElem, scrollTop);
11578
+ $xeTable.handleSyncScrollY(scrollTop);
11327
11579
  $xeTable.triggerScrollYEvent(evnt);
11328
11580
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
11329
11581
  type: 'table',
@@ -11438,7 +11690,7 @@ const Methods = {
11438
11690
  },
11439
11691
  updateScrollXData() {
11440
11692
  // this.tableColumn = []
11441
- this.$nextTick(() => {
11693
+ return this.$nextTick().then(() => {
11442
11694
  this.handleTableColumn();
11443
11695
  this.updateScrollXSpace();
11444
11696
  });
@@ -11500,7 +11752,7 @@ const Methods = {
11500
11752
  updateScrollYData() {
11501
11753
  const $xeTable = this;
11502
11754
  // this.tableData = []
11503
- this.$nextTick(() => {
11755
+ return this.$nextTick().then(() => {
11504
11756
  this.handleTableData();
11505
11757
  calcCellHeight($xeTable);
11506
11758
  this.updateScrollYSpace();
@@ -12299,7 +12551,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12299
12551
  'col--valid-error': !!errorValidItem,
12300
12552
  'col--current': currentColumn === column
12301
12553
  }, getClass(compCellClassName, params), getClass(className, params), getClass(allCellClassName, params)],
12302
- key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
12554
+ key: columnKey || columnOpts.useKey || rowOpts.useKey ? column.id : $columnIndex,
12303
12555
  attrs,
12304
12556
  style: Object.assign({
12305
12557
  height: cellHeight
@@ -12307,7 +12559,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12307
12559
  on: tdOns
12308
12560
  }, tdVNs);
12309
12561
  }
12310
- function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12562
+ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
12311
12563
  const {
12312
12564
  stripe,
12313
12565
  rowKey,
@@ -12331,39 +12583,51 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12331
12583
  rowOpts,
12332
12584
  pendingRowList,
12333
12585
  pendingRowMaps
12334
- } = $xetable;
12586
+ } = $xeTable;
12335
12587
  const childrenField = treeOpts.children || treeOpts.childrenField;
12336
12588
  const rows = [];
12337
12589
  tableData.forEach((row, $rowIndex) => {
12338
12590
  const trOn = {};
12339
12591
  let rowIndex = $rowIndex;
12340
- const _rowIndex = $xetable.getVTRowIndex(row);
12592
+ const _rowIndex = $xeTable.getVTRowIndex(row);
12341
12593
  // 确保任何情况下 rowIndex 都精准指向真实 data 索引
12342
- rowIndex = $xetable.getRowIndex(row);
12343
- // 事件绑定
12594
+ rowIndex = $xeTable.getRowIndex(row);
12595
+ // 当前行事件
12344
12596
  if (rowOpts.isHover || highlightHoverRow) {
12345
12597
  trOn.mouseenter = evnt => {
12346
- if (isVMScrollProcess($xetable)) {
12598
+ if (isVMScrollProcess($xeTable)) {
12347
12599
  return;
12348
12600
  }
12349
- $xetable.triggerHoverEvent(evnt, {
12601
+ $xeTable.triggerHoverEvent(evnt, {
12350
12602
  row,
12351
12603
  rowIndex
12352
12604
  });
12353
12605
  };
12354
12606
  trOn.mouseleave = () => {
12355
- if (isVMScrollProcess($xetable)) {
12607
+ if (isVMScrollProcess($xeTable)) {
12356
12608
  return;
12357
12609
  }
12358
- $xetable.clearHoverRow();
12610
+ $xeTable.clearHoverRow();
12611
+ };
12612
+ }
12613
+ // 拖拽行事件
12614
+ if (rowOpts.drag) {
12615
+ trOn.dragstart = evnt => {
12616
+ $xeTable.handleRowDragDragstartEvent(evnt);
12617
+ };
12618
+ trOn.dragover = evnt => {
12619
+ $xeTable.handleRowDragDragoverEvent(evnt);
12620
+ };
12621
+ trOn.dragend = evnt => {
12622
+ $xeTable.handleRowDragDragendEvent(evnt);
12359
12623
  };
12360
12624
  }
12361
- const rowid = getRowid($xetable, row);
12625
+ const rowid = getRowid($xeTable, row);
12362
12626
  const rest = fullAllDataRowIdData[rowid];
12363
12627
  const rowLevel = rest ? rest.level : 0;
12364
12628
  const seq = rest ? rest.seq : -1;
12365
12629
  const params = {
12366
- $table: $xetable,
12630
+ $table: $xeTable,
12367
12631
  seq,
12368
12632
  rowid,
12369
12633
  fixed: fixedType,
@@ -12381,7 +12645,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12381
12645
  // 是否新增行
12382
12646
  let isNewRow = false;
12383
12647
  if (editConfig) {
12384
- isNewRow = $xetable.isInsertByRow(row);
12648
+ isNewRow = $xeTable.isInsertByRow(row);
12385
12649
  }
12386
12650
  if (treeConfig && !scrollYLoad && !treeOpts.transform) {
12387
12651
  rowChildren = row[childrenField];
@@ -12389,23 +12653,23 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12389
12653
  }
12390
12654
  rows.push(h('tr', {
12391
12655
  class: ['vxe-body--row', treeConfig ? `row--level-${rowLevel}` : '', {
12392
- 'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
12656
+ 'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
12393
12657
  'is--new': isNewRow,
12394
12658
  'is--expand-row': isExpandRow,
12395
12659
  'is--expand-tree': isExpandTree,
12396
12660
  'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
12397
- 'row--radio': radioOpts.highlight && $xetable.selectRadioRow === row,
12398
- 'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row),
12661
+ 'row--radio': radioOpts.highlight && $xeTable.selectRadioRow === row,
12662
+ 'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
12399
12663
  'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
12400
12664
  }, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
12401
12665
  attrs: {
12402
12666
  rowid
12403
12667
  },
12404
12668
  style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
12405
- key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex,
12669
+ key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
12406
12670
  on: trOn
12407
12671
  }, tableColumn.map((column, $columnIndex) => {
12408
- return renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
12672
+ return renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
12409
12673
  })));
12410
12674
  // 如果行被展开了
12411
12675
  if (isExpandRow) {
@@ -12425,7 +12689,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12425
12689
  } = expandColumn;
12426
12690
  const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? allColumnOverflow : showOverflow;
12427
12691
  const expandParams = {
12428
- $table: $xetable,
12692
+ $table: $xeTable,
12429
12693
  seq,
12430
12694
  column: expandColumn,
12431
12695
  fixed: fixedType,
@@ -12461,7 +12725,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12461
12725
  }
12462
12726
  // 如果是树形表格
12463
12727
  if (isExpandTree) {
12464
- rows.push(...renderRows(h, _vm, $xetable, fixedType, rowChildren, tableColumn));
12728
+ rows.push(...renderRows(h, _vm, $xeTable, fixedType, rowChildren, tableColumn));
12465
12729
  }
12466
12730
  });
12467
12731
  return rows;
@@ -12547,7 +12811,9 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12547
12811
  emptyOpts,
12548
12812
  mouseConfig,
12549
12813
  mouseOpts,
12550
- sYOpts
12814
+ sYOpts,
12815
+ rowOpts,
12816
+ isDragRowMove
12551
12817
  } = $xetable;
12552
12818
  // 如果是使用优化模式
12553
12819
  if (fixedType) {
@@ -12628,7 +12894,12 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
12628
12894
  /**
12629
12895
  * 内容
12630
12896
  */
12631
- h('tbody', {
12897
+ rowOpts.drag ? h('transition-group', {
12898
+ props: {
12899
+ tag: 'tbody',
12900
+ name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`
12901
+ }
12902
+ }, renderRows(h, this, $xetable, fixedType, tableData, tableColumn)) : h('tbody', {
12632
12903
  ref: 'tbody'
12633
12904
  }, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))]), h('div', {
12634
12905
  class: 'vxe-table--checkbox-range'
@@ -13779,6 +14050,8 @@ const {
13779
14050
  cellConfig: Object,
13780
14051
  // 行配置信息
13781
14052
  rowConfig: Object,
14053
+ // 可拖拽配置项
14054
+ dragConfig: Object,
13782
14055
  // 列调整配置项
13783
14056
  resizableConfig: Object,
13784
14057
  // 序号配置项
@@ -13856,7 +14129,7 @@ const {
13856
14129
  const {
13857
14130
  getI18n: panel_getI18n,
13858
14131
  getIcon: panel_getIcon,
13859
- renderEmptyElement
14132
+ renderEmptyElement: panel_renderEmptyElement
13860
14133
  } = core_.VxeUI;
13861
14134
  function updateDropHint(_vm, evnt) {
13862
14135
  const {
@@ -14210,7 +14483,7 @@ const renderPopupPanel = (h, _vm) => {
14210
14483
  column.renderResizeWidth = Math.max(0, Number(value));
14211
14484
  }
14212
14485
  }
14213
- }) : renderEmptyElement($xeTableCustomPanel)]) : _e(), allowFixed ? h('td', {
14486
+ }) : panel_renderEmptyElement($xeTableCustomPanel)]) : _e(), allowFixed ? h('td', {
14214
14487
  class: 'vxe-table-custom-popup--column-item col--fixed'
14215
14488
  }, [parent ? h('span', '-') : h('vxe-radio-group', {
14216
14489
  props: {
@@ -14322,7 +14595,7 @@ const renderPopupPanel = (h, _vm) => {
14322
14595
  });
14323
14596
  }
14324
14597
  }
14325
- }) : renderEmptyElement($xeTableCustomPanel)]) : _e(), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : _e(), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : _e()])]), h('transition-group', {
14598
+ }) : panel_renderEmptyElement($xeTableCustomPanel)]) : _e(), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : _e(), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : _e()])]), h('transition-group', {
14326
14599
  class: 'vxe-table-custom--body',
14327
14600
  props: {
14328
14601
  tag: 'tbody',
@@ -14361,7 +14634,7 @@ const renderPopupPanel = (h, _vm) => {
14361
14634
  })]);
14362
14635
  }
14363
14636
  }
14364
- }) : renderEmptyElement($xeTableCustomPanel);
14637
+ }) : panel_renderEmptyElement($xeTableCustomPanel);
14365
14638
  };
14366
14639
  /* harmony default export */ var panel = ({
14367
14640
  name: 'VxeTableCustomPanel',
@@ -17313,9 +17586,11 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
17313
17586
  * 清除激活的编辑
17314
17587
  */
17315
17588
  _clearEdit(evnt) {
17589
+ const $xeTable = this;
17590
+ const reactData = $xeTable;
17316
17591
  const {
17317
17592
  editStore
17318
- } = this;
17593
+ } = reactData;
17319
17594
  const {
17320
17595
  actived,
17321
17596
  focused
@@ -17324,6 +17599,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
17324
17599
  row,
17325
17600
  column
17326
17601
  } = actived;
17602
+ const validOpts = $xeTable.validOpts;
17327
17603
  if (row || column) {
17328
17604
  this._syncActivedCell();
17329
17605
  actived.args = null;
@@ -17341,9 +17617,11 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
17341
17617
  }
17342
17618
  focused.row = null;
17343
17619
  focused.column = null;
17344
- if (mixin_getConfig().cellVaildMode === 'obsolete') {
17345
- if (this.clearValidate) {
17346
- return this.clearValidate();
17620
+ if (validOpts.autoClear) {
17621
+ if (validOpts.msgMode !== 'full' || mixin_getConfig().cellVaildMode === 'obsolete') {
17622
+ if (this.clearValidate) {
17623
+ return this.clearValidate();
17624
+ }
17347
17625
  }
17348
17626
  }
17349
17627
  return this.$nextTick();
@@ -20870,6 +21148,9 @@ function handleUupdateResize(_vm) {
20870
21148
  isHeader: false,
20871
21149
  isFooter: false
20872
21150
  },
21151
+ isDragRowMove: false,
21152
+ dragRow: null,
21153
+ dragTipText: '',
20873
21154
  _isLoading: false
20874
21155
  };
20875
21156
  },
@@ -20932,6 +21213,9 @@ function handleUupdateResize(_vm) {
20932
21213
  computeRowOpts() {
20933
21214
  return Object.assign({}, table_getConfig().table.rowConfig, this.rowConfig);
20934
21215
  },
21216
+ computeDragOpts() {
21217
+ return Object.assign({}, table_getConfig().table.dragConfig, this.dragConfig);
21218
+ },
20935
21219
  resizeOpts() {
20936
21220
  return this.computeResizeOpts;
20937
21221
  },
@@ -21850,9 +22134,16 @@ function handleUupdateResize(_vm) {
21850
22134
  ctxMenuStore,
21851
22135
  ctxMenuOpts
21852
22136
  }
21853
- }) : _e(), h('div', {}, [
22137
+ }) : _e(),
22138
+ /**
22139
+ * 拖拽提示
22140
+ */
22141
+ rowOpts.drag ? h('div', {
22142
+ ref: 'refRowDragTipElem',
22143
+ class: 'vxe-table--row-drag-hint'
22144
+ }, table_getI18n('vxe.table.dragTip', [this.dragTipText])) : _e(), h('div', {}, [
21854
22145
  /**
21855
- * 通用提示
22146
+ * 提示相关
21856
22147
  */
21857
22148
  VxeUITooltipComponent ? h(VxeUITooltipComponent, {
21858
22149
  key: 'ctp',
@@ -25286,7 +25577,8 @@ const Toolbar = VxeToolbar;
25286
25577
  customClose: '关闭',
25287
25578
  customCancel: '取消',
25288
25579
  customRestore: '恢复默认',
25289
- maxFixedCol: '最大冻结列的数量不能超过 {0} 个'
25580
+ maxFixedCol: '最大冻结列的数量不能超过 {0} 个',
25581
+ dragTip: '移动:{0}'
25290
25582
  },
25291
25583
  grid: {
25292
25584
  selectOneRecord: '请至少选择一条记录!',
@@ -25337,7 +25629,7 @@ const Toolbar = VxeToolbar;
25337
25629
  cstmCancel: '取消',
25338
25630
  cstmConfirm: '确定',
25339
25631
  cstmConfirmRestore: '请确认是否恢复成默认列配置?',
25340
- cstmDragTarget: '移动目标:{0}',
25632
+ cstmDragTarget: '移动:{0}',
25341
25633
  setting: {
25342
25634
  colSort: '排序',
25343
25635
  sortHelpTip: '点击并拖动图标可以调整列的排序',