vxe-table 3.16.11 → 3.16.13

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 (68) hide show
  1. package/es/locale/lang/de-DE.js +80 -80
  2. package/es/locale/lang/es-ES.js +79 -79
  3. package/es/locale/lang/ja-JP.js +82 -82
  4. package/es/locale/lang/ko-KR.js +88 -88
  5. package/es/locale/lang/ru-RU.js +84 -84
  6. package/es/locale/lang/vi-VN.js +79 -79
  7. package/es/locale/lang/zh-CHT.js +21 -21
  8. package/es/style.css +1 -1
  9. package/es/table/src/methods.js +28 -3
  10. package/es/table/src/table.js +9 -120
  11. package/es/table/src/util.js +116 -0
  12. package/es/toolbar/src/toolbar.js +11 -3
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/lib/index.umd.js +169 -126
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/locale/lang/de-DE.js +80 -80
  18. package/lib/locale/lang/de-DE.min.js +1 -1
  19. package/lib/locale/lang/de-DE.umd.js +80 -80
  20. package/lib/locale/lang/es-ES.js +79 -79
  21. package/lib/locale/lang/es-ES.min.js +1 -1
  22. package/lib/locale/lang/es-ES.umd.js +79 -79
  23. package/lib/locale/lang/ja-JP.js +82 -82
  24. package/lib/locale/lang/ja-JP.min.js +1 -1
  25. package/lib/locale/lang/ja-JP.umd.js +82 -82
  26. package/lib/locale/lang/ko-KR.js +88 -88
  27. package/lib/locale/lang/ko-KR.min.js +1 -1
  28. package/lib/locale/lang/ko-KR.umd.js +88 -88
  29. package/lib/locale/lang/ru-RU.js +84 -84
  30. package/lib/locale/lang/ru-RU.min.js +1 -1
  31. package/lib/locale/lang/ru-RU.umd.js +84 -84
  32. package/lib/locale/lang/vi-VN.js +79 -79
  33. package/lib/locale/lang/vi-VN.min.js +1 -1
  34. package/lib/locale/lang/vi-VN.umd.js +79 -79
  35. package/lib/locale/lang/zh-CHT.js +21 -21
  36. package/lib/locale/lang/zh-CHT.min.js +1 -1
  37. package/lib/locale/lang/zh-CHT.umd.js +21 -21
  38. package/lib/style.css +1 -1
  39. package/lib/table/src/methods.js +32 -2
  40. package/lib/table/src/methods.min.js +1 -1
  41. package/lib/table/src/table.js +8 -119
  42. package/lib/table/src/table.min.js +1 -1
  43. package/lib/table/src/util.js +117 -0
  44. package/lib/table/src/util.min.js +1 -1
  45. package/lib/toolbar/src/toolbar.js +11 -3
  46. package/lib/toolbar/src/toolbar.min.js +1 -1
  47. package/lib/ui/index.js +1 -1
  48. package/lib/ui/index.min.js +1 -1
  49. package/lib/ui/src/log.js +1 -1
  50. package/lib/ui/src/log.min.js +1 -1
  51. package/package.json +1 -1
  52. package/packages/locale/lang/de-DE.ts +80 -80
  53. package/packages/locale/lang/es-ES.ts +79 -79
  54. package/packages/locale/lang/ja-JP.ts +82 -82
  55. package/packages/locale/lang/ko-KR.ts +88 -88
  56. package/packages/locale/lang/ru-RU.ts +84 -84
  57. package/packages/locale/lang/vi-VN.ts +79 -79
  58. package/packages/locale/lang/zh-CHT.ts +21 -21
  59. package/packages/table/src/methods.ts +28 -3
  60. package/packages/table/src/table.ts +10 -124
  61. package/packages/table/src/util.ts +120 -0
  62. package/packages/toolbar/src/toolbar.ts +13 -3
  63. /package/es/{iconfont.1754364584926.ttf → iconfont.1754456334514.ttf} +0 -0
  64. /package/es/{iconfont.1754364584926.woff → iconfont.1754456334514.woff} +0 -0
  65. /package/es/{iconfont.1754364584926.woff2 → iconfont.1754456334514.woff2} +0 -0
  66. /package/lib/{iconfont.1754364584926.ttf → iconfont.1754456334514.ttf} +0 -0
  67. /package/lib/{iconfont.1754364584926.woff → iconfont.1754456334514.woff} +0 -0
  68. /package/lib/{iconfont.1754364584926.woff2 → iconfont.1754456334514.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3234,7 +3234,7 @@ function getClass(property, params) {
3234
3234
  ;// ./packages/ui/index.ts
3235
3235
 
3236
3236
 
3237
- const version = "3.16.11";
3237
+ const version = "3.16.13";
3238
3238
  core_.VxeUI.version = version;
3239
3239
  core_.VxeUI.tableVersion = version;
3240
3240
  core_.VxeUI.setConfig({
@@ -3908,7 +3908,7 @@ var es_iterator_map = __webpack_require__(1701);
3908
3908
  const {
3909
3909
  log: log_log
3910
3910
  } = core_.VxeUI;
3911
- const log_version = `table v${"3.16.11"}`;
3911
+ const log_version = `table v${"3.16.13"}`;
3912
3912
  const warnLog = log_log.create('warn', log_version);
3913
3913
  const errLog = log_log.create('error', log_version);
3914
3914
  ;// ./packages/table/src/columnInfo.ts
@@ -4117,6 +4117,122 @@ class ColumnInfo {
4117
4117
 
4118
4118
 
4119
4119
 
4120
+ function createInternalData() {
4121
+ return {
4122
+ tZindex: 0,
4123
+ currKeyField: '',
4124
+ isCurrDeepKey: false,
4125
+ elemStore: {},
4126
+ // 存放横向 X 虚拟滚动相关的信息
4127
+ scrollXStore: {
4128
+ preloadSize: 0,
4129
+ offsetSize: 0,
4130
+ visibleSize: 0,
4131
+ visibleStartIndex: 0,
4132
+ visibleEndIndex: 0,
4133
+ startIndex: 0,
4134
+ endIndex: 0
4135
+ },
4136
+ // 存放纵向 Y 虚拟滚动相关信息
4137
+ scrollYStore: {
4138
+ preloadSize: 0,
4139
+ offsetSize: 0,
4140
+ visibleSize: 0,
4141
+ visibleStartIndex: 0,
4142
+ visibleEndIndex: 0,
4143
+ startIndex: 0,
4144
+ endIndex: 0
4145
+ },
4146
+ // 表格宽度
4147
+ tableWidth: 0,
4148
+ // 表格高度
4149
+ tableHeight: 0,
4150
+ // 表头高度
4151
+ headerHeight: 0,
4152
+ // 表尾高度
4153
+ footerHeight: 0,
4154
+ customHeight: 0,
4155
+ customMinHeight: 0,
4156
+ customMaxHeight: 0,
4157
+ // 当前 hover 行
4158
+ hoverRow: null,
4159
+ // 最后滚动位置
4160
+ lastScrollLeft: 0,
4161
+ lastScrollTop: 0,
4162
+ // 单选框属性,已选中保留的行
4163
+ radioReserveRow: null,
4164
+ // 复选框属性,已选中保留的行集合
4165
+ checkboxReserveRowMap: {},
4166
+ // 行数据,已展开保留的行集合
4167
+ rowExpandedReserveRowMap: {},
4168
+ // 树结构数据,已展开保留的行集合
4169
+ treeExpandedReserveRowMap: {},
4170
+ // 树结构数据,不确定状态的集合
4171
+ treeIndeterminateRowMaps: {},
4172
+ // 列表完整数据、条件处理后
4173
+ tableFullData: [],
4174
+ afterFullData: [],
4175
+ afterTreeFullData: [],
4176
+ afterGroupFullData: [],
4177
+ // 列表条件处理后数据集合
4178
+ afterFullRowMaps: {},
4179
+ // 树结构完整数据、条件处理后
4180
+ tableFullTreeData: [],
4181
+ // 行分组全量数据、条件处理后
4182
+ tableFullGroupData: [],
4183
+ tableSynchData: [],
4184
+ tableSourceData: [],
4185
+ // 收集的列配置(带分组)
4186
+ collectColumn: [],
4187
+ // 完整所有列(不带分组)
4188
+ tableFullColumn: [],
4189
+ // 渲染所有列
4190
+ visibleColumn: [],
4191
+ // 全量数据集(包括当前和已删除)
4192
+ fullAllDataRowIdData: {},
4193
+ // 数据集(仅当前)
4194
+ fullDataRowIdData: {},
4195
+ // 数据集(仅可视)
4196
+ visibleDataRowIdData: {},
4197
+ // 渲染中缓存数据
4198
+ sourceDataRowIdData: {},
4199
+ fullColumnIdData: {},
4200
+ fullColumnFieldData: {},
4201
+ // 合并单元格的数据
4202
+ mergeBodyList: [],
4203
+ mergeBodyMaps: {},
4204
+ // 合并表尾的数据
4205
+ mergeFooterList: [],
4206
+ mergeFooterMaps: {},
4207
+ // 已合并单元格数据集合
4208
+ mergeBodyCellMaps: {},
4209
+ // 已合并表尾数据集合
4210
+ mergeFooterCellMaps: {},
4211
+ // 已展开的行集合
4212
+ rowExpandedMaps: {},
4213
+ // 懒加载中的展开行的集合
4214
+ rowExpandLazyLoadedMaps: {},
4215
+ // 已展开的分组行
4216
+ rowGroupExpandedMaps: {},
4217
+ // 已展开树节点集合
4218
+ treeExpandedMaps: {},
4219
+ // 懒加载中的树节点的集合
4220
+ treeExpandLazyLoadedMaps: {},
4221
+ // 复选框属性,已选中的行集合
4222
+ selectCheckboxMaps: {},
4223
+ // 已标记的对象集
4224
+ pendingRowMaps: {},
4225
+ // 已新增的临时行
4226
+ insertRowMaps: {},
4227
+ // 已删除行
4228
+ removeRowMaps: {},
4229
+ cvCacheMaps: {},
4230
+ inited: false,
4231
+ tooltipTimeout: null,
4232
+ initStatus: false,
4233
+ isActivated: false
4234
+ };
4235
+ }
4120
4236
  const getAllConvertColumns = (columns, parentColumn) => {
4121
4237
  const result = [];
4122
4238
  columns.forEach(column => {
@@ -11073,6 +11189,7 @@ const Methods = {
11073
11189
  isRowGroupStatus
11074
11190
  } = reactData;
11075
11191
  const {
11192
+ currKeyField,
11076
11193
  fullAllDataRowIdData,
11077
11194
  tableFullData,
11078
11195
  tableFullTreeData,
@@ -11083,11 +11200,15 @@ const Methods = {
11083
11200
  ...fullAllDataRowIdData
11084
11201
  }; // 存在已删除数据
11085
11202
  const fullDataRowIdMaps = {};
11203
+ const idMaps = {};
11086
11204
  const {
11087
11205
  handleUpdateRowId
11088
11206
  } = createHandleUpdateRowId($xeTable);
11089
11207
  const handleRowCache = (row, index, items, currIndex, parentRow, rowid, level, seq) => {
11090
11208
  let rowRest = fullAllDataRowIdMaps[rowid];
11209
+ if (idMaps[rowid]) {
11210
+ errLog('vxe.error.repeatKey', [currKeyField, rowid]);
11211
+ }
11091
11212
  if (!rowRest) {
11092
11213
  rowRest = {
11093
11214
  row,
@@ -11114,6 +11235,7 @@ const Methods = {
11114
11235
  rowRest.level = level;
11115
11236
  rowRest.index = currIndex;
11116
11237
  rowRest.treeIndex = index;
11238
+ idMaps[rowid] = true;
11117
11239
  fullDataRowIdMaps[rowid] = rowRest;
11118
11240
  fullAllDataRowIdMaps[rowid] = rowRest;
11119
11241
  };
@@ -15116,8 +15238,32 @@ const Methods = {
15116
15238
  /**
15117
15239
  * 用于当前行,获取当前行的数据
15118
15240
  */
15119
- getCurrentRecord() {
15120
- return this.rowOpts.isCurrent || this.highlightCurrentRow ? this.currentRow : null;
15241
+ getCurrentRecord(isFull) {
15242
+ const $xeTable = this;
15243
+ const props = $xeTable;
15244
+ const reactData = $xeTable;
15245
+ const internalData = $xeTable;
15246
+ const {
15247
+ currentRow
15248
+ } = reactData;
15249
+ const {
15250
+ fullDataRowIdData,
15251
+ afterFullRowMaps
15252
+ } = internalData;
15253
+ const rowOpts = $xeTable.computeRowOpts;
15254
+ if (rowOpts.isCurrent || props.highlightCurrentRow) {
15255
+ const rowid = getRowid($xeTable, currentRow);
15256
+ if (isFull) {
15257
+ if (fullDataRowIdData[rowid]) {
15258
+ return currentRow;
15259
+ }
15260
+ } else {
15261
+ if (afterFullRowMaps[rowid]) {
15262
+ return currentRow;
15263
+ }
15264
+ }
15265
+ }
15266
+ return null;
15121
15267
  },
15122
15268
  /**
15123
15269
  * 用于单选行,获取当已选中的数据
@@ -30543,7 +30689,7 @@ function renderBody(h, $xeTable) {
30543
30689
  if (value && value.length >= 50000) {
30544
30690
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
30545
30691
  }
30546
- this.loadTableData(value || [], false).then(() => {
30692
+ this.loadTableData(value || [], true).then(() => {
30547
30693
  const {
30548
30694
  scrollXLoad,
30549
30695
  scrollYLoad,
@@ -30671,116 +30817,7 @@ function renderBody(h, $xeTable) {
30671
30817
  const $xeTable = this;
30672
30818
  const props = $xeTable;
30673
30819
  const internalData = $xeTable;
30674
- Object.assign($xeTable, {
30675
- tZindex: 0,
30676
- currKeyField: '',
30677
- isCurrDeepKey: false,
30678
- elemStore: {},
30679
- // 存放横向 X 虚拟滚动相关的信息
30680
- scrollXStore: {
30681
- preloadSize: 0,
30682
- offsetSize: 0,
30683
- visibleSize: 0,
30684
- visibleStartIndex: 0,
30685
- visibleEndIndex: 0,
30686
- startIndex: 0,
30687
- endIndex: 0
30688
- },
30689
- // 存放纵向 Y 虚拟滚动相关信息
30690
- scrollYStore: {
30691
- preloadSize: 0,
30692
- offsetSize: 0,
30693
- visibleSize: 0,
30694
- visibleStartIndex: 0,
30695
- visibleEndIndex: 0,
30696
- startIndex: 0,
30697
- endIndex: 0
30698
- },
30699
- // 表格宽度
30700
- tableWidth: 0,
30701
- // 表格高度
30702
- tableHeight: 0,
30703
- // 表头高度
30704
- headerHeight: 0,
30705
- // 表尾高度
30706
- footerHeight: 0,
30707
- // 当前 hover 行
30708
- // hoverRow: null,
30709
- // 最后滚动位置
30710
- lastScrollLeft: 0,
30711
- lastScrollTop: 0,
30712
- // 单选框属性,已选中保留的行
30713
- radioReserveRow: null,
30714
- // 复选框属性,已选中保留的行集合
30715
- checkboxReserveRowMap: {},
30716
- // 行数据,已展开保留的行集合
30717
- rowExpandedReserveRowMap: {},
30718
- // 树结构数据,已展开保留的行集合
30719
- treeExpandedReserveRowMap: {},
30720
- // 树结构数据,不确定状态的集合
30721
- treeIndeterminateRowMaps: {},
30722
- // 列表完整数据、条件处理后
30723
- tableFullData: [],
30724
- afterFullData: [],
30725
- afterTreeFullData: [],
30726
- afterGroupFullData: [],
30727
- // 列表条件处理后数据集合
30728
- afterFullRowMaps: {},
30729
- // 树结构完整数据、条件处理后
30730
- tableFullTreeData: [],
30731
- // 行分组全量数据、条件处理后
30732
- tableFullGroupData: [],
30733
- tableSynchData: [],
30734
- tableSourceData: [],
30735
- // 收集的列配置(带分组)
30736
- collectColumn: [],
30737
- // 完整所有列(不带分组)
30738
- tableFullColumn: [],
30739
- // 渲染所有列
30740
- visibleColumn: [],
30741
- // 全量数据集(包括当前和已删除)
30742
- fullAllDataRowIdData: {},
30743
- // 数据集(仅当前)
30744
- fullDataRowIdData: {},
30745
- // 数据集(仅可视)
30746
- visibleDataRowIdData: {},
30747
- // 渲染中缓存数据
30748
- sourceDataRowIdData: {},
30749
- fullColumnIdData: {},
30750
- fullColumnFieldData: {},
30751
- // 合并单元格的数据
30752
- mergeBodyList: [],
30753
- mergeBodyMaps: {},
30754
- // 合并表尾的数据
30755
- mergeFooterList: [],
30756
- mergeFooterMaps: {},
30757
- // 已合并单元格数据集合
30758
- mergeBodyCellMaps: {},
30759
- // 已合并表尾数据集合
30760
- mergeFooterCellMaps: {},
30761
- // 已展开的行集合
30762
- rowExpandedMaps: {},
30763
- // 懒加载中的展开行的集合
30764
- rowExpandLazyLoadedMaps: {},
30765
- // 已展开的分组行
30766
- rowGroupExpandedMaps: {},
30767
- // 已展开树节点集合
30768
- treeExpandedMaps: {},
30769
- // 懒加载中的树节点的集合
30770
- treeExpandLazyLoadedMaps: {},
30771
- // 复选框属性,已选中的行集合
30772
- selectCheckboxMaps: {},
30773
- // 已标记的对象集
30774
- pendingRowMaps: {},
30775
- // 已新增的临时行
30776
- insertRowMaps: {},
30777
- // 已删除行
30778
- removeRowMaps: {},
30779
- cvCacheMaps: {},
30780
- swYSize: 0,
30781
- swYInterval: 0,
30782
- swYTotal: 0
30783
- });
30820
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
30784
30821
  handleKeyField($xeTable);
30785
30822
  const {
30786
30823
  data,
@@ -31129,23 +31166,15 @@ function renderBody(h, $xeTable) {
31129
31166
  },
31130
31167
  beforeDestroy() {
31131
31168
  const $xeTable = this;
31132
- const internalData = $xeTable;
31133
31169
  const tableViewportEl = $xeTable.$refs.refTableViewportElem;
31134
31170
  if (tableViewportEl) {
31135
31171
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
31136
31172
  }
31137
- internalData.cvCacheMaps = {};
31138
- internalData.prevDragRow = null;
31139
- internalData.prevDragCol = null;
31140
31173
  if (this.$resize) {
31141
31174
  this.$resize.disconnect();
31142
31175
  }
31143
31176
  this.closeFilter();
31144
31177
  this.closeMenu();
31145
- this.preventEvent(null, 'beforeDestroy');
31146
- },
31147
- destroyed() {
31148
- const $xeTable = this;
31149
31178
  table_globalEvents.off($xeTable, 'paste');
31150
31179
  table_globalEvents.off($xeTable, 'copy');
31151
31180
  table_globalEvents.off($xeTable, 'cut');
@@ -31155,7 +31184,13 @@ function renderBody(h, $xeTable) {
31155
31184
  table_globalEvents.off($xeTable, 'keydown');
31156
31185
  table_globalEvents.off($xeTable, 'resize');
31157
31186
  table_globalEvents.off($xeTable, 'contextmenu');
31187
+ this.preventEvent(null, 'beforeDestroy');
31188
+ },
31189
+ destroyed() {
31190
+ const $xeTable = this;
31191
+ const internalData = $xeTable;
31158
31192
  this.preventEvent(null, 'destroyed');
31193
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
31159
31194
  },
31160
31195
  render(h) {
31161
31196
  // 使用已安装的组件,如果未安装则不渲染
@@ -31466,6 +31501,11 @@ const {
31466
31501
  globalMixins: toolbar_globalMixins,
31467
31502
  renderEmptyElement: toolbar_renderEmptyElement
31468
31503
  } = core_.VxeUI;
31504
+ function toolbar_createInternalData() {
31505
+ return {
31506
+ connectTable: null
31507
+ };
31508
+ }
31469
31509
  /* harmony default export */ var src_toolbar = (/* define-vxe-component start */defineVxeComponent({
31470
31510
  name: 'VxeToolbar',
31471
31511
  mixins: [toolbar_globalMixins.sizeMixin],
@@ -31513,9 +31553,7 @@ const {
31513
31553
  connectFlag: 0,
31514
31554
  columns: []
31515
31555
  };
31516
- const internalData = {
31517
- connectTable: null
31518
- };
31556
+ const internalData = toolbar_createInternalData();
31519
31557
  return {
31520
31558
  xID,
31521
31559
  reactData,
@@ -32336,6 +32374,11 @@ const {
32336
32374
  }
32337
32375
  }
32338
32376
  },
32377
+ destroyed() {
32378
+ const $xeToolbar = this;
32379
+ const internalData = $xeToolbar.internalData;
32380
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, toolbar_createInternalData());
32381
+ },
32339
32382
  render(h) {
32340
32383
  return this.renderVN(h);
32341
32384
  }