vxe-table 3.12.1-beta.1 → 3.12.1-beta.3

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 (33) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/edit/mixin.js +5 -5
  3. package/es/table/src/body.js +4 -3
  4. package/es/table/src/methods.js +25 -8
  5. package/es/table/src/table.js +1 -0
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/lib/index.umd.js +47 -17
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/style.css +1 -1
  11. package/lib/table/module/edit/mixin.js +10 -5
  12. package/lib/table/module/edit/mixin.min.js +1 -1
  13. package/lib/table/src/body.js +4 -2
  14. package/lib/table/src/body.min.js +1 -1
  15. package/lib/table/src/methods.js +30 -8
  16. package/lib/table/src/methods.min.js +1 -1
  17. package/lib/table/src/table.js +1 -0
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/ui/index.js +1 -1
  20. package/lib/ui/index.min.js +1 -1
  21. package/lib/ui/src/log.js +1 -1
  22. package/lib/ui/src/log.min.js +1 -1
  23. package/package.json +2 -2
  24. package/packages/table/module/edit/mixin.ts +5 -5
  25. package/packages/table/src/body.ts +4 -2
  26. package/packages/table/src/methods.ts +31 -12
  27. package/packages/table/src/table.ts +2 -0
  28. /package/es/{iconfont.1735808839640.ttf → iconfont.1735888162273.ttf} +0 -0
  29. /package/es/{iconfont.1735808839640.woff → iconfont.1735888162273.woff} +0 -0
  30. /package/es/{iconfont.1735808839640.woff2 → iconfont.1735888162273.woff2} +0 -0
  31. /package/lib/{iconfont.1735808839640.ttf → iconfont.1735888162273.ttf} +0 -0
  32. /package/lib/{iconfont.1735808839640.woff → iconfont.1735888162273.woff} +0 -0
  33. /package/lib/{iconfont.1735808839640.woff2 → iconfont.1735888162273.woff2} +0 -0
@@ -270,6 +270,20 @@ function calcTableHeight(_vm, key) {
270
270
  }
271
271
  return num;
272
272
  }
273
+ // const updateCellOffset = ($xeTable: VxeTableConstructor) => {
274
+ // const internalData = $xeTable as unknown as TableInternalData
275
+ // const { chTimeout, chRunTime } = internalData
276
+ // if (chTimeout) {
277
+ // clearTimeout(chTimeout)
278
+ // }
279
+ // if (!chRunTime || chRunTime + 10 < Date.now()) {
280
+ // internalData.chRunTime = Date.now()
281
+ // }
282
+ // internalData.chTimeout = setTimeout(() => {
283
+ // internalData.chRunTime = undefined
284
+ // internalData.chTimeout = undefined
285
+ // }, 80)
286
+ // }
273
287
  const calcCellHeight = ($xeTable) => {
274
288
  const props = $xeTable;
275
289
  const reactData = $xeTable;
@@ -309,6 +323,7 @@ const calcCellHeight = ($xeTable) => {
309
323
  }
310
324
  });
311
325
  }
326
+ // updateCellOffset($xeTable)
312
327
  };
