vxe-table 3.13.0-beta.2 → 3.13.0-beta.4

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 (60) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/edit/mixin.js +1 -8
  6. package/es/table/src/body.js +4 -2
  7. package/es/table/src/cell.js +3 -0
  8. package/es/table/src/footer.js +4 -2
  9. package/es/table/src/header.js +4 -2
  10. package/es/table/src/methods.js +23 -12
  11. package/es/table/src/table.js +6 -0
  12. package/es/table/style.css +1 -1
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +1 -1
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/lib/index.css +1 -1
  19. package/lib/index.min.css +1 -1
  20. package/lib/index.umd.js +44 -27
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/table/module/edit/mixin.js +1 -10
  25. package/lib/table/module/edit/mixin.min.js +1 -1
  26. package/lib/table/src/body.js +4 -1
  27. package/lib/table/src/body.min.js +1 -1
  28. package/lib/table/src/cell.js +3 -0
  29. package/lib/table/src/cell.min.js +1 -1
  30. package/lib/table/src/footer.js +4 -1
  31. package/lib/table/src/footer.min.js +1 -1
  32. package/lib/table/src/header.js +4 -1
  33. package/lib/table/src/header.min.js +1 -1
  34. package/lib/table/src/methods.js +20 -12
  35. package/lib/table/src/methods.min.js +1 -1
  36. package/lib/table/src/table.js +6 -0
  37. package/lib/table/src/table.min.js +1 -1
  38. package/lib/table/style/style.css +1 -1
  39. package/lib/table/style/style.min.css +1 -1
  40. package/lib/ui/index.js +1 -1
  41. package/lib/ui/index.min.js +1 -1
  42. package/lib/ui/src/log.js +1 -1
  43. package/lib/ui/src/log.min.js +1 -1
  44. package/lib/vxe-table/style/style.css +1 -1
  45. package/lib/vxe-table/style/style.min.css +1 -1
  46. package/package.json +1 -1
  47. package/packages/table/module/edit/mixin.ts +1 -8
  48. package/packages/table/src/body.ts +5 -2
  49. package/packages/table/src/cell.ts +4 -1
  50. package/packages/table/src/footer.ts +5 -2
  51. package/packages/table/src/header.ts +5 -2
  52. package/packages/table/src/methods.ts +29 -15
  53. package/packages/table/src/table.ts +6 -0
  54. package/styles/components/table.scss +1 -1
  55. /package/es/{iconfont.1739506361723.ttf → iconfont.1739527648616.ttf} +0 -0
  56. /package/es/{iconfont.1739506361723.woff → iconfont.1739527648616.woff} +0 -0
  57. /package/es/{iconfont.1739506361723.woff2 → iconfont.1739527648616.woff2} +0 -0
  58. /package/lib/{iconfont.1739506361723.ttf → iconfont.1739527648616.ttf} +0 -0
  59. /package/lib/{iconfont.1739506361723.woff → iconfont.1739527648616.woff} +0 -0
  60. /package/lib/{iconfont.1739506361723.woff2 → iconfont.1739527648616.woff2} +0 -0
@@ -288,7 +288,7 @@ export default {
288
288
  const { fixedType, fixedColumn, tableColumn } = props;
289
289
  const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
290
290
  const { visibleColumn, fullColumnIdData } = tableInternalData;
291
- const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
291
+ const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
292
292
  let renderColumnList = tableColumn;
293
293
  let isOptimizeMode = false;
294
294
  // 如果是使用优化模式
@@ -300,8 +300,10 @@ export default {
300
300
  isOptimizeMode = true;
301
301
  }
302
302
  }
