vxe-table 3.14.0-beta.2 → 3.14.0-beta.20

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 (157) hide show
  1. package/es/grid/src/grid.js +78 -48
  2. package/es/locale/lang/ar-EG.js +7 -1
  3. package/es/locale/lang/de-DE.js +7 -1
  4. package/es/locale/lang/en-US.js +7 -1
  5. package/es/locale/lang/es-ES.js +7 -1
  6. package/es/locale/lang/fr-FR.js +7 -1
  7. package/es/locale/lang/hu-HU.js +7 -1
  8. package/es/locale/lang/hy-AM.js +7 -1
  9. package/es/locale/lang/id-ID.js +7 -1
  10. package/es/locale/lang/it-IT.js +7 -1
  11. package/es/locale/lang/ja-JP.js +7 -1
  12. package/es/locale/lang/ko-KR.js +7 -1
  13. package/es/locale/lang/nb-NO.js +7 -1
  14. package/es/locale/lang/pt-BR.js +7 -1
  15. package/es/locale/lang/ru-RU.js +7 -1
  16. package/es/locale/lang/th-TH.js +7 -1
  17. package/es/locale/lang/ug-CN.js +7 -1
  18. package/es/locale/lang/uk-UA.js +7 -1
  19. package/es/locale/lang/vi-VN.js +7 -1
  20. package/es/locale/lang/zh-CHT.js +7 -1
  21. package/es/locale/lang/zh-CN.js +7 -1
  22. package/es/style.css +1 -1
  23. package/es/table/module/filter/panel.js +12 -2
  24. package/es/table/module/keyboard/mixin.js +86 -21
  25. package/es/table/render/index.js +90 -59
  26. package/es/table/src/body.js +12 -7
  27. package/es/table/src/cell.js +10 -9
  28. package/es/table/src/footer.js +9 -4
  29. package/es/table/src/header.js +2 -2
  30. package/es/table/src/methods.js +444 -231
  31. package/es/table/src/props.js +4 -0
  32. package/es/table/src/table.js +28 -6
  33. package/es/table/src/util.js +65 -7
  34. package/es/ui/index.js +1 -1
  35. package/es/ui/src/log.js +1 -1
  36. package/helper/vetur/attributes.json +1 -1
  37. package/helper/vetur/tags.json +1 -1
  38. package/lib/grid/src/grid.js +85 -65
  39. package/lib/grid/src/grid.min.js +1 -1
  40. package/lib/index.umd.js +922 -448
  41. package/lib/index.umd.min.js +1 -1
  42. package/lib/locale/lang/ar-EG.js +7 -1
  43. package/lib/locale/lang/ar-EG.min.js +1 -1
  44. package/lib/locale/lang/de-DE.js +7 -1
  45. package/lib/locale/lang/de-DE.min.js +1 -1
  46. package/lib/locale/lang/en-US.js +7 -1
  47. package/lib/locale/lang/en-US.min.js +1 -1
  48. package/lib/locale/lang/en-US.umd.js +7 -1
  49. package/lib/locale/lang/es-ES.js +7 -1
  50. package/lib/locale/lang/es-ES.min.js +1 -1
  51. package/lib/locale/lang/es-ES.umd.js +7 -1
  52. package/lib/locale/lang/fr-FR.js +7 -1
  53. package/lib/locale/lang/fr-FR.min.js +1 -1
  54. package/lib/locale/lang/hu-HU.js +7 -1
  55. package/lib/locale/lang/hu-HU.min.js +1 -1
  56. package/lib/locale/lang/hu-HU.umd.js +7 -1
  57. package/lib/locale/lang/hy-AM.js +7 -1
  58. package/lib/locale/lang/hy-AM.min.js +1 -1
  59. package/lib/locale/lang/id-ID.js +7 -1
  60. package/lib/locale/lang/id-ID.min.js +1 -1
  61. package/lib/locale/lang/it-IT.js +7 -1
  62. package/lib/locale/lang/it-IT.min.js +1 -1
  63. package/lib/locale/lang/ja-JP.js +7 -1
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +7 -1
  66. package/lib/locale/lang/ko-KR.js +7 -1
  67. package/lib/locale/lang/ko-KR.min.js +1 -1
  68. package/lib/locale/lang/ko-KR.umd.js +7 -1
  69. package/lib/locale/lang/nb-NO.js +7 -1
  70. package/lib/locale/lang/nb-NO.min.js +1 -1
  71. package/lib/locale/lang/pt-BR.js +7 -1
  72. package/lib/locale/lang/pt-BR.min.js +1 -1
  73. package/lib/locale/lang/pt-BR.umd.js +7 -1
  74. package/lib/locale/lang/ru-RU.js +7 -1
  75. package/lib/locale/lang/ru-RU.min.js +1 -1
  76. package/lib/locale/lang/ru-RU.umd.js +7 -1
  77. package/lib/locale/lang/th-TH.js +7 -1
  78. package/lib/locale/lang/th-TH.min.js +1 -1
  79. package/lib/locale/lang/ug-CN.js +7 -1
  80. package/lib/locale/lang/ug-CN.min.js +1 -1
  81. package/lib/locale/lang/uk-UA.js +7 -1
  82. package/lib/locale/lang/uk-UA.min.js +1 -1
  83. package/lib/locale/lang/uk-UA.umd.js +7 -1
  84. package/lib/locale/lang/vi-VN.js +7 -1
  85. package/lib/locale/lang/vi-VN.min.js +1 -1
  86. package/lib/locale/lang/zh-CHT.js +7 -1
  87. package/lib/locale/lang/zh-CHT.min.js +1 -1
  88. package/lib/locale/lang/zh-CHT.umd.js +7 -1
  89. package/lib/locale/lang/zh-CN.js +7 -1
  90. package/lib/locale/lang/zh-CN.min.js +1 -1
  91. package/lib/locale/lang/zh-CN.umd.js +7 -1
  92. package/lib/style.css +1 -1
  93. package/lib/table/module/filter/panel.js +8 -2
  94. package/lib/table/module/filter/panel.min.js +1 -1
  95. package/lib/table/module/keyboard/mixin.js +89 -25
  96. package/lib/table/module/keyboard/mixin.min.js +1 -1
  97. package/lib/table/render/index.js +99 -64
  98. package/lib/table/render/index.min.js +1 -1
  99. package/lib/table/src/body.js +11 -6
  100. package/lib/table/src/body.min.js +1 -1
  101. package/lib/table/src/cell.js +15 -8
  102. package/lib/table/src/cell.min.js +1 -1
  103. package/lib/table/src/footer.js +9 -3
  104. package/lib/table/src/footer.min.js +1 -1
  105. package/lib/table/src/header.js +2 -1
  106. package/lib/table/src/header.min.js +1 -1
  107. package/lib/table/src/methods.js +491 -252
  108. package/lib/table/src/methods.min.js +1 -1
  109. package/lib/table/src/props.js +4 -0
  110. package/lib/table/src/props.min.js +1 -1
  111. package/lib/table/src/table.js +28 -6
  112. package/lib/table/src/table.min.js +1 -1
  113. package/lib/table/src/util.js +72 -7
  114. package/lib/table/src/util.min.js +1 -1
  115. package/lib/ui/index.js +1 -1
  116. package/lib/ui/index.min.js +1 -1
  117. package/lib/ui/src/log.js +1 -1
  118. package/lib/ui/src/log.min.js +1 -1
  119. package/package.json +2 -2
  120. package/packages/grid/src/grid.ts +92 -57
  121. package/packages/locale/lang/ar-EG.ts +7 -1
  122. package/packages/locale/lang/de-DE.ts +7 -1
  123. package/packages/locale/lang/en-US.ts +7 -1
  124. package/packages/locale/lang/es-ES.ts +7 -1
  125. package/packages/locale/lang/fr-FR.ts +7 -1
  126. package/packages/locale/lang/hu-HU.ts +7 -1
  127. package/packages/locale/lang/hy-AM.ts +7 -1
  128. package/packages/locale/lang/id-ID.ts +7 -1
  129. package/packages/locale/lang/it-IT.ts +7 -1
  130. package/packages/locale/lang/ja-JP.ts +7 -1
  131. package/packages/locale/lang/ko-KR.ts +7 -1
  132. package/packages/locale/lang/nb-NO.ts +7 -1
  133. package/packages/locale/lang/pt-BR.ts +7 -1
  134. package/packages/locale/lang/ru-RU.ts +7 -1
  135. package/packages/locale/lang/th-TH.ts +7 -1
  136. package/packages/locale/lang/ug-CN.ts +7 -1
  137. package/packages/locale/lang/uk-UA.ts +7 -1
  138. package/packages/locale/lang/vi-VN.ts +7 -1
  139. package/packages/locale/lang/zh-CHT.ts +7 -1
  140. package/packages/locale/lang/zh-CN.ts +7 -1
  141. package/packages/table/module/filter/panel.ts +12 -2
  142. package/packages/table/module/keyboard/mixin.ts +94 -27
  143. package/packages/table/render/index.ts +89 -57
  144. package/packages/table/src/body.ts +11 -6
  145. package/packages/table/src/cell.ts +10 -9
  146. package/packages/table/src/footer.ts +9 -4
  147. package/packages/table/src/header.ts +2 -2
  148. package/packages/table/src/methods.ts +486 -249
  149. package/packages/table/src/props.ts +16 -12
  150. package/packages/table/src/table.ts +36 -6
  151. package/packages/table/src/util.ts +73 -7
  152. /package/es/{iconfont.1741079977180.ttf → iconfont.1742353673989.ttf} +0 -0
  153. /package/es/{iconfont.1741079977180.woff → iconfont.1742353673989.woff} +0 -0
  154. /package/es/{iconfont.1741079977180.woff2 → iconfont.1742353673989.woff2} +0 -0
  155. /package/lib/{iconfont.1741079977180.ttf → iconfont.1742353673989.ttf} +0 -0
  156. /package/lib/{iconfont.1741079977180.woff → iconfont.1742353673989.woff} +0 -0
  157. /package/lib/{iconfont.1741079977180.woff2 → iconfont.1742353673989.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4,9 +4,9 @@
4
4
  else if(typeof define === 'function' && define.amd)
5
5
  define([, "@vxe-ui/core", "xe-utils"], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["VXETable"] = factory(require("vue"), require("@vxe-ui/core"), require("xe-utils"));
7
+ exports["VxeUITable"] = factory(require("vue"), require("@vxe-ui/core"), require("xe-utils"));
8
8
  else
9
- root["VXETable"] = factory(root["Vue"], root["VxeUI"], root["XEUtils"]);
9
+ root["VxeUITable"] = factory(root["Vue"], root["VxeUI"], root["XEUtils"]);
10
10
  })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__9274__, __WEBPACK_EXTERNAL_MODULE__4345__, __WEBPACK_EXTERNAL_MODULE__8871__) {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ "use strict";
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.14.0-beta.2";
2223
+ const version = "3.14.0-beta.20";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
2843
2843
  const {
2844
2844
  log: log_log
2845
2845
  } = core_.VxeUI;
2846
- const log_version = `table v${"3.14.0-beta.2"}`;
2846
+ const log_version = `table v${"3.14.0-beta.20"}`;
2847
2847
  const warnLog = log_log.create('warn', log_version);
2848
2848
  const errLog = log_log.create('error', log_version);
2849
2849
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -3026,6 +3026,7 @@ class ColumnInfo {
3026
3026
 
3027
3027
 
3028
3028
 
3029
+
3029
3030
  const getAllConvertColumns = (columns, parentColumn) => {
3030
3031
  const result = [];
3031
3032
  columns.forEach(column => {
@@ -3111,13 +3112,63 @@ function getRowUniqueId() {
3111
3112
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('row_');
3112
3113
  }
3113
3114
  // 行主键 key
3114
- function getRowkey($xetable) {
3115
- return $xetable.rowOpts.keyField || $xetable.rowId || '_X_ROW_KEY';
3115
+ function getRowkey($xeTable) {
3116
+ const props = $xeTable;
3117
+ const rowOpts = $xeTable.computeRowOpts;
3118
+ return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`;
3116
3119
  }
3117
3120
  // 行主键 value
3118
- function getRowid($xetable, row) {
3119
- const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, getRowkey($xetable));
3120
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rowid) ? '' : encodeURIComponent(rowid);
3121
+ function getRowid($xeTable, row) {
3122
+ const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, getRowkey($xeTable));
3123
+ return encodeRowid(rowid);
3124
+ }
3125
+ function createHandleUpdateRowId($xeTable) {
3126
+ const rowKey = getRowkey($xeTable);
3127
+ const isDeepKey = rowKey.indexOf('.') > -1;
3128
+ const updateRId = isDeepKey ? updateDeepRowKey : updateFastRowKey;
3129
+ return {
3130
+ rowKey,
3131
+ handleUpdateRowId(row) {
3132
+ return updateRId(row, rowKey);
3133
+ }
3134
+ };
3135
+ }
3136
+ function createHandleGetRowId($xeTable) {
3137
+ const rowKey = getRowkey($xeTable);
3138
+ const isDeepKey = rowKey.indexOf('.') > -1;
3139
+ const getRId = isDeepKey ? getDeepRowIdByKey : getFastRowIdByKey;
3140
+ return {
3141
+ rowKey,
3142
+ handleGetRowId(row) {
3143
+ return getRId(row, rowKey);
3144
+ }
3145
+ };
3146
+ }
3147
+ // 编码行主键
3148
+ function encodeRowid(rowVal) {
3149
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rowVal) ? '' : encodeURIComponent(rowVal);
3150
+ }
3151
+ function getDeepRowIdByKey(row, rowKey) {
3152
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, rowKey);
3153
+ }
3154
+ function updateDeepRowKey(row, rowKey) {
3155
+ let rowid = getDeepRowIdByKey(row, rowKey);
3156
+ if (eqEmptyValue(rowid)) {
3157
+ rowid = getRowUniqueId();
3158
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowKey, rowid);
3159
+ }
3160
+ return rowid;
3161
+ }
3162
+ function getFastRowIdByKey(row, rowKey) {
3163
+ return row[rowKey];
3164
+ }
3165
+ function updateFastRowKey(row, rowKey) {
3166
+ let rowid = getFastRowIdByKey(row, rowKey);
3167
+ if (eqEmptyValue(rowid)) {
3168
+ rowid = getRowUniqueId();
3169
+ row[rowKey] = rowid;
3170
+ }
3171
+ return rowid;
3121
3172
  }
3122
3173
  function getPaddingLeftRightSize(elem) {
3123
3174
  if (elem) {
@@ -3143,12 +3194,19 @@ function getCellHeight(height) {
3143
3194
  }
3144
3195
  return height || 0;
3145
3196
  }
3146
- function handleFieldOrColumn(_vm, fieldOrColumn) {
3197
+ function handleFieldOrColumn($xeTable, fieldOrColumn) {
3147
3198
  if (fieldOrColumn) {
3148
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(fieldOrColumn) ? _vm.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn;
3199
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrColumn) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(fieldOrColumn) ? $xeTable.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn;
3149
3200
  }
3150
3201
  return null;
3151
3202
  }
3203
+ const handleRowidOrRow = ($xeTable, rowidOrRow) => {
3204
+ if (rowidOrRow) {
3205
+ const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowidOrRow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow);
3206
+ return $xeTable.getRowById(rowid);
3207
+ }
3208
+ return null;
3209
+ };
3152
3210
  // 组装列配置
3153
3211
  function assembleColumn(_vm) {
3154
3212
  const {
@@ -4272,7 +4330,12 @@ const Cell = {
4272
4330
  const headerSlot = slots ? slots.header : null;
4273
4331
  const titleSlot = slots ? slots.title : null;
4274
4332
  const checkboxOpts = $table.computeCheckboxOpts;
4275
- const headerTitle = column.getTitle();
4333
+ const {
4334
+ checkStrictly,
4335
+ showHeader,
4336
+ headerTitle
4337
+ } = checkboxOpts;
4338
+ const colTitle = column.getTitle();
4276
4339
  const ons = {};
4277
4340
  if (!isHidden) {
4278
4341
  ons.click = evnt => {
@@ -4290,10 +4353,10 @@ const Cell = {
4290
4353
  if (headerSlot) {
4291
4354
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
4292
4355
  }
4293
- if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
4356
+ if (checkStrictly ? !showHeader : showHeader === false) {
4294
4357
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
4295
4358
  class: 'vxe-checkbox--label'
4296
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)]));
4359
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)]));
4297
4360
  }
4298
4361
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
4299
4362
  class: ['vxe-cell--checkbox', {
@@ -4302,14 +4365,14 @@ const Cell = {
4302
4365
  'is--indeterminate': isAllCheckboxIndeterminate
4303
4366
  }],
4304
4367
  attrs: {
4305
- title: cell_getI18n('vxe.table.allTitle')
4368
+ title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(headerTitle) ? cell_getI18n('vxe.table.allTitle') : `${headerTitle || ''}`
4306
4369
  },
4307
4370
  on: ons
4308
4371
  }, [h('span', {
4309
4372
  class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
4310
- })].concat(titleSlot || headerTitle ? [h('span', {
4373
+ })].concat(titleSlot || colTitle ? [h('span', {
4311
4374
  class: 'vxe-checkbox--label'
4312
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)] : []))]));
4375
+ }, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)] : []))]));
4313
4376
  },
4314
4377
  renderCheckboxCell(h, params) {
4315
4378
  const {
@@ -4608,6 +4671,8 @@ const Cell = {
4608
4671
  const {
4609
4672
  showIcon,
4610
4673
  allowBtn,
4674
+ ascTitle,
4675
+ descTitle,
4611
4676
  iconLayout,
4612
4677
  iconAsc,
4613
4678
  iconDesc,
@@ -4621,7 +4686,7 @@ const Cell = {
4621
4686
  'sort--active': column.order === 'asc'
4622
4687
  }],
4623
4688
  attrs: {
4624
- title: cell_getI18n('vxe.table.sortAsc')
4689
+ title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(ascTitle) ? cell_getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`
4625
4690
  },
4626
4691
  on: allowBtn ? {
4627
4692
  click(evnt) {
@@ -4634,7 +4699,7 @@ const Cell = {
4634
4699
  'sort--active': column.order === 'desc'
4635
4700
  }],
4636
4701
  attrs: {
4637
- title: cell_getI18n('vxe.table.sortDesc')
4702
+ title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(descTitle) ? cell_getI18n('vxe.table.sortDesc') : `${descTitle || ''}`
4638
4703
  },
4639
4704
  on: allowBtn ? {
4640
4705
  click(evnt) {
@@ -5085,6 +5150,7 @@ const {
5085
5150
  interceptor: methods_interceptor,
5086
5151
  createEvent
5087
5152
  } = core_.VxeUI;
5153
+ const supportMaxRow = 5e6;
5088
5154
  const customStorageKey = 'VXE_CUSTOM_STORE';
5089
5155
  const maxYHeight = 5e6;
5090
5156
  const maxXWidth = 5e6;
@@ -5351,7 +5417,7 @@ function cacheColumnMap($xeTable) {
5351
5417
  fullColumnFieldData[field] = rest;
5352
5418
  } else {
5353
5419
  if (storage && !type || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
5354
- errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field`]);
5420
+ errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
5355
5421
  }
5356
5422
  }
5357
5423
  if (!hasFixed && fixed) {
@@ -5963,6 +6029,21 @@ function updateStyle($xeTable) {
5963
6029
  }
5964
6030
  return $xeTable.$nextTick();
5965
6031
  }
6032
+ function checkValidate($xeTable, type) {
6033
+ if ($xeTable.triggerValidate) {
6034
+ return $xeTable.triggerValidate(type);
6035
+ }
6036
+ return $xeTable.$nextTick();
6037
+ }
6038
+ /**
6039
+ * 当单元格发生改变时
6040
+ * 如果存在规则,则校验
6041
+ */
6042
+ function handleChangeCell($xeTable, evnt, params) {
6043
+ checkValidate($xeTable, 'blur').catch(e => e).then(() => {
6044
+ $xeTable.handleEdit(params, evnt).then(() => checkValidate($xeTable, 'change')).catch(e => e);
6045
+ });
6046
+ }
5966
6047
  function handleRadioReserveRow($xeTable, row) {
5967
6048
  const internalData = $xeTable;
5968
6049
  const radioOpts = $xeTable.computeRadioOpts;
@@ -6029,6 +6110,10 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6029
6110
  reserve,
6030
6111
  checkMethod
6031
6112
  } = checkboxOpts;
6113
+ const {
6114
+ handleGetRowId
6115
+ } = createHandleGetRowId($xeTable);
6116
+ // indeterminateField 仅支持读取
6032
6117
  const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
6033
6118
  const selectRowMaps = {};
6034
6119
  /**
@@ -6073,7 +6158,8 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6073
6158
  if (isForce || !checkMethod || checkMethod({
6074
6159
  row
6075
6160
  })) {
6076
- selectRowMaps[getRowid($xeTable, row)] = row;
6161
+ const rowid = handleGetRowId(row);
6162
+ selectRowMaps[rowid] = row;
6077
6163
  }
6078
6164
  }, {
6079
6165
  children: childrenField
@@ -6085,7 +6171,7 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6085
6171
  */
6086
6172
  if (!isForce && checkMethod) {
6087
6173
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, row => {
6088
- const rowid = getRowid($xeTable, row);
6174
+ const rowid = handleGetRowId(row);
6089
6175
  if (checkMethod({
6090
6176
  row
6091
6177
  }) ? 0 : selectCheckboxMaps[rowid]) {
@@ -6105,7 +6191,7 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6105
6191
  */
6106
6192
  if (!isForce && checkMethod) {
6107
6193
  afterFullData.forEach(row => {
6108
- const rowid = getRowid($xeTable, row);
6194
+ const rowid = handleGetRowId(row);
6109
6195
  if (selectCheckboxMaps[rowid] || checkMethod({
6110
6196
  row
6111
6197
  })) {
@@ -6114,7 +6200,8 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6114
6200
  });
6115
6201
  } else {
6116
6202
  afterFullData.forEach(row => {
6117
- selectRowMaps[getRowid($xeTable, row)] = row;
6203
+ const rowid = handleGetRowId(row);
6204
+ selectRowMaps[rowid] = row;
6118
6205
  });
6119
6206
  }
6120
6207
  } else {
@@ -6125,7 +6212,7 @@ function handleCheckedAllCheckboxRow($xeTable, checked, isForce) {
6125
6212
  */
6126
6213
  if (!isForce && checkMethod) {
6127
6214
  afterFullData.forEach(row => {
6128
- const rowid = getRowid($xeTable, row);
6215
+ const rowid = handleGetRowId(row);
6129
6216
  if (checkMethod({
6130
6217
  row
6131
6218
  }) ? 0 : selectCheckboxMaps[rowid]) {
@@ -7695,6 +7782,10 @@ const Methods = {
7695
7782
  }
7696
7783
  return [];
7697
7784
  },
7785
+ getEl() {
7786
+ const $xeTable = this;
7787
+ return $xeTable.$refs.refElem;
7788
+ },
7698
7789
  /**
7699
7790
  * 获取父容器元素
7700
7791
  */
@@ -7709,14 +7800,27 @@ const Methods = {
7709
7800
  * 获取父容器的高度
7710
7801
  */
7711
7802
  getParentHeight() {
7803
+ const $xeTable = this;
7804
+ const $xeGrid = $xeTable.$xeGrid;
7805
+ const props = $xeTable;
7712
7806
  const {
7713
- $el,
7714
- $xegrid,
7715
7807
  height
7716
- } = this;
7717
- const parentElem = $el.parentNode;
7718
- const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
7719
- return Math.floor($xegrid ? $xegrid.getParentHeight() : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(parentElem).height) - parentPaddingSize);
7808
+ } = props;
7809
+ const el = $xeTable.$refs.refElem;
7810
+ if (el) {
7811
+ const parentElem = el.parentNode;
7812
+ const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
7813
+ let parentWrapperHeight = 0;
7814
+ if (parentElem) {
7815
+ if ($xeGrid && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
7816
+ parentWrapperHeight = $xeGrid.getParentHeight();
7817
+ } else {
7818
+ parentWrapperHeight = parentElem.clientHeight;
7819
+ }
7820
+ }
7821
+ return Math.floor(parentWrapperHeight - parentPaddingSize);
7822
+ }
7823
+ return 0;
7720
7824
  },
7721
7825
  /**
7722
7826
  * 获取需要排除的高度
@@ -7826,6 +7930,9 @@ const Methods = {
7826
7930
  const childrenField = treeOpts.children || treeOpts.childrenField;
7827
7931
  let treeData = [];
7828
7932
  let fullData = datas ? datas.slice(0) : [];
7933
+ if (fullData.length > supportMaxRow) {
7934
+ errLog('vxe.error.errMaxRow', [supportMaxRow]);
7935
+ }
7829
7936
  if (treeConfig) {
7830
7937
  // 树结构自动转换
7831
7938
  if (treeOpts.transform) {
@@ -7919,7 +8026,7 @@ const Methods = {
7919
8026
  // warnLog('vxe.error.reqProp', ['table.show-overflow'])
7920
8027
  // }
7921
8028
  if (this.spanMethod) {
7922
- warnLog('vxe.error.scrollErrProp', ['table.span-method']);
8029
+ errLog('vxe.error.scrollErrProp', ['table.span-method']);
7923
8030
  }
7924
8031
  }
7925
8032
  handleReserveStatus($xeTable);
@@ -8081,7 +8188,9 @@ const Methods = {
8081
8188
  const treeOpts = $xeTable.computeTreeOpts;
8082
8189
  const childrenField = treeOpts.children || treeOpts.childrenField;
8083
8190
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
8084
- const rowkey = getRowkey($xeTable);
8191
+ const {
8192
+ lazy
8193
+ } = treeOpts;
8085
8194
  const fullAllDataRowIdMaps = {
8086
8195
  ...fullAllDataRowIdData
8087
8196
  }; // 存在已删除数据
@@ -8089,26 +8198,11 @@ const Methods = {
8089
8198
  const treeTempExpandedMaps = {
8090
8199
  ...treeExpandedMaps
8091
8200
  };
8092
- const handleRow = (row, index, items, path, parentRow, nodes) => {
8093
- let rowid = getRowid($xeTable, row);
8094
- const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
8095
- const level = nodes ? nodes.length - 1 : 0;
8096
- if (eqEmptyValue(rowid)) {
8097
- rowid = getRowUniqueId();
8098
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
8099
- }
8100
- if (treeConfig && treeOpts.lazy) {
8101
- const treeExpRest = treeExpandedMaps[rowid];
8102
- if (row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
8103
- row[childrenField] = null;
8104
- }
8105
- if (treeExpRest) {
8106
- if (!row[childrenField] || !row[childrenField].length) {
8107
- delete treeTempExpandedMaps[rowid];
8108
- }
8109
- }
8110
- }
8111
- let rowRest = fullAllDataRowIdData[rowid];
8201
+ const {
8202
+ handleUpdateRowId
8203
+ } = createHandleUpdateRowId($xeTable);
8204
+ const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
8205
+ let rowRest = fullAllDataRowIdMaps[rowid];
8112
8206
  if (!rowRest) {
8113
8207
  rowRest = {
8114
8208
  row,
@@ -8133,40 +8227,54 @@ const Methods = {
8133
8227
  rowRest.items = items;
8134
8228
  rowRest.parent = parentRow;
8135
8229
  rowRest.level = level;
8136
- rowRest.index = treeConfig && parentRow ? -1 : index;
8230
+ rowRest.index = currIndex;
8231
+ rowRest.treeIndex = index;
8137
8232
  fullDataRowIdMaps[rowid] = rowRest;
8138
8233
  fullAllDataRowIdMaps[rowid] = rowRest;
8139
8234
  };
8140
8235
  if (treeConfig) {
8141
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
8236
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, (row, index, items, path, parentRow, nodes) => {
8237
+ const rowid = handleUpdateRowId(row);
8238
+ if (treeConfig && lazy) {
8239
+ const treeExpRest = treeTempExpandedMaps[rowid];
8240
+ if (row[hasChildField] && row[childrenField] === undefined) {
8241
+ row[childrenField] = null;
8242
+ }
8243
+ if (treeExpRest) {
8244
+ if (!row[childrenField] || !row[childrenField].length) {
8245
+ delete treeTempExpandedMaps[rowid];
8246
+ }
8247
+ }
8248
+ }
8249
+ handleRowCache(row, index, items, parentRow ? -1 : index, parentRow, rowid, nodes.length - 1, toTreePathSeq(path));
8250
+ }, {
8142
8251
  children: childrenField
8143
8252
  });
8144
8253
  } else {
8145
- tableFullData.forEach(handleRow);
8254
+ tableFullData.forEach((row, index, items) => {
8255
+ handleRowCache(row, index, items, index, null, handleUpdateRowId(row), 0, index + 1);
8256
+ });
8146
8257
  }
8147
8258
  internalData.fullDataRowIdData = fullDataRowIdMaps;
8148
8259
  internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
8149
8260
  reactData.treeExpandedMaps = treeTempExpandedMaps;
8150
8261
  },
8151
8262
  cacheSourceMap(fullData) {
8152
- let {
8153
- treeConfig,
8154
- treeOpts,
8155
- sourceDataRowIdData
8156
- } = this;
8263
+ const $xeTable = this;
8264
+ const props = $xeTable;
8265
+ const internalData = $xeTable;
8266
+ const {
8267
+ treeConfig
8268
+ } = props;
8269
+ const treeOpts = $xeTable.computeTreeOpts;
8157
8270
  const sourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData, true);
8158
- const rowkey = getRowkey(this);
8159
- sourceDataRowIdData = this.sourceDataRowIdData = {};
8271
+ const {
8272
+ handleUpdateRowId
8273
+ } = createHandleUpdateRowId($xeTable);
8274
+ const sourceRowIdData = {};
8160
8275
  const handleSourceRow = row => {
8161
- let rowid = getRowid(this, row);
8162
- if (eqEmptyValue(rowid)) {
8163
- rowid = getRowUniqueId();
8164
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
8165
- }
8166
- sourceDataRowIdData[rowid] = {
8167
- row,
8168
- rowid
8169
- };
8276
+ const rowid = handleUpdateRowId(row);
8277
+ sourceRowIdData[rowid] = row;
8170
8278
  };
8171
8279
  // 源数据缓存
8172
8280
  if (treeConfig) {
@@ -8177,7 +8285,8 @@ const Methods = {
8177
8285
  } else {
8178
8286
  sourceData.forEach(handleSourceRow);
8179
8287
  }
8180
- this.tableSourceData = sourceData;
8288
+ internalData.sourceDataRowIdData = sourceRowIdData;
8289
+ internalData.tableSourceData = sourceData;
8181
8290
  },
8182
8291
  getParams() {
8183
8292
  return this.params;
@@ -8538,20 +8647,27 @@ const Methods = {
8538
8647
  keepSource,
8539
8648
  treeConfig
8540
8649
  } = props;
8650
+ const {
8651
+ editStore
8652
+ } = reactData;
8541
8653
  const {
8542
8654
  fullAllDataRowIdData,
8655
+ fullDataRowIdData,
8543
8656
  tableSourceData,
8544
8657
  sourceDataRowIdData,
8545
8658
  tableFullData,
8546
8659
  afterFullData
8547
8660
  } = internalData;
8661
+ const removeTempMaps = {
8662
+ ...editStore.removeMaps
8663
+ };
8548
8664
  const treeOpts = $xeTable.computeTreeOpts;
8549
8665
  const {
8550
8666
  transform
8551
8667
  } = treeOpts;
8552
8668
  if (!keepSource) {
8553
8669
  if (true) {
8554
- warnLog('vxe.error.reqProp', ['keep-source']);
8670
+ errLog('vxe.error.reqProp', ['keep-source']);
8555
8671
  }
8556
8672
  return $xeTable.$nextTick();
8557
8673
  }
@@ -8565,22 +8681,23 @@ const Methods = {
8565
8681
  }
8566
8682
  let reDelFlag = false;
8567
8683
  if (targetRows.length) {
8568
- targetRows.forEach(row => {
8569
- if (!$xeTable.isInsertByRow(row)) {
8570
- const rowid = getRowid($xeTable, row);
8571
- const oRow = sourceDataRowIdData[rowid];
8572
- if (oRow && row) {
8573
- if (field) {
8574
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
8575
- } else {
8576
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
8577
- }
8578
- if ($xeTable.isRemoveByRow(row)) {
8579
- const rowRest = fullAllDataRowIdData[rowid];
8580
- if (rowRest) {
8581
- const reRow = rowRest.row;
8582
- tableFullData.unshift(reRow);
8583
- afterFullData.unshift(reRow);
8684
+ targetRows.forEach(item => {
8685
+ const rowid = getRowid($xeTable, item);
8686
+ const rowRest = fullAllDataRowIdData[rowid];
8687
+ if (rowRest) {
8688
+ const row = rowRest.row;
8689
+ if (!$xeTable.isInsertByRow(row)) {
8690
+ const oRow = sourceDataRowIdData[rowid];
8691
+ if (oRow && row) {
8692
+ if (field) {
8693
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
8694
+ } else {
8695
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
8696
+ }
8697
+ if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
8698
+ delete removeTempMaps[rowid];
8699
+ tableFullData.unshift(row);
8700
+ afterFullData.unshift(row);
8584
8701
  reDelFlag = true;
8585
8702
  }
8586
8703
  }
@@ -8590,6 +8707,7 @@ const Methods = {
8590
8707
  }
8591
8708
  if (rows) {
8592
8709
  if (reDelFlag) {
8710
+ editStore.removeMaps = removeTempMaps;
8593
8711
  $xeTable.updateFooter();
8594
8712
  $xeTable.cacheRowMap(false);
8595
8713
  $xeTable.handleTableData(treeConfig && transform);
@@ -8769,25 +8887,31 @@ const Methods = {
8769
8887
  },
8770
8888
  /**
8771
8889
  * 检查行或列数据是否发生改变
8772
- * @param {Row} row 行对象
8890
+ * @param {Row} rowOrId 行对象
8773
8891
  * @param {String} field 字段名
8774
8892
  */
8775
- isUpdateByRow(row, field) {
8893
+ isUpdateByRow(rowOrId, field) {
8894
+ const $xeTable = this;
8895
+ const props = $xeTable;
8896
+ const internalData = $xeTable;
8897
+ const {
8898
+ keepSource
8899
+ } = props;
8776
8900
  const {
8777
8901
  tableFullColumn,
8778
- keepSource,
8779
- sourceDataRowIdData,
8780
- fullDataRowIdData
8781
- } = this;
8902
+ fullDataRowIdData,
8903
+ sourceDataRowIdData
8904
+ } = internalData;
8782
8905
  if (keepSource) {
8783
- const rowid = getRowid(this, row);
8906
+ const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
8907
+ const rowRest = fullDataRowIdData[rowid];
8784
8908
  // 新增的数据不需要检测
8785
- if (!fullDataRowIdData[rowid]) {
8909
+ if (!rowRest) {
8786
8910
  return false;
8787
8911
  }
8788
- const oldRest = sourceDataRowIdData[rowid];
8789
- if (oldRest) {
8790
- const oRow = oldRest.row;
8912
+ const row = rowRest.row;
8913
+ const oRow = sourceDataRowIdData[rowid];
8914
+ if (oRow) {
8791
8915
  if (arguments.length > 1) {
8792
8916
  return !eqCellValue(oRow, row, field);
8793
8917
  }
@@ -8849,6 +8973,113 @@ const Methods = {
8849
8973
  tableColumn: this.tableColumn.slice(0)
8850
8974
  };
8851
8975
  },
8976
+ /**
8977
+ * 移动列到指定列的位置
8978
+ * @param fieldOrColumn
8979
+ * @param targetFieldOrColumn
8980
+ * @param options
8981
+ */
8982
+ moveColumnTo(fieldOrColumn, targetFieldOrColumn, options) {
8983
+ const $xeTable = this;
8984
+ const internalData = $xeTable;
8985
+ const {
8986
+ fullColumnIdData,
8987
+ visibleColumn
8988
+ } = internalData;
8989
+ const {
8990
+ dragToChild,
8991
+ dragPos,
8992
+ isCrossDrag
8993
+ } = Object.assign({}, options);
8994
+ const dragCol = handleFieldOrColumn($xeTable, fieldOrColumn);
8995
+ let prevDragCol = null;
8996
+ const colRest = dragCol ? fullColumnIdData[dragCol.id] : null;
8997
+ let defPos = 'left';
8998
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(targetFieldOrColumn)) {
8999
+ if (colRest && targetFieldOrColumn) {
9000
+ let currList = colRest.items;
9001
+ let offsetIndex = colRest._index + targetFieldOrColumn;
9002
+ if (isCrossDrag) {
9003
+ currList = visibleColumn;
9004
+ offsetIndex = colRest._index + targetFieldOrColumn;
9005
+ }
9006
+ if (offsetIndex > 0 && offsetIndex < currList.length - 1) {
9007
+ prevDragCol = currList[offsetIndex];
9008
+ }
9009
+ if (targetFieldOrColumn > 0) {
9010
+ defPos = 'right';
9011
+ }
9012
+ }
9013
+ } else {
9014
+ prevDragCol = handleFieldOrColumn($xeTable, targetFieldOrColumn);
9015
+ const targetColRest = prevDragCol ? fullColumnIdData[prevDragCol.id] : null;
9016
+ if (colRest && targetColRest) {
9017
+ if (targetColRest._index > colRest._index) {
9018
+ defPos = 'right';
9019
+ }
9020
+ }
9021
+ }
9022
+ return $xeTable.handleColDragSwapEvent(null, true, dragCol, prevDragCol, dragPos || defPos, dragToChild === true);
9023
+ },
9024
+ /**
9025
+ * 移动行到指定行的位置
9026
+ * @param rowidOrRow
9027
+ * @param targetRowidOrRow
9028
+ * @param options
9029
+ */
9030
+ moveRowTo(rowidOrRow, targetRowidOrRow, options) {
9031
+ const $xeTable = this;
9032
+ const props = $xeTable;
9033
+ const internalData = $xeTable;
9034
+ const {
9035
+ treeConfig
9036
+ } = props;
9037
+ const {
9038
+ fullAllDataRowIdData,
9039
+ afterFullData
9040
+ } = internalData;
9041
+ const {
9042
+ dragToChild,
9043
+ dragPos,
9044
+ isCrossDrag
9045
+ } = Object.assign({}, options);
9046
+ const treeOpts = $xeTable.computeTreeOpts;
9047
+ const dragRow = handleRowidOrRow($xeTable, rowidOrRow);
9048
+ let prevDragRow = null;
9049
+ let defPos = 'top';
9050
+ const rowRest = dragRow ? fullAllDataRowIdData[getRowid($xeTable, dragRow)] : null;
9051
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(targetRowidOrRow)) {
9052
+ if (rowRest && targetRowidOrRow) {
9053
+ let currList = afterFullData;
9054
+ let offsetIndex = rowRest._index + targetRowidOrRow;
9055
+ if (treeConfig) {
9056
+ currList = rowRest.items;
9057
+ if (treeOpts.transform) {
9058
+ offsetIndex = rowRest.treeIndex + targetRowidOrRow;
9059
+ if (isCrossDrag) {
9060
+ currList = afterFullData;
9061
+ offsetIndex = rowRest._index + targetRowidOrRow;
9062
+ }
9063
+ }
9064
+ }
9065
+ if (offsetIndex >= 0 && offsetIndex <= currList.length - 1) {
9066
+ prevDragRow = currList[offsetIndex];
9067
+ }
9068
+ if (targetRowidOrRow > 0) {
9069
+ defPos = 'bottom';
9070
+ }
9071
+ }
9072
+ } else {
9073
+ prevDragRow = handleRowidOrRow($xeTable, targetRowidOrRow);
9074
+ const targetRowRest = prevDragRow ? fullAllDataRowIdData[getRowid($xeTable, prevDragRow)] : null;
9075
+ if (rowRest && targetRowRest) {
9076
+ if (targetRowRest._index > rowRest._index) {
9077
+ defPos = 'bottom';
9078
+ }
9079
+ }
9080
+ }
9081
+ return $xeTable.handleRowDragSwapEvent(null, true, dragRow, prevDragRow, dragPos || defPos, dragToChild === true);
9082
+ },
8852
9083
  /**
8853
9084
  * 获取表格的全量列
8854
9085
  */
@@ -8871,16 +9102,26 @@ const Methods = {
8871
9102
  * 用于多选行,获取已选中的数据
8872
9103
  */
8873
9104
  getCheckboxRecords(isFull) {
9105
+ const $xeTable = this;
9106
+ const props = $xeTable;
9107
+ const reactData = $xeTable;
9108
+ const internalData = $xeTable;
9109
+ const {
9110
+ treeConfig
9111
+ } = props;
9112
+ const {
9113
+ selectCheckboxMaps
9114
+ } = reactData;
8874
9115
  const {
8875
9116
  tableFullData,
8876
9117
  afterFullData,
8877
- treeConfig,
8878
- treeOpts,
8879
- checkboxOpts,
8880
- tableFullTreeData,
8881
9118
  afterTreeFullData,
9119
+ tableFullTreeData,
9120
+ fullDataRowIdData,
8882
9121
  afterFullRowMaps
8883
- } = this;
9122
+ } = internalData;
9123
+ const treeOpts = $xeTable.computeTreeOpts;
9124
+ const checkboxOpts = $xeTable.computeCheckboxOpts;
8884
9125
  const {
8885
9126
  transform,
8886
9127
  mapChildrenField
@@ -8889,21 +9130,18 @@ const Methods = {
8889
9130
  checkField
8890
9131
  } = checkboxOpts;
8891
9132
  const childrenField = treeOpts.children || treeOpts.childrenField;
8892
- const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
8893
9133
  let rowList = [];
8894
9134
  if (checkField) {
8895
9135
  if (treeConfig) {
9136
+ const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
8896
9137
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData, row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField), {
8897
9138
  children: transform ? mapChildrenField : childrenField
8898
9139
  });
8899
9140
  } else {
9141
+ const currTableData = isFull ? tableFullData : afterFullData;
8900
9142
  rowList = currTableData.filter(row => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField));
8901
9143
  }
8902
9144
  } else {
8903
- const {
8904
- selectCheckboxMaps,
8905
- fullDataRowIdData
8906
- } = this;
8907
9145
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, (row, rowid) => {
8908
9146
  if (isFull) {
8909
9147
  if (fullDataRowIdData[rowid]) {
@@ -9617,14 +9855,26 @@ const Methods = {
9617
9855
  }
9618
9856
  },
9619
9857
  getCustomStoreData() {
9858
+ const $xeTable = this;
9859
+ const props = $xeTable;
9860
+ const internalData = $xeTable;
9861
+ const {
9862
+ id
9863
+ } = props;
9864
+ const customOpts = $xeTable.computeCustomOpts;
9620
9865
  const {
9621
- id,
9622
- customOpts,
9623
9866
  collectColumn
9624
- } = this;
9867
+ } = internalData;
9625
9868
  const {
9869
+ storage,
9626
9870
  checkMethod
9627
9871
  } = customOpts;
9872
+ const isAllCustom = storage === true;
9873
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
9874
+ const isCustomResizable = isAllCustom || storageOpts.resizable;
9875
+ const isCustomVisible = isAllCustom || storageOpts.visible;
9876
+ const isCustomFixed = isAllCustom || storageOpts.fixed;
9877
+ const isCustomSort = isAllCustom || storageOpts.sort;
9628
9878
  const resizableData = {};
9629
9879
  const sortData = {};
9630
9880
  const visibleData = {};
@@ -9641,48 +9891,38 @@ const Methods = {
9641
9891
  }
9642
9892
  let hasResizable = 0;
9643
9893
  let hasSort = 0;
9644
- let hasFixedt = 0;
9894
+ let hasFixed = 0;
9645
9895
  let hasVisible = 0;
9646
9896
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parentColumn) => {
9897
+ const colKey = column.getKey();
9898
+ if (!colKey) {
9899
+ errLog('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
9900
+ return;
9901
+ }
9647
9902
  // 只支持一级
9648
9903
  if (!parentColumn) {
9649
- collectColumn.forEach(column => {
9650
- const colKey = column.getKey();
9651
- if (colKey) {
9652
- hasSort = 1;
9653
- sortData[colKey] = column.renderSortNumber;
9654
- }
9655
- });
9656
- if (column.fixed !== column.defaultFixed) {
9657
- const colKey = column.getKey();
9658
- if (colKey) {
9659
- hasFixedt = 1;
9660
- fixedData[colKey] = column.fixed;
9661
- }
9904
+ if (isCustomSort) {
9905
+ hasSort = 1;
9906
+ sortData[colKey] = column.renderSortNumber;
9662
9907
  }
9663
- }
9664
- if (column.resizeWidth) {
9665
- const colKey = column.getKey();
9666
- if (colKey) {
9667
- hasResizable = 1;
9668
- resizableData[colKey] = column.renderWidth;
9908
+ if (isCustomFixed && column.fixed !== column.defaultFixed) {
9909
+ hasFixed = 1;
9910
+ fixedData[colKey] = column.fixed;
9669
9911
  }
9670
9912
  }
9671
- if (!checkMethod || checkMethod({
9913
+ if (isCustomResizable && column.resizeWidth) {
9914
+ hasResizable = 1;
9915
+ resizableData[colKey] = column.renderWidth;
9916
+ }
9917
+ if (isCustomVisible && (!checkMethod || checkMethod({
9672
9918
  column
9673
- })) {
9919
+ }))) {
9674
9920
  if (!column.visible && column.defaultVisible) {
9675
- const colKey = column.getKey();
9676
- if (colKey) {
9677
- hasVisible = 1;
9678
- visibleData[colKey] = false;
9679
- }
9921
+ hasVisible = 1;
9922
+ visibleData[colKey] = false;
9680
9923
  } else if (column.visible && !column.defaultVisible) {
9681
- const colKey = column.getKey();
9682
- if (colKey) {
9683
- hasVisible = 1;
9684
- visibleData[colKey] = true;
9685
- }
9924
+ hasVisible = 1;
9925
+ visibleData[colKey] = true;
9686
9926
  }
9687
9927
  }
9688
9928
  });
@@ -9692,7 +9932,7 @@ const Methods = {
9692
9932
  if (hasSort) {
9693
9933
  storeData.sortData = sortData;
9694
9934
  }
9695
- if (hasFixedt) {
9935
+ if (hasFixed) {
9696
9936
  storeData.fixedData = fixedData;
9697
9937
  }
9698
9938
  if (hasVisible) {
@@ -10438,12 +10678,25 @@ const Methods = {
10438
10678
  }
10439
10679
  }
10440
10680
  // 兼容老版本
10441
- let rest;
10442
- if (!evntList.some(func => func(Object.assign({
10443
- $grid: this.$xegrid,
10444
- $table: this,
10445
- $event: evnt
10446
- }, args)) === false)) {
10681
+ let rest = null;
10682
+ let isStop = false;
10683
+ for (let i = 0; i < evntList.length; i++) {
10684
+ const func = evntList[i];
10685
+ const fnRest = func(Object.assign({
10686
+ $grid: this.$xegrid,
10687
+ $table: this,
10688
+ $event: evnt
10689
+ }, args));
10690
+ if (fnRest === false) {
10691
+ isStop = true;
10692
+ break;
10693
+ } else if (fnRest && fnRest.status === false) {
10694
+ rest = fnRest.result;
10695
+ isStop = true;
10696
+ break;
10697
+ }
10698
+ }
10699
+ if (!isStop) {
10447
10700
  if (next) {
10448
10701
  rest = next();
10449
10702
  }
@@ -10679,10 +10932,12 @@ const Methods = {
10679
10932
  treeConfig,
10680
10933
  treeOpts,
10681
10934
  highlightCurrentRow,
10935
+ highlightCurrentColumn,
10682
10936
  currentRow,
10683
10937
  bodyCtxMenu,
10684
10938
  rowOpts
10685
10939
  } = this;
10940
+ const columnOpts = $xeTable.computeColumnOpts;
10686
10941
  const {
10687
10942
  selected,
10688
10943
  actived
@@ -10838,10 +11093,15 @@ const Methods = {
10838
11093
  if (!isEditStatus) {
10839
11094
  // 如果按下了方向键
10840
11095
  if (selected.row && selected.column) {
10841
- this.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
10842
- } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
10843
- // 当前行按键上下移动
10844
- this.moveCurrentRow(isUpArrow, isDwArrow, evnt);
11096
+ $xeTable.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
11097
+ }
11098
+ // 当前行按键上下移动
11099
+ if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
11100
+ $xeTable.moveCurrentRow(isUpArrow, isDwArrow, evnt);
11101
+ }
11102
+ // 当前行按键左右移动
11103
+ if ((isLeftArrow || isRightArrow) && (columnOpts.isCurrent || highlightCurrentColumn)) {
11104
+ $xeTable.moveCurrentColumn(isLeftArrow, isRightArrow, evnt);
10845
11105
  }
10846
11106
  }
10847
11107
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
@@ -11383,6 +11643,10 @@ const Methods = {
11383
11643
  checkStrictly,
11384
11644
  checkMethod
11385
11645
  } = checkboxOpts;
11646
+ const {
11647
+ handleGetRowId
11648
+ } = createHandleGetRowId($xeTable);
11649
+ // indeterminateField 仅支持读取
11386
11650
  const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
11387
11651
  if (checkField) {
11388
11652
  // 树结构
@@ -11421,7 +11685,7 @@ const Methods = {
11421
11685
  if (treeConfig && !checkStrictly) {
11422
11686
  // 更新子节点状态
11423
11687
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows, row => {
11424
- const rowid = getRowid($xeTable, row);
11688
+ const rowid = handleGetRowId(row);
11425
11689
  if (isForce || !checkMethod || checkMethod({
11426
11690
  row
11427
11691
  })) {
@@ -11442,7 +11706,7 @@ const Methods = {
11442
11706
  }
11443
11707
  // 列表
11444
11708
  rows.forEach(row => {
11445
- const rowid = getRowid($xeTable, row);
11709
+ const rowid = handleGetRowId(row);
11446
11710
  if (isForce || !checkMethod || checkMethod({
11447
11711
  row
11448
11712
  })) {
@@ -11471,10 +11735,12 @@ const Methods = {
11471
11735
  $xeTable.handleBatchSelectRows([row], checked, isForce);
11472
11736
  },
11473
11737
  handleToggleCheckRowEvent(evnt, params) {
11738
+ const $xeTable = this;
11739
+ const reactData = $xeTable;
11474
11740
  const {
11475
- selectCheckboxMaps,
11476
- checkboxOpts
11477
- } = this;
11741
+ selectCheckboxMaps
11742
+ } = reactData;
11743
+ const checkboxOpts = $xeTable.computeCheckboxOpts;
11478
11744
  const {
11479
11745
  checkField,
11480
11746
  trigger
@@ -11492,40 +11758,41 @@ const Methods = {
11492
11758
  checked = !selectCheckboxMaps[getRowid(this, row)];
11493
11759
  }
11494
11760
  if (evnt) {
11495
- this.triggerCheckRowEvent(evnt, params, checked);
11761
+ $xeTable.triggerCheckRowEvent(evnt, params, checked);
11496
11762
  } else {
11497
- this.handleSelectRow(params, checked);
11498
- this.checkSelectionStatus();
11763
+ $xeTable.handleBatchSelectRows(params, checked);
11764
+ $xeTable.checkSelectionStatus();
11499
11765
  }
11500
11766
  },
11501
11767
  triggerCheckRowEvent(evnt, params, checked) {
11502
11768
  const $xeTable = this;
11769
+ const internalData = $xeTable;
11770
+ const {
11771
+ row
11772
+ } = params;
11503
11773
  const {
11504
- checkboxOpts,
11505
11774
  afterFullData
11506
- } = this;
11775
+ } = internalData;
11776
+ const checkboxOpts = $xeTable.computeCheckboxOpts;
11507
11777
  const {
11508
11778
  checkMethod,
11509
11779
  trigger
11510
11780
  } = checkboxOpts;
11511
- const {
11512
- row
11513
- } = params;
11514
11781
  if (trigger === 'manual') {
11515
11782
  return;
11516
11783
  }
11517
11784
  evnt.stopPropagation();
11518
11785
  if (checkboxOpts.isShiftKey && evnt.shiftKey && !this.treeConfig) {
11519
- const checkboxRecords = this.getCheckboxRecords();
11786
+ const checkboxRecords = $xeTable.getCheckboxRecords();
11520
11787
  if (checkboxRecords.length) {
11521
11788
  const firstRow = checkboxRecords[0];
11522
- const _rowIndex = this.getVTRowIndex(row);
11523
- const _firstRowIndex = this.getVTRowIndex(firstRow);
11789
+ const _rowIndex = $xeTable.getVTRowIndex(row);
11790
+ const _firstRowIndex = $xeTable.getVTRowIndex(firstRow);
11524
11791
  if (_rowIndex !== _firstRowIndex) {
11525
- this.setAllCheckboxRow(false);
11792
+ $xeTable.setAllCheckboxRow(false);
11526
11793
  const rangeRows = _rowIndex < _firstRowIndex ? afterFullData.slice(_rowIndex, _firstRowIndex + 1) : afterFullData.slice(_firstRowIndex, _rowIndex + 1);
11527
11794
  handleCheckedCheckboxRow($xeTable, rangeRows, true, false);
11528
- this.emitEvent('checkbox-range-select', Object.assign({
11795
+ $xeTable.dispatchEvent('checkbox-range-select', Object.assign({
11529
11796
  rangeRecords: rangeRows
11530
11797
  }, params), evnt);
11531
11798
  return;
@@ -11535,12 +11802,12 @@ const Methods = {
11535
11802
  if (!checkMethod || checkMethod({
11536
11803
  row
11537
11804
  })) {
11538
- this.handleSelectRow(params, checked);
11539
- this.checkSelectionStatus();
11540
- this.emitEvent('checkbox-change', Object.assign({
11541
- records: this.getCheckboxRecords(),
11542
- reserves: this.getCheckboxReserveRecords(),
11543
- indeterminates: this.getCheckboxIndeterminateRecords(),
11805
+ $xeTable.handleBatchSelectRows(params, checked);
11806
+ $xeTable.checkSelectionStatus();
11807
+ $xeTable.dispatchEvent('checkbox-change', Object.assign({
11808
+ records: () => $xeTable.getCheckboxRecords(),
11809
+ reserves: () => $xeTable.getCheckboxReserveRecords(),
11810
+ indeterminates: () => $xeTable.getCheckboxIndeterminateRecords(),
11544
11811
  checked
11545
11812
  }, params), evnt);
11546
11813
  }
@@ -11604,10 +11871,13 @@ const Methods = {
11604
11871
  }
11605
11872
  // 树结构
11606
11873
  if (treeConfig) {
11874
+ const {
11875
+ handleGetRowId
11876
+ } = createHandleGetRowId($xeTable);
11607
11877
  const childRowMaps = {};
11608
11878
  const childRowList = [];
11609
11879
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData, row => {
11610
- const rowid = getRowid($xeTable, row);
11880
+ const rowid = handleGetRowId(row);
11611
11881
  const childList = row[transform ? mapChildrenField : childrenField];
11612
11882
  if (childList && childList.length && !childRowMaps[rowid]) {
11613
11883
  childRowMaps[rowid] = 1;
@@ -11624,7 +11894,7 @@ const Methods = {
11624
11894
  let hLen = 0; // 半选
11625
11895
  let vLen = 0; // 有效行
11626
11896
  childList.forEach(checkMethod ? item => {
11627
- const childRowid = getRowid($xeTable, item);
11897
+ const childRowid = handleGetRowId(item);
11628
11898
  const isSelect = checkField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item, checkField) : selectRowMaps[childRowid];
11629
11899
  if (checkMethod({
11630
11900
  row: item
@@ -11643,7 +11913,7 @@ const Methods = {
11643
11913
  }
11644
11914
  }
11645
11915
  } : item => {
11646
- const childRowid = getRowid($xeTable, item);
11916
+ const childRowid = handleGetRowId(item);
11647
11917
  const isSelect = checkField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item, checkField) : selectRowMaps[childRowid];
11648
11918
  if (isSelect) {
11649
11919
  sLen++;
@@ -11706,12 +11976,15 @@ const Methods = {
11706
11976
  afterTreeFullData,
11707
11977
  checkboxReserveRowMap
11708
11978
  } = internalData;
11979
+ const {
11980
+ handleGetRowId
11981
+ } = createHandleGetRowId($xeTable);
11709
11982
  let sLen = 0; // 已选
11710
11983
  let hLen = 0; // 半选
11711
11984
  let vLen = 0; // 有效行
11712
11985
  const rootList = treeConfig ? afterTreeFullData : afterFullData;
11713
11986
  rootList.forEach(checkMethod ? row => {
11714
- const childRowid = getRowid($xeTable, row);
11987
+ const childRowid = handleGetRowId(row);
11715
11988
  const selected = checkField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : selectCheckboxMaps[childRowid];
11716
11989
  if (checkMethod({
11717
11990
  row
@@ -11730,7 +12003,7 @@ const Methods = {
11730
12003
  }
11731
12004
  }
11732
12005
  } : row => {
11733
- const childRowid = getRowid($xeTable, row);
12006
+ const childRowid = handleGetRowId(row);
11734
12007
  const selected = checkField ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : selectCheckboxMaps[childRowid];
11735
12008
  if (selected) {
11736
12009
  sLen++;
@@ -11860,9 +12133,9 @@ const Methods = {
11860
12133
  handleCheckedAllCheckboxRow($xeTable, value);
11861
12134
  if (evnt) {
11862
12135
  $xeTable.dispatchEvent('checkbox-all', {
11863
- records: $xeTable.getCheckboxRecords(),
11864
- reserves: $xeTable.getCheckboxReserveRecords(),
11865
- indeterminates: $xeTable.getCheckboxIndeterminateRecords(),
12136
+ records: () => $xeTable.getCheckboxRecords(),
12137
+ reserves: () => $xeTable.getCheckboxReserveRecords(),
12138
+ indeterminates: () => $xeTable.getCheckboxIndeterminateRecords(),
11866
12139
  checked: value
11867
12140
  }, evnt);
11868
12141
  }
@@ -11909,6 +12182,7 @@ const Methods = {
11909
12182
  reserve
11910
12183
  } = checkboxOpts;
11911
12184
  const childrenField = treeOpts.children || treeOpts.childrenField;
12185
+ // indeterminateField 仅支持读取
11912
12186
  const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
11913
12187
  if (checkField) {
11914
12188
  const handleClearChecked = item => {
@@ -12184,12 +12458,14 @@ const Methods = {
12184
12458
  },
12185
12459
  triggerHeaderCellClickEvent(evnt, params) {
12186
12460
  const $xeTable = this;
12461
+ const props = $xeTable;
12187
12462
  const internalData = $xeTable;
12188
12463
  const {
12189
12464
  _lastResizeTime
12190
12465
  } = internalData;
12191
12466
  const sortOpts = $xeTable.computeSortOpts;
12192
12467
  const columnOpts = $xeTable.computeColumnOpts;
12468
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
12193
12469
  const {
12194
12470
  column
12195
12471
  } = params;
@@ -12206,7 +12482,7 @@ const Methods = {
12206
12482
  triggerFilter,
12207
12483
  cell
12208
12484
  }, params), evnt);
12209
- if (columnOpts.isCurrent || $xeTable.highlightCurrentColumn) {
12485
+ if ((columnOpts.isCurrent || props.highlightCurrentColumn) && (!currentColumnOpts.trigger || ['header', 'default'].includes(currentColumnOpts.trigger))) {
12210
12486
  $xeTable.triggerCurrentColumnEvent(evnt, params);
12211
12487
  }
12212
12488
  return $xeTable.$nextTick();
@@ -12224,13 +12500,25 @@ const Methods = {
12224
12500
  * @param {ColumnInfo} fieldOrColumn 列配置
12225
12501
  */
12226
12502
  setCurrentColumn(fieldOrColumn) {
12227
- const column = handleFieldOrColumn(this, fieldOrColumn);
12503
+ const $xeTable = this;
12504
+ const props = $xeTable;
12505
+ const reactData = $xeTable;
12506
+ const {
12507
+ mouseConfig
12508
+ } = props;
12509
+ const mouseOpts = $xeTable.computeMouseOpts;
12510
+ const isMouseSelected = mouseConfig && mouseOpts.selected;
12511
+ const column = handleFieldOrColumn($xeTable, fieldOrColumn);
12228
12512
  if (column) {
12229
- // this.clearCurrentRow()
12230
- this.clearCurrentColumn();
12231
- this.currentColumn = column;
12513
+ $xeTable.clearCurrentColumn();
12514
+ reactData.currentColumn = column;
12232
12515
  }
12233
- return this.$nextTick();
12516
+ return $xeTable.$nextTick().then(() => {
12517
+ // 更新状选中态
12518
+ if (isMouseSelected) {
12519
+ $xeTable.addCellSelectedClass();
12520
+ }
12521
+ });
12234
12522
  },
12235
12523
  /**
12236
12524
  * 用于当前列,手动清空当前高亮的状态
@@ -12239,21 +12527,6 @@ const Methods = {
12239
12527
  this.currentColumn = null;
12240
12528
  return this.$nextTick();
12241
12529
  },
12242
- checkValidate(type) {
12243
- if (this.triggerValidate) {
12244
- return this.triggerValidate(type);
12245
- }
12246
- return this.$nextTick();
12247
- },
12248
- /**
12249
- * 当单元格发生改变时
12250
- * 如果存在规则,则校验
12251
- */
12252
- handleChangeCell(evnt, params) {
12253
- this.checkValidate('blur').catch(e => e).then(() => {
12254
- this.handleEdit(params, evnt).then(() => this.checkValidate('change')).catch(e => e);
12255
- });
12256
- },
12257
12530
  /**
12258
12531
  * 列点击事件
12259
12532
  * 如果是单击模式,则激活为编辑状态
@@ -12265,6 +12538,7 @@ const Methods = {
12265
12538
  const reactData = $xeTable;
12266
12539
  const {
12267
12540
  highlightCurrentRow,
12541
+ highlightCurrentColumn,
12268
12542
  editConfig
12269
12543
  } = props;
12270
12544
  const {
@@ -12281,6 +12555,8 @@ const Methods = {
12281
12555
  const checkboxOpts = $xeTable.computeCheckboxOpts;
12282
12556
  const keyboardOpts = $xeTable.computeKeyboardOpts;
12283
12557
  const rowOpts = $xeTable.computeRowOpts;
12558
+ const columnOpts = $xeTable.computeColumnOpts;
12559
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
12284
12560
  const {
12285
12561
  actived,
12286
12562
  focused
@@ -12311,11 +12587,11 @@ const Methods = {
12311
12587
  if (!triggerCheckbox && !triggerRadio) {
12312
12588
  // 如果是展开行
12313
12589
  if (!triggerExpandNode && (expandOpts.trigger === 'row' || isExpandType && expandOpts.trigger === 'cell')) {
12314
- this.triggerRowExpandEvent(evnt, params);
12590
+ $xeTable.triggerRowExpandEvent(evnt, params);
12315
12591
  }
12316
12592
  // 如果是树形表格
12317
12593
  if (treeOpts.trigger === 'row' || treeNode && treeOpts.trigger === 'cell') {
12318
- this.triggerTreeExpandEvent(evnt, params);
12594
+ $xeTable.triggerTreeExpandEvent(evnt, params);
12319
12595
  }
12320
12596
  }
12321
12597
  // 如果点击了树节点
@@ -12324,16 +12600,22 @@ const Methods = {
12324
12600
  // 如果是高亮行
12325
12601
  if (rowOpts.isCurrent || highlightCurrentRow) {
12326
12602
  if (!triggerCheckbox && !triggerRadio) {
12327
- this.triggerCurrentRowEvent(evnt, params);
12603
+ $xeTable.triggerCurrentRowEvent(evnt, params);
12604
+ }
12605
+ }
12606
+ // 如果是当前列
12607
+ if ((columnOpts.isCurrent || highlightCurrentColumn) && (!currentColumnOpts.trigger || ['cell', 'default'].includes(currentColumnOpts.trigger))) {
12608
+ if (!triggerCheckbox && !triggerRadio) {
12609
+ $xeTable.triggerCurrentColumnEvent(evnt, params);
12328
12610
  }
12329
12611
  }
12330
12612
  // 如果是单选框
12331
12613
  if (!triggerRadio && (radioOpts.trigger === 'row' || isRadioType && radioOpts.trigger === 'cell')) {
12332
- this.triggerRadioRowEvent(evnt, params);
12614
+ $xeTable.triggerRadioRowEvent(evnt, params);
12333
12615
  }
12334
12616
  // 如果是复选框
12335
12617
  if (!triggerCheckbox && (checkboxOpts.trigger === 'row' || isCheckboxType && checkboxOpts.trigger === 'cell')) {
12336
- this.handleToggleCheckRowEvent(evnt, params);
12618
+ $xeTable.handleToggleCheckRowEvent(evnt, params);
12337
12619
  }
12338
12620
  }
12339
12621
  // 如果设置了单元格选中功能,则不会使用点击事件去处理(只能支持双击模式)
@@ -12345,14 +12627,14 @@ const Methods = {
12345
12627
  }
12346
12628
  if (editOpts.trigger === 'manual') {
12347
12629
  if (actived.args && actived.row === row && column !== actived.column) {
12348
- this.handleChangeCell(evnt, params);
12630
+ handleChangeCell($xeTable, evnt, params);
12349
12631
  }
12350
12632
  } else if (!actived.args || row !== actived.row || column !== actived.column) {
12351
12633
  if (editOpts.trigger === 'click') {
12352
- this.handleChangeCell(evnt, params);
12634
+ handleChangeCell($xeTable, evnt, params);
12353
12635
  } else if (editOpts.trigger === 'dblclick') {
12354
12636
  if (editOpts.mode === 'row' && actived.row === row) {
12355
- this.handleChangeCell(evnt, params);
12637
+ handleChangeCell($xeTable, evnt, params);
12356
12638
  }
12357
12639
  }
12358
12640
  }
@@ -12372,7 +12654,7 @@ const Methods = {
12372
12654
  }
12373
12655
  }
12374
12656
  }
12375
- this.emitEvent('cell-click', params, evnt);
12657
+ $xeTable.dispatchEvent('cell-click', params, evnt);
12376
12658
  },
12377
12659
  /**
12378
12660
  * 列双击点击事件
@@ -12403,11 +12685,11 @@ const Methods = {
12403
12685
  if (isEnableConf(editConfig) && editOpts.trigger === 'dblclick') {
12404
12686
  if (!actived.args || evnt.currentTarget !== actived.args.cell) {
12405
12687
  if (editOpts.mode === 'row') {
12406
- this.checkValidate('blur').catch(e => e).then(() => {
12407
- this.handleEdit(params, evnt).then(() => this.checkValidate('change')).catch(e => e);
12688
+ checkValidate($xeTable, 'blur').catch(e => e).then(() => {
12689
+ this.handleEdit(params, evnt).then(() => checkValidate($xeTable, 'change')).catch(e => e);
12408
12690
  });
12409
12691
  } else if (editOpts.mode === 'cell') {
12410
- this.handleEdit(params, evnt).then(() => this.checkValidate('change')).catch(e => e);
12692
+ this.handleEdit(params, evnt).then(() => checkValidate($xeTable, 'change')).catch(e => e);
12411
12693
  }
12412
12694
  }
12413
12695
  }
@@ -12682,6 +12964,9 @@ const Methods = {
12682
12964
  } = internalData;
12683
12965
  const dEndMethod = dragEndMethod || (dragConfig ? dragConfig.dragEndMethod : null);
12684
12966
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
12967
+ const errRest = {
12968
+ status: false
12969
+ };
12685
12970
  if (prevDragRow && dragRow) {
12686
12971
  // 判断是否有拖动
12687
12972
  if (prevDragRow !== dragRow) {
@@ -12696,7 +12981,7 @@ const Methods = {
12696
12981
  const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
12697
12982
  return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then(status => {
12698
12983
  if (!status) {
12699
- return;
12984
+ return errRest;
12700
12985
  }
12701
12986
  let oafIndex = -1;
12702
12987
  let nafIndex = -1;
@@ -12727,11 +13012,11 @@ const Methods = {
12727
13012
  if (isPeerDrag && !isCrossDrag) {
12728
13013
  if (oldRest.row[parentField] !== newRest.row[parentField]) {
12729
13014
  // 非同级
12730
- return;
13015
+ return errRest;
12731
13016
  }
12732
13017
  } else {
12733
13018
  if (!isCrossDrag) {
12734
- return;
13019
+ return errRest;
12735
13020
  }
12736
13021
  if (oldAllMaps[newRowid]) {
12737
13022
  isSelfToChildStatus = true;
@@ -12742,19 +13027,19 @@ const Methods = {
12742
13027
  content: methods_getI18n('vxe.error.treeDragChild')
12743
13028
  });
12744
13029
  }
12745
- return;
13030
+ return errRest;
12746
13031
  }
12747
13032
  }
12748
13033
  }
12749
13034
  } else if (oldLevel) {
12750
13035
  // 子到根
12751
13036
  if (!isCrossDrag) {
12752
- return;
13037
+ return errRest;
12753
13038
  }
12754
13039
  } else if (newLevel) {
12755
13040
  // 根到子
12756
13041
  if (!isCrossDrag) {
12757
- return;
13042
+ return errRest;
12758
13043
  }
12759
13044
  if (oldAllMaps[newRowid]) {
12760
13045
  isSelfToChildStatus = true;
@@ -12765,7 +13050,7 @@ const Methods = {
12765
13050
  content: methods_getI18n('vxe.error.treeDragChild')
12766
13051
  });
12767
13052
  }
12768
- return;
13053
+ return errRest;
12769
13054
  }
12770
13055
  }
12771
13056
  } else {
@@ -12823,26 +13108,34 @@ const Methods = {
12823
13108
  if (reactData.scrollYLoad) {
12824
13109
  $xeTable.updateScrollYSpace();
12825
13110
  }
12826
- $xeTable.$nextTick().then(() => {
13111
+ if (evnt) {
13112
+ $xeTable.dispatchEvent('row-dragend', {
13113
+ oldRow: dragRow,
13114
+ newRow: prevDragRow,
13115
+ dragRow,
13116
+ dragPos: prevDragPos,
13117
+ dragToChild: isDragToChildFlag,
13118
+ offsetIndex: dragOffsetIndex,
13119
+ _index: {
13120
+ newIndex: nafIndex,
13121
+ oldIndex: oafIndex
13122
+ }
13123
+ }, evnt);
13124
+ }
13125
+ return $xeTable.$nextTick().then(() => {
12827
13126
  $xeTable.updateCellAreas();
12828
13127
  $xeTable.recalculate();
13128
+ }).then(() => {
13129
+ return {
13130
+ status: true
13131
+ };
12829
13132
  });
12830
- $xeTable.dispatchEvent('row-dragend', {
12831
- oldRow: dragRow,
12832
- newRow: prevDragRow,
12833
- dragRow,
12834
- dragPos: prevDragPos,
12835
- dragToChild: isDragToChildFlag,
12836
- offsetIndex: dragOffsetIndex,
12837
- _index: {
12838
- newIndex: nafIndex,
12839
- oldIndex: oafIndex
12840
- }
12841
- }, evnt);
12842
- }).catch(() => {});
13133
+ }).catch(() => {
13134
+ return errRest;
13135
+ });
12843
13136
  }
12844
13137
  }
12845
- return Promise.resolve();
13138
+ return Promise.resolve(errRest);
12846
13139
  },
12847
13140
  handleRowDragDragendEvent(evnt) {
12848
13141
  const $xeTable = this;
@@ -13028,6 +13321,9 @@ const Methods = {
13028
13321
  collectColumn
13029
13322
  } = internalData;
13030
13323
  const dragOffsetIndex = prevDragPos === 'right' ? 1 : 0;
13324
+ const errRest = {
13325
+ status: false
13326
+ };
13031
13327
  if (prevDragCol && dragCol) {
13032
13328
  // 判断是否有拖动
13033
13329
  if (prevDragCol !== dragCol) {
@@ -13044,7 +13340,7 @@ const Methods = {
13044
13340
  const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
13045
13341
  return Promise.resolve(dragEndMethod ? dragEndMethod(dragParams) : true).then(status => {
13046
13342
  if (!status) {
13047
- return;
13343
+ return errRest;
13048
13344
  }
13049
13345
  let oafIndex = -1;
13050
13346
  let nafIndex = -1;
@@ -13058,11 +13354,11 @@ const Methods = {
13058
13354
  if (isPeerDrag && !isCrossDrag) {
13059
13355
  if (dragColumn.parentId !== newColumn.parentId) {
13060
13356
  // 非同级
13061
- return;
13357
+ return errRest;
13062
13358
  }
13063
13359
  } else {
13064
13360
  if (!isCrossDrag) {
13065
- return;
13361
+ return errRest;
13066
13362
  }
13067
13363
  if (oldAllMaps[newColumn.id]) {
13068
13364
  isSelfToChildStatus = true;
@@ -13073,19 +13369,19 @@ const Methods = {
13073
13369
  content: methods_getI18n('vxe.error.treeDragChild')
13074
13370
  });
13075
13371
  }
13076
- return;
13372
+ return errRest;
13077
13373
  }
13078
13374
  }
13079
13375
  }
13080
13376
  } else if (dragColumn.parentId) {
13081
13377
  // 子到根
13082
13378
  if (!isCrossDrag) {
13083
- return;
13379
+ return errRest;
13084
13380
  }
13085
13381
  } else if (newColumn.parentId) {
13086
13382
  // 根到子
13087
13383
  if (!isCrossDrag) {
13088
- return;
13384
+ return errRest;
13089
13385
  }
13090
13386
  if (oldAllMaps[newColumn.id]) {
13091
13387
  isSelfToChildStatus = true;
@@ -13096,7 +13392,7 @@ const Methods = {
13096
13392
  content: methods_getI18n('vxe.error.treeDragChild')
13097
13393
  });
13098
13394
  }
13099
- return;
13395
+ return errRest;
13100
13396
  }
13101
13397
  }
13102
13398
  } else {
@@ -13165,25 +13461,32 @@ const Methods = {
13165
13461
  $xeTable.clearCopyCellArea();
13166
13462
  }
13167
13463
  }
13168
- $xeTable.dispatchEvent('column-dragend', {
13169
- oldColumn: dragColumn,
13170
- newColumn,
13171
- dragColumn,
13172
- dragPos: prevDragPos,
13173
- dragToChild: isDragToChildFlag,
13174
- offsetIndex: dragOffsetIndex,
13175
- _index: {
13176
- newIndex: nafIndex,
13177
- oldIndex: oafIndex
13178
- }
13179
- }, evnt);
13464
+ if (evnt) {
13465
+ $xeTable.dispatchEvent('column-dragend', {
13466
+ oldColumn: dragColumn,
13467
+ newColumn,
13468
+ dragColumn,
13469
+ dragPos: prevDragPos,
13470
+ dragToChild: isDragToChildFlag,
13471
+ offsetIndex: dragOffsetIndex,
13472
+ _index: {
13473
+ newIndex: nafIndex,
13474
+ oldIndex: oafIndex
13475
+ }
13476
+ }, evnt);
13477
+ }
13180
13478
  if (isSyncColumn) {
13181
13479
  $xeTable.handleColDragSwapColumn();
13182
13480
  }
13183
- }).catch(() => {});
13481
+ return {
13482
+ status: true
13483
+ };
13484
+ }).catch(() => {
13485
+ return errRest;
13486
+ });
13184
13487
  }
13185
13488
  }
13186
- return Promise.resolve();
13489
+ return Promise.resolve(errRest);
13187
13490
  },
13188
13491
  handleHeaderCellDragDragendEvent(evnt) {
13189
13492
  const $xeTable = this;
@@ -13580,9 +13883,11 @@ const Methods = {
13580
13883
  * @param {Event} evnt 事件
13581
13884
  */
13582
13885
  closeFilter() {
13886
+ const $xeTable = this;
13887
+ const reactData = $xeTable;
13583
13888
  const {
13584
13889
  filterStore
13585
- } = this;
13890
+ } = reactData;
13586
13891
  const {
13587
13892
  column,
13588
13893
  visible
@@ -13594,15 +13899,15 @@ const Methods = {
13594
13899
  visible: false
13595
13900
  });
13596
13901
  if (visible) {
13597
- this.emitEvent('filter-visible', {
13902
+ $xeTable.dispatchEvent('filter-visible', {
13598
13903
  column,
13599
13904
  field: column.field,
13600
13905
  property: column.field,
13601
- filterList: this.getCheckedFilters(),
13906
+ filterList: () => $xeTable.getCheckedFilters(),
13602
13907
  visible: false
13603
13908
  }, null);
13604
13909
  }
13605
- return this.$nextTick();
13910
+ return $xeTable.$nextTick();
13606
13911
  },
13607
13912
  /**
13608
13913
  * 判断指定列是否为筛选状态,如果为空则判断所有列
@@ -14807,11 +15112,12 @@ const Methods = {
14807
15112
  } = tableProps;
14808
15113
  const {
14809
15114
  scrollXLoad,
14810
- scrollYLoad
15115
+ scrollYLoad,
15116
+ expandColumn
14811
15117
  } = reactData;
14812
15118
  const leftFixedWidth = $xeTable.computeLeftFixedWidth;
14813
15119
  const rightFixedWidth = $xeTable.computeRightFixedWidth;
14814
- if (!(scrollYLoad || leftFixedWidth || rightFixedWidth)) {
15120
+ if (!(scrollYLoad || leftFixedWidth || rightFixedWidth || expandColumn)) {
14815
15121
  return;
14816
15122
  }
14817
15123
  const {
@@ -15881,6 +16187,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
15881
16187
  tdOns.dblclick = evnt => {
15882
16188
  $xeTable.triggerCellDblclickEvent(evnt, cellParams);
15883
16189
  };
16190
+ let isMergeCell = false;
15884
16191
  // 合并行或列
15885
16192
  if (mergeList.length) {
15886
16193
  const spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex);
@@ -15893,9 +16200,11 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
15893
16200
  return null;
15894
16201
  }
15895
16202
  if (rowspan > 1) {
16203
+ isMergeCell = true;
15896
16204
  tdAttrs.rowspan = rowspan;
15897
16205
  }
15898
16206
  if (colspan > 1) {
16207
+ isMergeCell = true;
15899
16208
  tdAttrs.colspan = colspan;
15900
16209
  }
15901
16210
  }
@@ -15930,11 +16239,13 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
15930
16239
  const isLastColumn = $columnIndex === columns.length - 1;
15931
16240
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
15932
16241
  let isVNPreEmptyStatus = false;
15933
- if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
15934
- if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
15935
- isVNPreEmptyStatus = true;
15936
- } else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
15937
- isVNPreEmptyStatus = true;
16242
+ if (!isMergeCell) {
16243
+ if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
16244
+ if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
16245
+ isVNPreEmptyStatus = true;
16246
+ } else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
16247
+ isVNPreEmptyStatus = true;
16248
+ }
15938
16249
  }
15939
16250
  }
15940
16251
  const tcStyle = {};
@@ -16380,7 +16691,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
16380
16691
  isOptimizeMode = true;
16381
16692
  }
16382
16693
  }
16383
- if (fixedType || !overflowX) {
16694
+ if (!isColLoading && (fixedType || !overflowX)) {
16384
16695
  renderColumnList = visibleColumn;
16385
16696
  }
16386
16697
  if (fixedType) {
@@ -16867,6 +17178,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
16867
17178
  } = tableProps;
16868
17179
  const {
16869
17180
  isGroup,
17181
+ isColLoading,
16870
17182
  overflowX,
16871
17183
  scrollXLoad,
16872
17184
  scrollYLoad,
@@ -16891,7 +17203,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
16891
17203
  isOptimizeMode = true;
16892
17204
  }
16893
17205
  }
16894
- if (fixedType || !overflowX) {
17206
+ if (!isColLoading && (fixedType || !overflowX)) {
16895
17207
  renderColumnList = visibleColumn;
16896
17208
  }
16897
17209
  if (fixedType) {
@@ -17150,6 +17462,7 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
17150
17462
  cell: evnt.currentTarget
17151
17463
  }, cellParams), evnt);
17152
17464
  };
17465
+ let isMergeCell = false;
17153
17466
  // 合并行或列
17154
17467
  if (mergeFooterList.length) {
17155
17468
  const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
@@ -17162,9 +17475,11 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
17162
17475
  return null;
17163
17476
  }
17164
17477
  if (rowspan > 1) {
17478
+ isMergeCell = true;
17165
17479
  attrs.rowspan = rowspan;
17166
17480
  }
17167
17481
  if (colspan > 1) {
17482
+ isMergeCell = true;
17168
17483
  attrs.colspan = colspan;
17169
17484
  }
17170
17485
  }
@@ -17187,8 +17502,10 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
17187
17502
  const isLastColumn = $columnIndex === tableColumn.length - 1;
17188
17503
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
17189
17504
  let isVNPreEmptyStatus = false;
17190
- if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
17191
- isVNPreEmptyStatus = true;
17505
+ if (!isMergeCell) {
17506
+ if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
17507
+ isVNPreEmptyStatus = true;
17508
+ }
17192
17509
  }
17193
17510
  const tcStyle = {};
17194
17511
  if (hasEllipsis) {
@@ -17367,6 +17684,7 @@ function footer_renderHeads(h, _vm, renderColumnList) {
17367
17684
  } = tableInternalData;
17368
17685
  const {
17369
17686
  isGroup,
17687
+ isColLoading,
17370
17688
  overflowX,
17371
17689
  scrollXLoad,
17372
17690
  scrollYLoad,
@@ -17382,7 +17700,7 @@ function footer_renderHeads(h, _vm, renderColumnList) {
17382
17700
  isOptimizeMode = true;
17383
17701
  }
17384
17702
  }
17385
- if (fixedType || !overflowX) {
17703
+ if (!isColLoading && (fixedType || !overflowX)) {
17386
17704
  renderColumnList = visibleColumn;
17387
17705
  }
17388
17706
  if (fixedType) {
@@ -17649,6 +17967,8 @@ const {
17649
17967
  resizeConfig: Object,
17650
17968
  // 列配置信息
17651
17969
  columnConfig: Object,
17970
+ // 当前列配置信息
17971
+ currentColumnConfig: Object,
17652
17972
  // 单元格配置信息
17653
17973
  cellConfig: Object,
17654
17974
  // 表头单元格配置信息
@@ -17657,6 +17977,8 @@ const {
17657
17977
  footerCellConfig: Object,
17658
17978
  // 行配置信息
17659
17979
  rowConfig: Object,
17980
+ // 当前行配置信息
17981
+ currentRowConfig: Object,
17660
17982
  // 已废弃,被 rowDragConfig 替换
17661
17983
  dragConfig: Object,
17662
17984
  // 行拖拽排序配置项
@@ -18997,11 +19319,17 @@ const {
18997
19319
  const rtFilter = compConf ? compConf.renderTableFilter || compConf.renderFilter : null;
18998
19320
  if (filterSlot) {
18999
19321
  return [h('div', {
19000
- class: 'vxe-table--filter-template'
19322
+ class: 'vxe-table--filter-template',
19323
+ style: maxHeight ? {
19324
+ maxHeight: `${maxHeight}px`
19325
+ } : {}
19001
19326
  }, $xeTable.callSlot(filterSlot, params, h))];
19002
19327
  } else if (rtFilter) {
19003
19328
  return [h('div', {
19004
- class: 'vxe-table--filter-template'
19329
+ class: 'vxe-table--filter-template',
19330
+ style: maxHeight ? {
19331
+ maxHeight: `${maxHeight}px`
19332
+ } : {}
19005
19333
  }, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))];
19006
19334
  }
19007
19335
  const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some(item => item._checked);
@@ -24021,18 +24349,27 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
24021
24349
  methods: {
24022
24350
  // 处理 Tab 键移动
24023
24351
  moveTabSelected(args, isLeft, evnt) {
24352
+ const $xeTable = this;
24353
+ const props = $xeTable;
24354
+ const internalData = $xeTable;
24355
+ const {
24356
+ editConfig
24357
+ } = props;
24024
24358
  const {
24025
24359
  afterFullData,
24026
- visibleColumn,
24027
- editConfig,
24028
- editOpts
24029
- } = this;
24360
+ visibleColumn
24361
+ } = internalData;
24362
+ const editOpts = $xeTable.computeEditOpts;
24363
+ const rowOpts = $xeTable.computeRowOpts;
24364
+ const currentRowOpts = $xeTable.computeCurrentRowOpts;
24365
+ const columnOpts = $xeTable.computeColumnOpts;
24366
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
24030
24367
  let targetRow;
24031
24368
  let targetRowIndex;
24032
24369
  let targetColumnIndex;
24033
24370
  const params = Object.assign({}, args);
24034
- const _rowIndex = this.getVTRowIndex(params.row);
24035
- const _columnIndex = this.getVTColumnIndex(params.column);
24371
+ const _rowIndex = $xeTable.getVTRowIndex(params.row);
24372
+ const _columnIndex = $xeTable.getVTColumnIndex(params.column);
24036
24373
  evnt.preventDefault();
24037
24374
  if (isLeft) {
24038
24375
  // 向左
@@ -24068,31 +24405,48 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
24068
24405
  }
24069
24406
  params.columnIndex = targetColumnIndex;
24070
24407
  params.column = targetColumn;
24071
- params.cell = this.getCellElement(params.row, params.column);
24408
+ params.cell = $xeTable.getCellElement(params.row, params.column);
24409
+ if (rowOpts.isCurrent && currentRowOpts.isFollowSelected) {
24410
+ $xeTable.triggerCurrentRowEvent(evnt, params);
24411
+ }
24412
+ if (columnOpts.isCurrent && currentColumnOpts.isFollowSelected) {
24413
+ $xeTable.triggerCurrentColumnEvent(evnt, params);
24414
+ }
24072
24415
  if (editConfig) {
24073
24416
  if (editOpts.trigger === 'click' || editOpts.trigger === 'dblclick') {
24074
24417
  if (editOpts.mode === 'row') {
24075
- this.handleEdit(params, evnt);
24418
+ $xeTable.handleEdit(params, evnt);
24076
24419
  } else {
24077
- this.scrollToRow(params.row, params.column).then(() => this.handleSelected(params, evnt));
24420
+ $xeTable.scrollToRow(params.row, params.column).then(() => {
24421
+ $xeTable.handleSelected(params, evnt);
24422
+ });
24078
24423
  }
24079
24424
  }
24080
24425
  } else {
24081
- this.scrollToRow(params.row, params.column).then(() => this.handleSelected(params, evnt));
24426
+ $xeTable.scrollToRow(params.row, params.column).then(() => {
24427
+ $xeTable.handleSelected(params, evnt);
24428
+ });
24082
24429
  }
24083
24430
  }
24084
24431
  },
24085
24432
  // 处理当前行方向键移动
24086
24433
  moveCurrentRow(isUpArrow, isDwArrow, evnt) {
24434
+ const $xeTable = this;
24435
+ const props = $xeTable;
24436
+ const reactData = $xeTable;
24437
+ const internalData = $xeTable;
24438
+ const {
24439
+ treeConfig
24440
+ } = props;
24441
+ const {
24442
+ currentRow
24443
+ } = reactData;
24087
24444
  const {
24088
- currentRow,
24089
- treeConfig,
24090
- treeOpts,
24091
24445
  afterFullData
24092
- } = this;
24446
+ } = internalData;
24447
+ const treeOpts = $xeTable.computeTreeOpts;
24093
24448
  const childrenField = treeOpts.children || treeOpts.childrenField;
24094
24449
  let targetRow;
24095
- evnt.preventDefault();
24096
24450
  if (currentRow) {
24097
24451
  if (treeConfig) {
24098
24452
  const {
@@ -24107,7 +24461,7 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
24107
24461
  targetRow = items[index + 1];
24108
24462
  }
24109
24463
  } else {
24110
- const _rowIndex = this.getVTRowIndex(currentRow);
24464
+ const _rowIndex = $xeTable.getVTRowIndex(currentRow);
24111
24465
  if (isUpArrow && _rowIndex > 0) {
24112
24466
  targetRow = afterFullData[_rowIndex - 1];
24113
24467
  } else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
@@ -24118,22 +24472,60 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
24118
24472
  targetRow = afterFullData[0];
24119
24473
  }
24120
24474
  if (targetRow) {
24475
+ evnt.preventDefault();
24121
24476
  const params = {
24122
- $table: this,
24123
- row: targetRow
24477
+ $table: $xeTable,
24478
+ row: targetRow,
24479
+ rowIndex: $xeTable.getRowIndex(targetRow),
24480
+ $rowIndex: $xeTable.getVMRowIndex(targetRow)
24481
+ };
24482
+ $xeTable.scrollToRow(targetRow).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
24483
+ }
24484
+ },
24485
+ // 处理当前列方向键移动
24486
+ moveCurrentColumn(isLeftArrow, isRightArrow, evnt) {
24487
+ const $xeTable = this;
24488
+ const reactData = $xeTable;
24489
+ const internalData = $xeTable;
24490
+ const {
24491
+ currentColumn
24492
+ } = reactData;
24493
+ const {
24494
+ visibleColumn
24495
+ } = internalData;
24496
+ let targetCol = null;
24497
+ if (currentColumn) {
24498
+ const _columnIndex = $xeTable.getVTColumnIndex(currentColumn);
24499
+ if (isLeftArrow && _columnIndex > 0) {
24500
+ targetCol = visibleColumn[_columnIndex - 1];
24501
+ } else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
24502
+ targetCol = visibleColumn[_columnIndex + 1];
24503
+ }
24504
+ } else {
24505
+ targetCol = visibleColumn[0];
24506
+ }
24507
+ if (targetCol) {
24508
+ evnt.preventDefault();
24509
+ const params = {
24510
+ $table: $xeTable,
24511
+ column: targetCol,
24512
+ columnIndex: $xeTable.getColumnIndex(targetCol),
24513
+ $columnIndex: $xeTable.getVMColumnIndex(targetCol)
24124
24514
  };
24125
- this.scrollToRow(targetRow).then(() => this.triggerCurrentRowEvent(evnt, params));
24515
+ $xeTable.scrollToColumn(targetCol).then(() => $xeTable.triggerCurrentColumnEvent(evnt, params));
24126
24516
  }
24127
24517
  },
24128
24518
  // 处理可编辑方向键移动
24129
24519
  moveSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
24520
+ const $xeTable = this;
24521
+ const internalData = $xeTable;
24130
24522
  const {
24131
24523
  afterFullData,
24132
24524
  visibleColumn
24133
- } = this;
24525
+ } = internalData;
24134
24526
  const params = Object.assign({}, args);
24135
- const _rowIndex = this.getVTRowIndex(params.row);
24136
- const _columnIndex = this.getVTColumnIndex(params.column);
24527
+ const _rowIndex = $xeTable.getVTRowIndex(params.row);
24528
+ const _columnIndex = $xeTable.getVTColumnIndex(params.column);
24137
24529
  evnt.preventDefault();
24138
24530
  if (isUpArrow && _rowIndex > 0) {
24139
24531
  // 移动到上一行
@@ -24152,9 +24544,9 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
24152
24544
  params.columnIndex = _columnIndex + 1;
24153
24545
  params.column = visibleColumn[params.columnIndex];
24154
24546
  }
24155
- this.scrollToRow(params.row, params.column).then(() => {
24156
- params.cell = this.getCellElement(params.row, params.column);
24157
- this.handleSelected(params, evnt);
24547
+ $xeTable.scrollToRow(params.row, params.column).then(() => {
24548
+ params.cell = $xeTable.getCellElement(params.row, params.column);
24549
+ $xeTable.handleSelected(params, evnt);
24158
24550
  });
24159
24551
  },
24160
24552
  handleCellMousedownEvent(evnt, params) {
@@ -26074,7 +26466,14 @@ function renderBody(h, $xeTable) {
26074
26466
  return this.computeColumnOpts;
26075
26467
  },
26076
26468
  computeColumnOpts() {
26077
- return Object.assign({}, table_getConfig().table.columnConfig, this.columnConfig);
26469
+ const $xeTable = this;
26470
+ const props = $xeTable;
26471
+ return Object.assign({}, table_getConfig().table.columnConfig, props.columnConfig);
26472
+ },
26473
+ computeCurrentColumnOpts() {
26474
+ const $xeTable = this;
26475
+ const props = $xeTable;
26476
+ return Object.assign({}, table_getConfig().table.currentColumnConfig, props.currentColumnConfig);
26078
26477
  },
26079
26478
  computeCellOpts() {
26080
26479
  const $xeTable = this;
@@ -26095,7 +26494,14 @@ function renderBody(h, $xeTable) {
26095
26494
  return this.computeRowOpts;
26096
26495
  },
26097
26496
  computeRowOpts() {
26098
- return Object.assign({}, table_getConfig().table.rowConfig, this.rowConfig);
26497
+ const $xeTable = this;
26498
+ const props = $xeTable;
26499
+ return Object.assign({}, table_getConfig().table.rowConfig, props.rowConfig);
26500
+ },
26501
+ computeCurrentRowOpts() {
26502
+ const $xeTable = this;
26503
+ const props = $xeTable;
26504
+ return Object.assign({}, table_getConfig().table.currentRowConfig, props.currentRowConfig);
26099
26505
  },
26100
26506
  computeRowDragOpts() {
26101
26507
  return Object.assign({}, table_getConfig().table.rowDragConfig, this.rowDragConfig);
@@ -26119,27 +26525,35 @@ function renderBody(h, $xeTable) {
26119
26525
  return this.computeSeqOpts;
26120
26526
  },
26121
26527
  computeSeqOpts() {
26528
+ const $xeTable = this;
26529
+ const props = $xeTable;
26122
26530
  return Object.assign({
26123
26531
  startIndex: 0
26124
- }, table_getConfig().table.seqConfig, this.seqConfig);
26532
+ }, table_getConfig().table.seqConfig, props.seqConfig);
26125
26533
  },
26126
26534
  radioOpts() {
26127
26535
  return this.computeRadioOpts;
26128
26536
  },
26129
26537
  computeRadioOpts() {
26130
- return Object.assign({}, table_getConfig().table.radioConfig, this.radioConfig);
26538
+ const $xeTable = this;
26539
+ const props = $xeTable;
26540
+ return Object.assign({}, table_getConfig().table.radioConfig, props.radioConfig);
26131
26541
  },
26132
26542
  checkboxOpts() {
26133
26543
  return this.computeCheckboxOpts;
26134
26544
  },
26135
26545
  computeCheckboxOpts() {
26136
- return Object.assign({}, table_getConfig().table.checkboxConfig, this.checkboxConfig);
26546
+ const $xeTable = this;
26547
+ const props = $xeTable;
26548
+ return Object.assign({}, table_getConfig().table.checkboxConfig, props.checkboxConfig);
26137
26549
  },
26138
26550
  tooltipOpts() {
26139
26551
  return this.computeTooltipOpts;
26140
26552
  },
26141
26553
  computeTooltipOpts() {
26142
- return Object.assign({}, table_getConfig().tooltip, table_getConfig().table.tooltipConfig, this.tooltipConfig);
26554
+ const $xeTable = this;
26555
+ const props = $xeTable;
26556
+ return Object.assign({}, table_getConfig().tooltip, table_getConfig().table.tooltipConfig, props.tooltipConfig);
26143
26557
  },
26144
26558
  tipConfig() {
26145
26559
  return {
@@ -28123,6 +28537,24 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
28123
28537
  }
28124
28538
  return null;
28125
28539
  }
28540
+ const getConfigSlot = ($xeGrid, slotConfigs) => {
28541
+ const slots = $xeGrid.$scopedSlots;
28542
+ const slotConf = {};
28543
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectMap(slotConfigs, (slotFunc, slotKey) => {
28544
+ if (slotFunc) {
28545
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
28546
+ if (slots[slotFunc]) {
28547
+ slotConf[slotKey] = slots[slotFunc];
28548
+ } else {
28549
+ errLog('vxe.error.notSlot', [slotFunc]);
28550
+ }
28551
+ } else {
28552
+ slotConf[slotKey] = slotFunc;
28553
+ }
28554
+ }
28555
+ });
28556
+ return slotConf;
28557
+ };
28126
28558
  function getToolbarSlots(_vm) {
28127
28559
  const {
28128
28560
  $scopedSlots,
@@ -28152,26 +28584,6 @@ function getToolbarSlots(_vm) {
28152
28584
  }
28153
28585
  return slots;
28154
28586
  }
28155
- function getPagerSlots(_vm) {
28156
- const {
28157
- pagerOpts
28158
- } = _vm;
28159
- const pagerOptSlots = pagerOpts.slots;
28160
- const slots = {};
28161
- let leftSlot;
28162
- let rightSlot;
28163
- if (pagerOptSlots) {
28164
- leftSlot = getFuncSlot(_vm, pagerOptSlots, 'left');
28165
- rightSlot = getFuncSlot(_vm, pagerOptSlots, 'right');
28166
- if (leftSlot) {
28167
- slots.left = leftSlot;
28168
- }
28169
- if (rightSlot) {
28170
- slots.right = rightSlot;
28171
- }
28172
- }
28173
- return slots;
28174
- }
28175
28587
  function getTableOns(_vm) {
28176
28588
  const {
28177
28589
  $listeners,
@@ -28194,6 +28606,30 @@ function getTableOns(_vm) {
28194
28606
  }
28195
28607
  return ons;
28196
28608
  }
28609
+ function pageChangeEvent($xeGrid, params) {
28610
+ const props = $xeGrid;
28611
+ const reactData = $xeGrid;
28612
+ const {
28613
+ proxyConfig
28614
+ } = props;
28615
+ const {
28616
+ tablePage
28617
+ } = reactData;
28618
+ const {
28619
+ $event,
28620
+ currentPage,
28621
+ pageSize
28622
+ } = params;
28623
+ const proxyOpts = $xeGrid.computeProxyOpts;
28624
+ tablePage.currentPage = currentPage;
28625
+ tablePage.pageSize = pageSize;
28626
+ $xeGrid.dispatchEvent('page-change', params, $event);
28627
+ if (proxyConfig && isEnableConf(proxyOpts)) {
28628
+ $xeGrid.commitProxy('query').then(rest => {
28629
+ $xeGrid.dispatchEvent('proxy-query', rest, $event);
28630
+ });
28631
+ }
28632
+ }
28197
28633
  /**
28198
28634
  * 渲染表单
28199
28635
  */
@@ -28331,32 +28767,34 @@ function renderBottom(h, _vm) {
28331
28767
  function renderPager(h, $xeGrid) {
28332
28768
  const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
28333
28769
  const props = $xeGrid;
28770
+ const slots = $xeGrid.$scopedSlots;
28771
+ const reactData = $xeGrid;
28334
28772
  const {
28335
- pagerConfig,
28336
- proxyConfig
28773
+ proxyConfig,
28774
+ pagerConfig
28337
28775
  } = props;
28338
- const {
28339
- $scopedSlots,
28340
- tablePage
28341
- } = $xeGrid;
28342
- const pagerSlot = $scopedSlots.pager;
28343
- const hasPager = !!(pagerSlot || isEnableConf(pagerConfig));
28344
- if (hasPager) {
28776
+ const proxyOpts = $xeGrid.computeProxyOpts;
28777
+ const pagerOpts = $xeGrid.computePagerOpts;
28778
+ const pagerSlot = slots.pager;
28779
+ if (pagerConfig && isEnableConf(pagerOpts) || slots.pager) {
28345
28780
  return h('div', {
28346
- key: 'pager',
28347
28781
  ref: 'refPagerWrapper',
28782
+ key: 'pager',
28348
28783
  class: 'vxe-grid--pager-wrapper'
28349
28784
  }, pagerSlot ? pagerSlot.call($xeGrid, {
28350
28785
  $grid: $xeGrid
28351
- }, h) : [VxeUIPagerComponent ? h(VxeUIPagerComponent, {
28786
+ }) : [VxeUIPagerComponent ? h(VxeUIPagerComponent, {
28787
+ ref: 'refPager',
28352
28788
  props: {
28353
- ...$xeGrid.pagerOpts,
28354
- ...(proxyConfig ? tablePage : {})
28789
+ ...pagerOpts,
28790
+ ...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})
28355
28791
  },
28356
28792
  on: {
28357
- 'page-change': $xeGrid.pageChangeEvent
28793
+ 'page-change'(params) {
28794
+ pageChangeEvent($xeGrid, params);
28795
+ }
28358
28796
  },
28359
- scopedSlots: getPagerSlots($xeGrid)
28797
+ scopedSlots: getConfigSlot($xeGrid, pagerOpts.slots)
28360
28798
  }) : grid_renderEmptyElement($xeGrid)]);
28361
28799
  }
28362
28800
  return grid_renderEmptyElement($xeGrid);
@@ -28708,6 +29146,10 @@ Object.keys(table.methods).forEach(name => {
28708
29146
  }
28709
29147
  return [];
28710
29148
  },
29149
+ getEl() {
29150
+ const $xeGrid = this;
29151
+ return $xeGrid.$refs.refElem;
29152
+ },
28711
29153
  /**
28712
29154
  * 获取需要排除的高度
28713
29155
  */
@@ -28718,20 +29160,25 @@ Object.keys(table.methods).forEach(name => {
28718
29160
  isZMax
28719
29161
  } = reactData;
28720
29162
  const el = $xeGrid.$refs.refElem;
28721
- const formWrapper = $xeGrid.$refs.refFormWrapper;
28722
- const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
28723
- const topWrapper = $xeGrid.$refs.refTopWrapper;
28724
- const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
28725
- const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
28726
- const parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(el.parentNode);
28727
- return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
29163
+ if (el) {
29164
+ const formWrapper = $xeGrid.$refs.refFormWrapper;
29165
+ const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
29166
+ const topWrapper = $xeGrid.$refs.refTopWrapper;
29167
+ const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
29168
+ const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
29169
+ const parentEl = el.parentElement;
29170
+ const parentPaddingSize = isZMax ? 0 : parentEl ? getPaddingTopBottomSize(parentEl) : 0;
29171
+ return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
29172
+ }
29173
+ return 0;
28728
29174
  },
28729
29175
  getParentHeight() {
28730
29176
  const $xeGrid = this;
28731
29177
  const reactData = $xeGrid;
28732
29178
  const el = $xeGrid.$refs.refElem;
28733
29179
  if (el) {
28734
- return (reactData.isZMax ? getDomNode().visibleHeight : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(el.parentNode).height)) - $xeGrid.getExcludeHeight();
29180
+ const parentEl = el.parentElement;
29181
+ return (reactData.isZMax ? getDomNode().visibleHeight : parentEl ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(parentEl).height) : 0) - $xeGrid.getExcludeHeight();
28735
29182
  }
28736
29183
  return 0;
28737
29184
  },
@@ -28824,6 +29271,8 @@ Object.keys(table.methods).forEach(name => {
28824
29271
  * @param {String/Object} code 字符串或对象
28825
29272
  */
28826
29273
  commitProxy(proxyTarget, ...args) {
29274
+ const $xeGrid = this;
29275
+ const reactData = $xeGrid;
28827
29276
  const {
28828
29277
  $refs,
28829
29278
  toolbar,
@@ -28906,6 +29355,9 @@ Object.keys(table.methods).forEach(name => {
28906
29355
  if (ajaxMethods) {
28907
29356
  const isInited = code === '_init';
28908
29357
  const isReload = code === 'reload';
29358
+ if (!isInited && reactData.tableLoading) {
29359
+ return $xeGrid.$nextTick();
29360
+ }
28909
29361
  let sortList = [];
28910
29362
  let filterList = [];
28911
29363
  let pageParams = {};
@@ -29381,30 +29833,6 @@ Object.keys(table.methods).forEach(name => {
29381
29833
  }
29382
29834
  }
29383
29835
  },
29384
- pageChangeEvent(params) {
29385
- const {
29386
- proxyConfig,
29387
- tablePage
29388
- } = this;
29389
- const {
29390
- currentPage,
29391
- pageSize
29392
- } = params;
29393
- tablePage.currentPage = currentPage;
29394
- tablePage.pageSize = pageSize;
29395
- this.$emit('page-change', Object.assign({
29396
- $grid: this
29397
- }, params));
29398
- if (proxyConfig) {
29399
- this.commitProxy('query').then(rest => {
29400
- this.$emit('proxy-query', {
29401
- ...rest,
29402
- $grid: this,
29403
- $event: params.$event
29404
- });
29405
- });
29406
- }
29407
- },
29408
29836
  sortChangeEvent(params) {
29409
29837
  const {
29410
29838
  $table,
@@ -29454,9 +29882,14 @@ Object.keys(table.methods).forEach(name => {
29454
29882
  }, params));
29455
29883
  },
29456
29884
  submitEvent(params) {
29885
+ const $xeGrid = this;
29886
+ const reactData = $xeGrid;
29457
29887
  const {
29458
29888
  proxyConfig
29459
29889
  } = this;
29890
+ if (reactData.tableLoading) {
29891
+ return;
29892
+ }
29460
29893
  if (proxyConfig) {
29461
29894
  this.commitProxy('reload').then(rest => {
29462
29895
  this.$emit('proxy-query', {
@@ -29613,7 +30046,8 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
29613
30046
  const {
29614
30047
  getConfig: render_getConfig,
29615
30048
  renderer: render_renderer,
29616
- getI18n: render_getI18n
30049
+ getI18n: render_getI18n,
30050
+ getComponent
29617
30051
  } = core_.VxeUI;
29618
30052
  const componentDefaultModelProp = 'value';
29619
30053
  const defaultCompProps = {};
@@ -29651,7 +30085,7 @@ function getOldComponent({
29651
30085
  function getDefaultComponent({
29652
30086
  name
29653
30087
  }) {
29654
- return name;
30088
+ return getComponent(name) || name;
29655
30089
  }
29656
30090
  function handleConfirmFilter(params, checked, option) {
29657
30091
  const {
@@ -30294,6 +30728,69 @@ function handleExportTreeSelectMethod(params) {
30294
30728
  } = params;
30295
30729
  return options.original ? getCellValue(row, column) : getTreeSelectCellValue(column.editRender || column.cellRender, params);
30296
30730
  }
30731
+ function handleNumberCell(h, renderOpts, params) {
30732
+ const {
30733
+ props = {},
30734
+ showNegativeStatus
30735
+ } = renderOpts;
30736
+ const {
30737
+ row,
30738
+ column
30739
+ } = params;
30740
+ const {
30741
+ type
30742
+ } = props;
30743
+ let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
30744
+ let isNegative = false;
30745
+ if (!isEmptyValue(cellValue)) {
30746
+ const numberInputConfig = render_getConfig().numberInput || {};
30747
+ if (type === 'float') {
30748
+ const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
30749
+ const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
30750
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
30751
+ if (!autoFill) {
30752
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
30753
+ }
30754
+ if (showNegativeStatus) {
30755
+ if (cellValue < 0) {
30756
+ isNegative = true;
30757
+ }
30758
+ }
30759
+ } else if (type === 'amount') {
30760
+ const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
30761
+ const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
30762
+ const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
30763
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
30764
+ if (showNegativeStatus) {
30765
+ if (cellValue < 0) {
30766
+ isNegative = true;
30767
+ }
30768
+ }
30769
+ cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(cellValue, {
30770
+ digits
30771
+ });
30772
+ if (!autoFill) {
30773
+ const [iStr, dStr] = cellValue.split('.');
30774
+ if (dStr) {
30775
+ const dRest = dStr.replace(/0+$/, '');
30776
+ cellValue = dRest ? [iStr, '.', dRest].join('') : iStr;
30777
+ }
30778
+ }
30779
+ if (showCurrency) {
30780
+ cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
30781
+ }
30782
+ } else {
30783
+ if (showNegativeStatus) {
30784
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue) < 0) {
30785
+ isNegative = true;
30786
+ }
30787
+ }
30788
+ }
30789
+ }
30790
+ return getCellLabelVNs(h, renderOpts, params, cellValue, isNegative ? {
30791
+ class: 'is--negative'
30792
+ } : {});
30793
+ }
30297
30794
  /**
30298
30795
  * 表格 - 渲染器
30299
30796
  */
@@ -30365,72 +30862,22 @@ render_renderer.mixin({
30365
30862
  renderTableFilter: defaultFilterRender,
30366
30863
  tableFilterDefaultMethod: handleInputFilterMethod
30367
30864
  },
30368
- VxeNumberInput: {
30369
- tableAutoFocus: 'input',
30370
- renderTableEdit: defaultEditRender,
30371
- renderTableCell(h, renderOpts, params) {
30372
- const {
30373
- props = {},
30374
- showNegativeStatus
30375
- } = renderOpts;
30865
+ FormatNumberInput: {
30866
+ renderTableDefault: handleNumberCell,
30867
+ tableFilterDefaultMethod: handleInputFilterMethod,
30868
+ tableExportMethod(params) {
30376
30869
  const {
30377
30870
  row,
30378
30871
  column
30379
30872
  } = params;
30380
- const {
30381
- type
30382
- } = props;
30383
- let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
30384
- let isNegative = false;
30385
- if (!isEmptyValue(cellValue)) {
30386
- const numberInputConfig = render_getConfig().numberInput || {};
30387
- if (type === 'float') {
30388
- const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
30389
- const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
30390
- cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
30391
- if (!autoFill) {
30392
- cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
30393
- }
30394
- if (showNegativeStatus) {
30395
- if (cellValue < 0) {
30396
- isNegative = true;
30397
- }
30398
- }
30399
- } else if (type === 'amount') {
30400
- const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
30401
- const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
30402
- const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
30403
- cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
30404
- if (showNegativeStatus) {
30405
- if (cellValue < 0) {
30406
- isNegative = true;
30407
- }
30408
- }
30409
- cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(cellValue, {
30410
- digits
30411
- });
30412
- if (!autoFill) {
30413
- const [iStr, dStr] = cellValue.split('.');
30414
- if (dStr) {
30415
- const dRest = dStr.replace(/0+$/, '');
30416
- cellValue = dRest ? [iStr, '.', dRest].join('') : iStr;
30417
- }
30418
- }
30419
- if (showCurrency) {
30420
- cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
30421
- }
30422
- } else {
30423
- if (showNegativeStatus) {
30424
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue) < 0) {
30425
- isNegative = true;
30426
- }
30427
- }
30428
- }
30429
- }
30430
- return getCellLabelVNs(h, renderOpts, params, cellValue, isNegative ? {
30431
- class: 'is--negative'
30432
- } : {});
30433
- },
30873
+ const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
30874
+ return cellValue;
30875
+ }
30876
+ },
30877
+ VxeNumberInput: {
30878
+ tableAutoFocus: 'input',
30879
+ renderTableEdit: defaultEditRender,
30880
+ renderTableCell: handleNumberCell,
30434
30881
  renderTableFooter(h, renderOpts, params) {
30435
30882
  const {
30436
30883
  props = {}
@@ -30567,11 +31014,22 @@ render_renderer.mixin({
30567
31014
  tableFilterDefaultMethod: handleFilterMethod,
30568
31015
  tableExportMethod: handleExportSelectMethod
30569
31016
  },
31017
+ /**
31018
+ * 已废弃,被 FormatSelect 替换
31019
+ * @deprecated
31020
+ */
30570
31021
  formatOption: {
30571
31022
  renderTableDefault(h, renderOpts, params) {
30572
31023
  return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params));
30573
31024
  }
30574
31025
  },
31026
+ FormatSelect: {
31027
+ renderTableDefault(h, renderOpts, params) {
31028
+ return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params));
31029
+ },
31030
+ tableFilterDefaultMethod: handleFilterMethod,
31031
+ tableExportMethod: handleExportSelectMethod
31032
+ },
30575
31033
  VxeTreeSelect: {
30576
31034
  tableAutoFocus: 'input',
30577
31035
  renderTableEdit: defaultTableOrTreeSelectEditRender,
@@ -30588,11 +31046,21 @@ render_renderer.mixin({
30588
31046
  },
30589
31047
  tableExportMethod: handleExportTreeSelectMethod
30590
31048
  },
31049
+ /**
31050
+ * 已废弃,被 FormatTreeSelect 替换
31051
+ * @deprecated
31052
+ */
30591
31053
  formatTree: {
30592
31054
  renderTableDefault(h, renderOpts, params) {
30593
31055
  return getCellLabelVNs(h, renderOpts, params, getTreeSelectCellValue(renderOpts, params));
30594
31056
  }
30595
31057
  },
31058
+ FormatTreeSelect: {
31059
+ renderTableDefault(h, renderOpts, params) {
31060
+ return getCellLabelVNs(h, renderOpts, params, getTreeSelectCellValue(renderOpts, params));
31061
+ },
31062
+ tableExportMethod: handleExportTreeSelectMethod
31063
+ },
30596
31064
  VxeColorPicker: {
30597
31065
  tableAutoFocus: 'input',
30598
31066
  renderTableEdit(h, renderOpts, params) {
@@ -30935,7 +31403,8 @@ const Toolbar = VxeToolbar;
30935
31403
  treeNotImp: '树表格不支持导入',
30936
31404
  treeCrossDrag: '只能拖拽第一层级',
30937
31405
  treeDragChild: '父级不能拖拽到自己的子级中',
30938
- reqPlugin: '扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/install'
31406
+ reqPlugin: '扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/install',
31407
+ errMaxRow: '超过支持的最大数据量 {0} 行,这可能会导致出现错误'
30939
31408
  },
30940
31409
  table: {
30941
31410
  emptyText: '暂无数据',
@@ -31121,6 +31590,9 @@ const Toolbar = VxeToolbar;
31121
31590
  fixedRight: '冻结在右侧',
31122
31591
  cancelFixed: '取消冻结列'
31123
31592
  },
31593
+ datePicker: {
31594
+ yearTitle: '{0} 年'
31595
+ },
31124
31596
  input: {
31125
31597
  date: {
31126
31598
  m1: '01 月',
@@ -31451,6 +31923,7 @@ const Toolbar = VxeToolbar;
31451
31923
  },
31452
31924
  filterCombination: {
31453
31925
  menus: {
31926
+ sort: '排序',
31454
31927
  clearSort: '清除排序',
31455
31928
  sortAsc: '升序',
31456
31929
  sortDesc: '降序',
@@ -31555,6 +32028,7 @@ const Toolbar = VxeToolbar;
31555
32028
  },
31556
32029
  combination: {
31557
32030
  menus: {
32031
+ sort: '排序',
31558
32032
  clearSort: '清除排序',
31559
32033
  sortAsc: '升序',
31560
32034
  sortDesc: '降序',
@@ -31613,8 +32087,8 @@ core_.VxeUI.setTheme('light');
31613
32087
 
31614
32088
  if (typeof window !== 'undefined' && window.Vue) {
31615
32089
  if (window.VXETable) {
31616
- if (!window.VxeUITable) {
31617
- window.VxeUITable = components_namespaceObject;
32090
+ if (!window.VXETable) {
32091
+ window.VXETable = components_namespaceObject;
31618
32092
  }
31619
32093
  }
31620
32094
  window.Vue.use(components_namespaceObject);