313
328
  function getOrderField(_vm, column) {
314
329
  const { sortBy, sortType } = column;
@@ -983,7 +998,7 @@ const Methods = {
983
998
  }
984
999
  let cacheItem = fullAllDataRowIdData[rowid];
985
1000
  if (!cacheItem) {
986
- cacheItem = { row, rowid, seq, index: -1, _index: -1, $index: -1, items, parent: parentRow, level, height: 0 };
1001
+ cacheItem = { row, rowid, seq, index: -1, _index: -1, $index: -1, items, parent: parentRow, level, height: 0, oTop: 0 };
987
1002
  }
988
1003
  cacheItem.row = row;
989
1004
  cacheItem.items = items;
@@ -1057,7 +1072,7 @@ const Methods = {
1057
1072
  XEUtils.eachTree(rows, (childRow, index, items, path, parentItem, nodes) => {
1058
1073
  const rowid = getRowid($xeTable, childRow);
1059
1074
  const parentRow = parentItem || parentRest.row;
1060
- const rest = { row: childRow, rowid, seq: -1, index, _index: -1, $index: -1, items, parent: parentRow, level: parentLevel + nodes.length, height: 0 };
1075
+ const rest = { row: childRow, rowid, seq: -1, index, _index: -1, $index: -1, items, parent: parentRow, level: parentLevel + nodes.length, height: 0, oTop: 0 };
1061
1076
  fullDataRowIdData[rowid] = rest;
1062
1077
  fullAllDataRowIdData[rowid] = rest;
1063
1078
  }, { children: childrenField });
@@ -1921,7 +1936,7 @@ const Methods = {
1921
1936
  rowRest._index = index;
1922
1937
  }
1923
1938
  else {
1924
- const rest = { row, rowid, seq: '-1', index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0 };
1939
+ const rest = { row, rowid, seq: '-1', index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0, oTop: 0 };
1925
1940
  fullAllDataRowIdData[rowid] = rest;
1926
1941
  fullDataRowIdData[rowid] = rest;
1927
1942
  }
@@ -1952,7 +1967,7 @@ const Methods = {
1952
1967
  rowRest._index = index;
1953
1968
  }
1954
1969
  else {
1955
- const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0 };
1970
+ const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0, oTop: 0 };
1956
1971
  fullAllDataRowIdData[rowid] = rest;
1957
1972
  fullDataRowIdData[rowid] = rest;
1958
1973
  }
@@ -1970,7 +1985,7 @@ const Methods = {
1970
1985
  rowRest._index = index;
1971
1986
  }
1972
1987
  else {
1973
- const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0 };
1988
+ const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0, oTop: 0 };
1974
1989
  fullAllDataRowIdData[rowid] = rest;
1975
1990
  fullDataRowIdData[rowid] = rest;
1976
1991
  }
@@ -6796,7 +6811,7 @@ const Methods = {
6796
6811
  $xeTable.loadScrollXData();
6797
6812
  }
6798
6813
  internalData.lxTimeout = setTimeout(() => {
6799
- internalData.lxRunTime = undefined;
6814
+ internalData.lxTimeout = undefined;
6800
6815
  internalData.lxRunTime = undefined;
6801
6816
  $xeTable.loadScrollXData();
6802
6817
  }, fpsTime);