303
- if (fixedType) {
303
+ if (fixedType || !overflowX) {
304
304
  renderColumnList = visibleColumn;
305
+ }
306
+ if (fixedType) {
305
307
  if (isOptimizeMode) {
306
308
  renderColumnList = fixedColumn || [];
307
309
  }
@@ -252,7 +252,7 @@ export default {
252
252
  const { fixedType, fixedColumn, tableColumn } = props;
253
253
  const { headerColumn } = this;
254
254
  const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps;
255
- const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
255
+ const { isGroup, overflowX, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
256
256
  const { visibleColumn, fullColumnIdData } = tableInternalData;
257
257
  const mouseOpts = $xeTable.computeMouseOpts;
258
258
  let renderHeaderList = headerColumn;
@@ -271,8 +271,10 @@ export default {
271
271
  isOptimizeMode = true;
272
272
  }
273
273
  }
274
- if (fixedType) {
274
+ if (fixedType || !overflowX) {
275
275
  renderColumnList = visibleColumn;
276
+ }
277
+ if (fixedType) {
276
278
  // 如果是使用优化模式
277
279
  if (isOptimizeMode) {
278
280
  renderColumnList = fixedColumn || [];
@@ -171,7 +171,7 @@ function cacheColumnMap($xeTable) {
171
171
  const { tableFullColumn, collectColumn } = internalData;
172
172
  const fullColumnIdData = internalData.fullColumnIdData = {};
173
173
  const fullColumnFieldData = internalData.fullColumnFieldData = {};
174
- const mouseOpts = $xeTable.computeMouseOpts;
174
+ // const mouseOpts = $xeTable.computeMouseOpts
175
175
  const columnOpts = $xeTable.computeColumnOpts;
176
176
  const columnDragOpts = $xeTable.computeColumnDragOpts;
177
177
  const { isCrossDrag, isSelfToChildDrag } = columnDragOpts;
@@ -261,11 +261,11 @@ function cacheColumnMap($xeTable) {
261
261
  else {
262
262
  tableFullColumn.forEach(handleFunc);
263
263
  }
264
- if (process.env.NODE_ENV === 'development') {
265
- if (expandColumn && mouseOpts.area) {
266
- errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
267
- }
268
- }
264
+ // if (process.env.NODE_ENV === 'development') {
265
+ // if (expandColumn && mouseOpts.area) {
266
+ // errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
267
+ // }
268
+ // }
269
269
  if (process.env.NODE_ENV === 'developmeznt') {
270
270
  if (htmlColumn) {
271
271
  if (!columnOpts.useKey) {
@@ -7274,7 +7274,10 @@ const Methods = {
7274
7274
  delete rExpandLazyLoadedMaps[rowid];
7275
7275
  }
7276
7276
  reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
7277
- $xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => resolve());
7277
+ $xeTable.$nextTick()
7278
+ .then(() => $xeTable.recalculate())
7279
+ .then(() => $xeTable.updateCellAreas())
7280
+ .then(() => resolve());
7278
7281
  });
7279
7282
  }
7280
7283
  else {
@@ -7290,6 +7293,7 @@ const Methods = {
7290
7293
  * @param {Boolean} expanded 是否展开
7291
7294
  */
7292
7295
  setRowExpand(rows, expanded) {
7296
+ const $xeTable = this;
7293
7297
  const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn: column } = this;
7294
7298
  let rExpandedMaps = Object.assign({}, rowExpandedMaps);
7295
7299
  const { reserve, lazy, accordion, toggleMethod } = expandOpts;
@@ -7334,7 +7338,9 @@ const Methods = {
7334
7338
  }
7335
7339
  }
7336
7340
  this.rowExpandedMaps = rExpandedMaps;
7337
- return Promise.all(lazyRests).then(this.recalculate);
7341
+ return Promise.all(lazyRests)
7342
+ .then(() => $xeTable.recalculate())
7343
+ .then(() => $xeTable.updateCellAreas());
7338
7344
  },
7339
7345
  /**
7340
7346
  * 判断行是否为展开状态
@@ -7356,6 +7362,7 @@ const Methods = {
7356
7362
  * 手动清空展开行状态,数据会恢复成未展开的状态
7357
7363
  */
7358
7364
  clearRowExpand() {
7365
+ const $xeTable = this;
7359
7366
  const { expandOpts, tableFullData } = this;
7360
7367
  const { reserve } = expandOpts;
7361
7368
  const expList = this.getRowExpandRecords();
@@ -7367,7 +7374,7 @@ const Methods = {
7367
7374
  if (expList.length) {
7368
7375
  this.recalculate();
7369
7376
  }
7370
- });
7377
+ }).then(() => $xeTable.updateCellAreas());
7371
7378
  },
7372
7379
  clearRowExpandReserve() {
7373
7380
  this.rowExpandedReserveRowMap = {};
@@ -8644,10 +8651,14 @@ const Methods = {
8644
8651
  }
8645
8652
  },
8646
8653
  updateCellAreas() {
8647
- if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
8648
- return this.handleRecalculateCellAreas();
8654
+ const $xeTable = this;
8655
+ const props = $xeTable;
8656
+ const { mouseConfig } = props;
8657
+ const mouseOpts = $xeTable.computeMouseOpts;
8658
+ if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
8659
+ return $xeTable.handleRecalculateCellAreaEvent();
8649
8660
  }
8650
- return this.$nextTick();
8661
+ return $xeTable.$nextTick();
8651
8662
  },
8652
8663
  dispatchEvent(type, params, evnt) {
8653
8664
  const $xeTable = this;
@@ -1155,6 +1155,12 @@ export default {
1155
1155
  showFooter() {
1156
1156
  this.reScrollFlag++;
1157
1157
  },
1158
+ overflowX() {
1159
+ this.reScrollFlag++;
1160
+ },
1161
+ overflowY() {
1162
+ this.reScrollFlag++;
1163
+ },
1158
1164
  reScrollFlag() {
1159
1165
  const $xeTable = this;
1160
1166
  $xeTable.$nextTick(() => {
@@ -1940,7 +1940,7 @@
1940
1940
  display: none;
1941
1941
  position: absolute;
1942
1942
  pointer-events: none;
1943
- z-index: 1;
1943
+ z-index: 6;
1944
1944
  }
1945
1945
 
1946
1946
  .vxe-table--header-wrapper .vxe-table--cell-col-status-area {