@@ -7015,8 +7030,9 @@ const Methods = {
7015
7030
  const $xeTable = this;
7016
7031
  const props = $xeTable;
7017
7032
  const { showOverflow } = props;
7033
+ $xeTable.handleTableColumn();
7034
+ calcCellHeight($xeTable);
7018
7035
  return $xeTable.$nextTick().then(() => {
7019
- $xeTable.handleTableColumn();
7020
7036
  calcCellHeight($xeTable);
7021
7037
  $xeTable.updateScrollXSpace();
7022
7038
  if (!showOverflow) {
@@ -7067,8 +7083,9 @@ const Methods = {
7067
7083
  },
7068
7084
  updateScrollYData() {
7069
7085
  const $xeTable = this;
7086
+ $xeTable.handleTableData();
7087
+ calcCellHeight($xeTable);
7070
7088
  return $xeTable.$nextTick().then(() => {
7071
- $xeTable.handleTableData();
7072
7089
  calcCellHeight($xeTable);
7073
7090
  $xeTable.updateScrollYSpace();
7074
7091
  });
@@ -415,6 +415,7 @@ export default {
415
415
  isFooter: false
416
416
  },
417
417
  scrollVMLoading: false,
418
+ isCalcCellHeight: 0,
418
419
  isCustomStatus: false,
419
420
  isDragRowMove: false,
420
421
  dragRow: null,
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.12.1-beta.1";
3
+ export const version = "3.12.1-beta.3";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.12.1-beta.1"}`;
3
+ const version = `table v${"3.12.1-beta.3"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.12.1-beta.1";
2223
+ const version = "3.12.1-beta.2";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2814,7 +2814,7 @@ function isNodeElement(elem) {
2814
2814
  const {
2815
2815
  log: log_log
2816
2816
  } = core_.VxeUI;
2817
- const log_version = `table v${"3.12.1-beta.1"}`;
2817
+ const log_version = `table v${"3.12.1-beta.2"}`;
2818
2818
  const warnLog = log_log.create('warn', log_version);
2819
2819
  const errLog = log_log.create('error', log_version);
2820
2820
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5282,6 +5282,20 @@ function calcTableHeight(_vm, key) {
5282
5282
  }
5283
5283
  return num;
5284
5284
  }
5285
+ // const updateCellOffset = ($xeTable: VxeTableConstructor) => {
5286
+ // const internalData = $xeTable as unknown as TableInternalData
5287
+ // const { chTimeout, chRunTime } = internalData
5288
+ // if (chTimeout) {
5289
+ // clearTimeout(chTimeout)
5290
+ // }
5291
+ // if (!chRunTime || chRunTime + 10 < Date.now()) {
5292
+ // internalData.chRunTime = Date.now()
5293
+ // }
5294
+ // internalData.chTimeout = setTimeout(() => {
5295
+ // internalData.chRunTime = undefined
5296
+ // internalData.chTimeout = undefined
5297
+ // }, 80)
5298
+ // }
5285
5299
  const calcCellHeight = $xeTable => {
5286
5300
  const props = $xeTable;
5287
5301
  const reactData = $xeTable;
@@ -5328,6 +5342,7 @@ const calcCellHeight = $xeTable => {
5328
5342
  }
5329
5343
  });
5330
5344
  }
5345
+ // updateCellOffset($xeTable)
5331
5346
  };
5332
5347
  function getOrderField(_vm, column) {
5333
5348
  const {
@@ -6082,7 +6097,8 @@ const Methods = {
6082
6097
  items,
6083
6098
  parent: parentRow,
6084
6099
  level,
6085
- height: 0
6100
+ height: 0,
6101
+ oTop: 0
6086
6102
  };
6087
6103
  }
6088
6104
  cacheItem.row = row;
@@ -6185,7 +6201,8 @@ const Methods = {
6185
6201
  items,
6186
6202
  parent: parentRow,
6187
6203
  level: parentLevel + nodes.length,
6188
- height: 0
6204
+ height: 0,
6205
+ oTop: 0
6189
6206
  };
6190
6207
  fullDataRowIdData[rowid] = rest;
6191
6208
  fullAllDataRowIdData[rowid] = rest;
@@ -7244,7 +7261,8 @@ const Methods = {
7244
7261
  items: [],
7245
7262
  parent: null,
7246
7263
  level: 0,
7247
- height: 0
7264
+ height: 0,
7265
+ oTop: 0
7248
7266
  };
7249
7267
  fullAllDataRowIdData[rowid] = rest;
7250
7268
  fullDataRowIdData[rowid] = rest;
@@ -7292,7 +7310,8 @@ const Methods = {
7292
7310
  items: [],
7293
7311
  parent: null,
7294
7312
  level: 0,
7295
- height: 0
7313
+ height: 0,
7314
+ oTop: 0
7296
7315
  };
7297
7316
  fullAllDataRowIdData[rowid] = rest;
7298
7317
  fullDataRowIdData[rowid] = rest;
@@ -7321,7 +7340,8 @@ const Methods = {
7321
7340
  items: [],
7322
7341
  parent: null,
7323
7342
  level: 0,
7324
- height: 0
7343
+ height: 0,
7344
+ oTop: 0
7325
7345
  };
7326
7346
  fullAllDataRowIdData[rowid] = rest;
7327
7347
  fullDataRowIdData[rowid] = rest;
@@ -13022,7 +13042,7 @@ const Methods = {
13022
13042
  $xeTable.loadScrollXData();
13023
13043
  }
13024
13044
  internalData.lxTimeout = setTimeout(() => {
13025
- internalData.lxRunTime = undefined;
13045
+ internalData.lxTimeout = undefined;
13026
13046
  internalData.lxRunTime = undefined;
13027
13047
  $xeTable.loadScrollXData();
13028
13048
  }, fpsTime);
@@ -13292,8 +13312,9 @@ const Methods = {
13292
13312
  const {
13293
13313
  showOverflow
13294
13314
  } = props;
13315
+ $xeTable.handleTableColumn();
13316
+ calcCellHeight($xeTable);
13295
13317
  return $xeTable.$nextTick().then(() => {
13296
- $xeTable.handleTableColumn();
13297
13318
  calcCellHeight($xeTable);
13298
13319
  $xeTable.updateScrollXSpace();
13299
13320
  if (!showOverflow) {
@@ -13357,8 +13378,9 @@ const Methods = {
13357
13378
  },
13358
13379
  updateScrollYData() {
13359
13380
  const $xeTable = this;
13381
+ $xeTable.handleTableData();
13382
+ calcCellHeight($xeTable);
13360
13383
  return $xeTable.$nextTick().then(() => {
13361
- $xeTable.handleTableData();
13362
13384
  calcCellHeight($xeTable);
13363
13385
  $xeTable.updateScrollYSpace();
13364
13386
  });
@@ -13922,6 +13944,7 @@ function renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, ro
13922
13944
  sYOpts,
13923
13945
  scrollXLoad,
13924
13946
  scrollYLoad,
13947
+ isCalcCellHeight,
13925
13948
  highlightCurrentRow,
13926
13949
  showOverflow: allColumnOverflow,
13927
13950
  isAllOverflow,
@@ -14185,14 +14208,15 @@ function renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, ro
14185
14208
  }
14186
14209
  }
14187
14210
  let cellHeight = '';
14211
+ const vnHeight = isCalcCellHeight ? rest.height : 0;
14188
14212
  if (hasEllipsis) {
14189
14213
  if (scrollYRHeight || rowHeight) {
14190
14214
  cellHeight = `${scrollYRHeight || rowHeight}px`;
14191
14215
  } else if (!isAllOverflow) {
14192
- cellHeight = `${rest.height || 18}px`;
14216
+ cellHeight = `${vnHeight || rowHeight || 18}px`;
14193
14217
  }
14194
14218
  } else {
14195
- cellHeight = `${rest.height || 18}px`;
14219
+ cellHeight = `${vnHeight || rowHeight || 18}px`;
14196
14220
  }
14197
14221
  if (mouseConfig && mouseOpts.area && selectCellToRow) {
14198
14222
  if (!$columnIndex && selectCellToRow === true || selectCellToRow === column.field) {
@@ -19163,7 +19187,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
19163
19187
  items: parentChilds,
19164
19188
  parent: parentRow,
19165
19189
  level: parentLevel + 1,
19166
- height: 0
19190
+ height: 0,
19191
+ oTop: 0
19167
19192
  };
19168
19193
  fullDataRowIdData[rowid] = rest;
19169
19194
  fullAllDataRowIdData[rowid] = rest;
@@ -19185,7 +19210,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
19185
19210
  items: tableFullTreeData,
19186
19211
  parent: null,
19187
19212
  level: 0,
19188
- height: 0
19213
+ height: 0,
19214
+ oTop: 0
19189
19215
  };
19190
19216
  fullDataRowIdData[rowid] = rest;
19191
19217
  fullAllDataRowIdData[rowid] = rest;
@@ -19241,7 +19267,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
19241
19267
  items: afterFullData,
19242
19268
  parent: null,
19243
19269
  level: 0,
19244
- height: 0
19270
+ height: 0,
19271
+ oTop: 0
19245
19272
  };
19246
19273
  fullDataRowIdData[rowid] = rest;
19247
19274
  fullAllDataRowIdData[rowid] = rest;
@@ -19276,7 +19303,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
19276
19303
  items: afterFullData,
19277
19304
  parent: null,
19278
19305
  level: 0,
19279
- height: 0
19306
+ height: 0,
19307
+ oTop: 0
19280
19308
  };
19281
19309
  fullDataRowIdData[rowid] = rest;
19282
19310
  fullAllDataRowIdData[rowid] = rest;
@@ -19334,7 +19362,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
19334
19362
  items: parentMapChilds,
19335
19363
  parent: parentRow,
19336
19364
  level: parentLevel + 1,
19337
- height: 0
19365
+ height: 0,
19366
+ oTop: 0
19338
19367
  };
19339
19368
  fullDataRowIdData[rowid] = rest;
19340
19369
  fullAllDataRowIdData[rowid] = rest;
@@ -23864,6 +23893,7 @@ function handleUupdateResize(_vm) {
23864
23893
  isFooter: false
23865
23894
  },
23866
23895
  scrollVMLoading: false,
23896
+ isCalcCellHeight: 0,
23867
23897
  isCustomStatus: false,
23868
23898
  isDragRowMove: false,
23869
23899
  dragRow: null,