vxe-table 3.11.18 → 3.11.19

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.
@@ -634,8 +634,10 @@ const Methods = {
634
634
  * @param {Array} datas 数据
635
635
  */
636
636
  loadTableData(datas) {
637
+ const $xeTable = this;
637
638
  const { keepSource, showOverflow, treeConfig, treeOpts, editStore, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop, scrollYLoad: oldScrollYLoad, sXOpts, sYOpts } = this;
638
639
  const childrenField = treeOpts.children || treeOpts.childrenField;
640
+ const rowOpts = $xeTable.computeRowOpts;
639
641
  let treeData = [];
640
642
  let fullData = datas ? datas.slice(0) : [];
641
643
  if (treeConfig) {
@@ -698,9 +700,11 @@ const Methods = {
698
700
  }
699
701
  if (sYLoad) {
700
702
  if (showOverflow) {
701
- const errColumn = this.tableFullColumn.find((column) => column.showOverflow === false);
702
- if (errColumn) {
703
- errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
703
+ if (!rowOpts.height) {
704
+ const errColumn = this.tableFullColumn.find((column) => column.showOverflow === false);
705
+ if (errColumn) {
706
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
707
+ }
704
708
  }
705
709
  }
706
710
  if (process.env.NODE_ENV === 'development') {
@@ -2237,7 +2241,7 @@ const Methods = {
2237
2241
  const isCustomVisible = isAllCustom || storageOpts.visible;
2238
2242
  const isCustomFixed = isAllCustom || storageOpts.fixed;
2239
2243
  const isCustomSort = isAllCustom || storageOpts.sort;
2240
- if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
2244
+ if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
2241
2245
  if (!tableId) {
2242
2246
  errLog('vxe.error.reqProp', ['id']);
2243
2247
  return;
@@ -2334,7 +2338,11 @@ const Methods = {
2334
2338
  return storeData;
2335
2339
  },
2336
2340
  saveCustomStore(type) {
2337
- const { tableId, customOpts } = this;
2341
+ const $xeTable = this;
2342
+ const props = $xeTable;
2343
+ const { customConfig } = props;
2344
+ const tableId = $xeTable.computeTableId;
2345
+ const customOpts = $xeTable.computeCustomOpts;
2338
2346
  const { updateStore, storage } = customOpts;
2339
2347
  const isAllCustom = storage === true;
2340
2348
  const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
@@ -2342,7 +2350,7 @@ const Methods = {
2342
2350
  const isCustomVisible = isAllCustom || storageOpts.visible;
2343
2351
  const isCustomFixed = isAllCustom || storageOpts.fixed;
2344
2352
  const isCustomSort = isAllCustom || storageOpts.sort;
2345
- if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
2353
+ if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
2346
2354
  if (!tableId) {
2347
2355
  errLog('vxe.error.reqProp', ['id']);
2348
2356
  return this.$nextTick();
@@ -2396,6 +2404,11 @@ const Methods = {
2396
2404
  * 将固定的列左边、右边分别靠边
2397
2405
  */
2398
2406
  parseColumns() {
2407
+ const $xeTable = this;
2408
+ const props = $xeTable;
2409
+ const internalData = $xeTable;
2410
+ const { showOverflow } = props;
2411
+ const rowOpts = $xeTable.computeRowOpts;
2399
2412
  const leftList = [];
2400
2413
  const centerList = [];
2401
2414
  const rightList = [];
@@ -2466,6 +2479,14 @@ const Methods = {
2466
2479
  this.hasFixedColumn = leftList.length > 0 || rightList.length > 0;
2467
2480
  Object.assign(columnStore, { leftList, centerList, rightList });
2468
2481
  if (scrollXLoad) {
2482
+ if (showOverflow) {
2483
+ if (!rowOpts.height) {
2484
+ const errColumn = internalData.tableFullColumn.find((column) => column.showOverflow === false);
2485
+ if (errColumn) {
2486
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
2487
+ }
2488
+ }
2489
+ }
2469
2490
  if (process.env.NODE_ENV === 'development') {
2470
2491
  // if (this.showHeader && !this.showHeaderOverflow) {
2471
2492
  // warnLog('vxe.error.reqProp', ['show-header-overflow'])
@@ -2612,11 +2633,7 @@ const Methods = {
2612
2633
  },
2613
2634
  calcCellWidth() {
2614
2635
  const $xeTable = this;
2615
- const { autoWidthColumnList, tableData } = this;
2616
- if (!tableData.length || !autoWidthColumnList.length) {
2617
- this.isCalcColumn = false;
2618
- return this.$nextTick();
2619
- }
2636
+ const { autoWidthColumnList } = this;
2620
2637
  this.isCalcColumn = true;
2621
2638
  return this.$nextTick().then(() => {
2622
2639
  const internalData = $xeTable;
@@ -3440,30 +3457,32 @@ const Methods = {
3440
3457
  else {
3441
3458
  // 如果是激活状态,退则出到上一行/下一行
3442
3459
  if (selected.row || actived.row) {
3443
- const targetArgs = selected.row ? selected.args : actived.args;
3460
+ const activeParams = selected.row ? selected.args : actived.args;
3444
3461
  if (hasShiftKey) {
3445
3462
  if (keyboardOpts.enterToTab) {
3446
- this.moveTabSelected(targetArgs, hasShiftKey, evnt);
3463
+ this.moveTabSelected(activeParams, hasShiftKey, evnt);
3447
3464
  }
3448
3465
  else {
3449
- this.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
3466
+ this.moveSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt);
3450
3467
  }
3451
3468
  }
3452
3469
  else {
3453
3470
  if (keyboardOpts.enterToTab) {
3454
- this.moveTabSelected(targetArgs, hasShiftKey, evnt);
3471
+ this.moveTabSelected(activeParams, hasShiftKey, evnt);
3455
3472
  }
3456
3473
  else {
3457
- const _rowIndex = $xeTable.getVTRowIndex(selected.row);
3474
+ const activeRow = selected.row || actived.row;
3475
+ const activeColumn = selected.column || actived.column;
3476
+ const _rowIndex = $xeTable.getVTRowIndex(activeRow);
3458
3477
  const etrParams = {
3459
- row: selected.row,
3460
- rowIndex: $xeTable.getRowIndex(selected.row),
3461
- $rowIndex: $xeTable.getVMRowIndex(selected.row),
3478
+ row: activeRow,
3479
+ rowIndex: $xeTable.getRowIndex(activeRow),
3480
+ $rowIndex: $xeTable.getVMRowIndex(activeRow),
3462
3481
  _rowIndex,
3463
- column: selected.column,
3464
- columnIndex: $xeTable.getColumnIndex(selected.column),
3465
- $columnIndex: $xeTable.getVMColumnIndex(selected.column),
3466
- _columnIndex: $xeTable.getVTColumnIndex(selected.column),
3482
+ column: activeColumn,
3483
+ columnIndex: $xeTable.getColumnIndex(activeColumn),
3484
+ $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
3485
+ _columnIndex: $xeTable.getVTColumnIndex(activeColumn),
3467
3486
  $table: $xeTable
3468
3487
  };
3469
3488
  if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
@@ -3472,13 +3491,13 @@ const Methods = {
3472
3491
  if (_rowIndex >= afterFullData.length - 1) {
3473
3492
  $xeTable.insertAt({}, -1).then(({ row: newRow }) => {
3474
3493
  $xeTable.scrollToRow(newRow, selected.column);
3475
- $xeTable.setSelectCell(newRow, selected.column);
3494
+ $xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow }), evnt);
3476
3495
  });
3477
3496
  $xeTable.dispatchEvent('enter-append-row', etrParams, evnt);
3478
3497
  return;
3479
3498
  }
3480
3499
  }
3481
- this.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
3500
+ this.moveSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
3482
3501
  if (enterMethod) {
3483
3502
  enterMethod(etrParams);
3484
3503
  }
@@ -6197,7 +6216,7 @@ const Methods = {
6197
6216
  $xeTable.checkScrolling();
6198
6217
  internalData.lastScrollLeft = scrollLeft;
6199
6218
  }
6200
- else {
6219
+ if (isRollY) {
6201
6220
  const yThreshold = $xeTable.computeScrollYThreshold;
6202
6221
  isTop = scrollTop <= 0;
6203
6222
  if (!isTop) {
@@ -6310,7 +6329,7 @@ const Methods = {
6310
6329
  scrollXEvent(evnt) {
6311
6330
  const $xeTable = this;
6312
6331
  const internalData = $xeTable;
6313
- const { inFooterScroll, inBodyScroll } = internalData;
6332
+ const { inFooterScroll, inBodyScroll, lastScrollTop } = internalData;
6314
6333
  if (inFooterScroll) {
6315
6334
  return;
6316
6335
  }
@@ -6323,10 +6342,16 @@ const Methods = {
6323
6342
  const bodyElem = tableBody.$el;
6324
6343
  const headerElem = tableHeader ? tableHeader.$el : null;
6325
6344
  const footerElem = tableFooter ? tableFooter.$el : null;
6345
+ const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
6326
6346
  const wrapperEl = evnt.currentTarget;
6327
- const { scrollTop, scrollLeft } = wrapperEl;
6347
+ const { scrollLeft } = wrapperEl;
6348
+ const yBodyEl = yHandleEl || bodyElem;
6349
+ let scrollTop = 0;
6350
+ if (yBodyEl) {
6351
+ scrollTop = yBodyEl.scrollTop;
6352
+ }
6328
6353
  const isRollX = true;
6329
- const isRollY = false;
6354
+ const isRollY = scrollTop !== lastScrollTop;
6330
6355
  internalData.inVirtualScroll = true;
6331
6356
  setScrollLeft(bodyElem, scrollLeft);
6332
6357
  setScrollLeft(headerElem, scrollLeft);
@@ -6340,7 +6365,7 @@ const Methods = {
6340
6365
  scrollYEvent(evnt) {
6341
6366
  const $xeTable = this;
6342
6367
  const internalData = $xeTable;
6343
- const { inFooterScroll, inBodyScroll } = internalData;
6368
+ const { inFooterScroll, inBodyScroll, lastScrollLeft } = internalData;
6344
6369
  if (inFooterScroll) {
6345
6370
  return;
6346
6371
  }
@@ -6353,9 +6378,15 @@ const Methods = {
6353
6378
  const bodyElem = tableBody.$el;
6354
6379
  const leftElem = leftBody ? leftBody.$el : null;
6355
6380
  const rightElem = rightBody ? rightBody.$el : null;
6381
+ const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
6356
6382
  const wrapperEl = evnt.currentTarget;
6357
- const { scrollTop, scrollLeft } = wrapperEl;
6358
- const isRollX = false;
6383
+ const { scrollTop } = wrapperEl;
6384
+ const xBodyEl = xHandleEl || bodyElem;
6385
+ let scrollLeft = 0;
6386
+ if (xBodyEl) {
6387
+ scrollLeft = xBodyEl.scrollLeft;
6388
+ }
6389
+ const isRollX = scrollLeft !== lastScrollLeft;
6359
6390
  const isRollY = true;
6360
6391
  internalData.inVirtualScroll = true;
6361
6392
  setScrollTop(bodyElem, scrollTop);
@@ -6599,7 +6630,7 @@ const Methods = {
6599
6630
  }
6600
6631
  }
6601
6632
  if (this.scrollXLoad || this.scrollYLoad) {
6602
- return new Promise(resolve => setTimeout(() => resolve(this.$nextTick()), 50));
6633
+ return new Promise(resolve => setTimeout(() => resolve(this.$nextTick()), 30));
6603
6634
  }
6604
6635
  return this.$nextTick();
6605
6636
  },
@@ -397,6 +397,9 @@ export default {
397
397
  };
398
398
  },
399
399
  computed: Object.assign(Object.assign({}, {}), { tableId() {
400
+ return this.computeTableId;
401
+ },
402
+ computeTableId() {
400
403
  const { id } = this;
401
404
  if (id) {
402
405
  if (XEUtils.isFunction(id)) {
@@ -878,8 +881,10 @@ export default {
878
881
  }
879
882
  if (process.env.NODE_ENV === 'development') {
880
883
  const customOpts = this.customOpts;
881
- if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
882
- errLog('vxe.error.reqProp', ['id']);
884
+ if (!this.id) {
885
+ if ((this.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
886
+ errLog('vxe.error.reqProp', ['id']);
887
+ }
883
888
  }
884
889
  if (this.treeConfig && this.checkboxOpts.range) {
885
890
  errLog('vxe.error.noTree', ['checkbox-config.range']);
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.11.18";
3
+ export const version = "3.11.19";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -69,6 +69,7 @@ VxeUI.setConfig({
69
69
  // visibleMethod () {}
70
70
  // },
71
71
  customConfig: {
72
+ // enabled: false,
72
73
  allowVisible: true,
73
74
  allowResizable: true,
74
75
  allowFixed: true,
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.11.18"}`;
3
+ const version = `table v${"3.11.19"}`;
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.11.18";
2223
+ const version = "3.11.19";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2289,6 +2289,7 @@ core_.VxeUI.setConfig({
2289
2289
  // visibleMethod () {}
2290
2290
  // },
2291
2291
  customConfig: {
2292
+ // enabled: false,
2292
2293
  allowVisible: true,
2293
2294
  allowResizable: true,
2294
2295
  allowFixed: true,
@@ -2778,7 +2779,7 @@ function isNodeElement(elem) {
2778
2779
  const {
2779
2780
  log: log_log
2780
2781
  } = core_.VxeUI;
2781
- const log_version = `table v${"3.11.18"}`;
2782
+ const log_version = `table v${"3.11.19"}`;
2782
2783
  const warnLog = log_log.create('warn', log_version);
2783
2784
  const errLog = log_log.create('error', log_version);
2784
2785
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5587,6 +5588,7 @@ const Methods = {
5587
5588
  * @param {Array} datas 数据
5588
5589
  */
5589
5590
  loadTableData(datas) {
5591
+ const $xeTable = this;
5590
5592
  const {
5591
5593
  keepSource,
5592
5594
  showOverflow,
@@ -5602,6 +5604,7 @@ const Methods = {
5602
5604
  sYOpts
5603
5605
  } = this;
5604
5606
  const childrenField = treeOpts.children || treeOpts.childrenField;
5607
+ const rowOpts = $xeTable.computeRowOpts;
5605
5608
  let treeData = [];
5606
5609
  let fullData = datas ? datas.slice(0) : [];
5607
5610
  if (treeConfig) {
@@ -5663,9 +5666,11 @@ const Methods = {
5663
5666
  }
5664
5667
  if (sYLoad) {
5665
5668
  if (showOverflow) {
5666
- const errColumn = this.tableFullColumn.find(column => column.showOverflow === false);
5667
- if (errColumn) {
5668
- errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
5669
+ if (!rowOpts.height) {
5670
+ const errColumn = this.tableFullColumn.find(column => column.showOverflow === false);
5671
+ if (errColumn) {
5672
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
5673
+ }
5669
5674
  }
5670
5675
  }
5671
5676
  if (true) {
@@ -7513,7 +7518,7 @@ const Methods = {
7513
7518
  const isCustomVisible = isAllCustom || storageOpts.visible;
7514
7519
  const isCustomFixed = isAllCustom || storageOpts.fixed;
7515
7520
  const isCustomSort = isAllCustom || storageOpts.sort;
7516
- if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
7521
+ if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
7517
7522
  if (!tableId) {
7518
7523
  errLog('vxe.error.reqProp', ['id']);
7519
7524
  return;
@@ -7620,10 +7625,13 @@ const Methods = {
7620
7625
  return storeData;
7621
7626
  },
7622
7627
  saveCustomStore(type) {
7628
+ const $xeTable = this;
7629
+ const props = $xeTable;
7623
7630
  const {
7624
- tableId,
7625
- customOpts
7626
- } = this;
7631
+ customConfig
7632
+ } = props;
7633
+ const tableId = $xeTable.computeTableId;
7634
+ const customOpts = $xeTable.computeCustomOpts;
7627
7635
  const {
7628
7636
  updateStore,
7629
7637
  storage
@@ -7634,7 +7642,7 @@ const Methods = {
7634
7642
  const isCustomVisible = isAllCustom || storageOpts.visible;
7635
7643
  const isCustomFixed = isAllCustom || storageOpts.fixed;
7636
7644
  const isCustomSort = isAllCustom || storageOpts.sort;
7637
- if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
7645
+ if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
7638
7646
  if (!tableId) {
7639
7647
  errLog('vxe.error.reqProp', ['id']);
7640
7648
  return this.$nextTick();
@@ -7685,6 +7693,13 @@ const Methods = {
7685
7693
  * 将固定的列左边、右边分别靠边
7686
7694
  */
7687
7695
  parseColumns() {
7696
+ const $xeTable = this;
7697
+ const props = $xeTable;
7698
+ const internalData = $xeTable;
7699
+ const {
7700
+ showOverflow
7701
+ } = props;
7702
+ const rowOpts = $xeTable.computeRowOpts;
7688
7703
  const leftList = [];
7689
7704
  const centerList = [];
7690
7705
  const rightList = [];
@@ -7759,6 +7774,14 @@ const Methods = {
7759
7774
  rightList
7760
7775
  });
7761
7776
  if (scrollXLoad) {
7777
+ if (showOverflow) {
7778
+ if (!rowOpts.height) {
7779
+ const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false);
7780
+ if (errColumn) {
7781
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
7782
+ }
7783
+ }
7784
+ }
7762
7785
  if (true) {
7763
7786
  // if (this.showHeader && !this.showHeaderOverflow) {
7764
7787
  // warnLog('vxe.error.reqProp', ['show-header-overflow'])
@@ -7926,13 +7949,8 @@ const Methods = {
7926
7949
  calcCellWidth() {
7927
7950
  const $xeTable = this;
7928
7951
  const {
7929
- autoWidthColumnList,
7930
- tableData
7952
+ autoWidthColumnList
7931
7953
  } = this;
7932
- if (!tableData.length || !autoWidthColumnList.length) {
7933
- this.isCalcColumn = false;
7934
- return this.$nextTick();
7935
- }
7936
7954
  this.isCalcColumn = true;
7937
7955
  return this.$nextTick().then(() => {
7938
7956
  const internalData = $xeTable;
@@ -8865,27 +8883,29 @@ const Methods = {
8865
8883
  } else {
8866
8884
  // 如果是激活状态,退则出到上一行/下一行
8867
8885
  if (selected.row || actived.row) {
8868
- const targetArgs = selected.row ? selected.args : actived.args;
8886
+ const activeParams = selected.row ? selected.args : actived.args;
8869
8887
  if (hasShiftKey) {
8870
8888
  if (keyboardOpts.enterToTab) {
8871
- this.moveTabSelected(targetArgs, hasShiftKey, evnt);
8889
+ this.moveTabSelected(activeParams, hasShiftKey, evnt);
8872
8890
  } else {
8873
- this.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
8891
+ this.moveSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt);
8874
8892
  }
8875
8893
  } else {
8876
8894
  if (keyboardOpts.enterToTab) {
8877
- this.moveTabSelected(targetArgs, hasShiftKey, evnt);
8895
+ this.moveTabSelected(activeParams, hasShiftKey, evnt);
8878
8896
  } else {
8879
- const _rowIndex = $xeTable.getVTRowIndex(selected.row);
8897
+ const activeRow = selected.row || actived.row;
8898
+ const activeColumn = selected.column || actived.column;
8899
+ const _rowIndex = $xeTable.getVTRowIndex(activeRow);
8880
8900
  const etrParams = {
8881
- row: selected.row,
8882
- rowIndex: $xeTable.getRowIndex(selected.row),
8883
- $rowIndex: $xeTable.getVMRowIndex(selected.row),
8901
+ row: activeRow,
8902
+ rowIndex: $xeTable.getRowIndex(activeRow),
8903
+ $rowIndex: $xeTable.getVMRowIndex(activeRow),
8884
8904
  _rowIndex,
8885
- column: selected.column,
8886
- columnIndex: $xeTable.getColumnIndex(selected.column),
8887
- $columnIndex: $xeTable.getVMColumnIndex(selected.column),
8888
- _columnIndex: $xeTable.getVTColumnIndex(selected.column),
8905
+ column: activeColumn,
8906
+ columnIndex: $xeTable.getColumnIndex(activeColumn),
8907
+ $columnIndex: $xeTable.getVMColumnIndex(activeColumn),
8908
+ _columnIndex: $xeTable.getVTColumnIndex(activeColumn),
8889
8909
  $table: $xeTable
8890
8910
  };
8891
8911
  if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
@@ -8896,13 +8916,16 @@ const Methods = {
8896
8916
  row: newRow
8897
8917
  }) => {
8898
8918
  $xeTable.scrollToRow(newRow, selected.column);
8899
- $xeTable.setSelectCell(newRow, selected.column);
8919
+ $xeTable.handleSelected({
8920
+ ...activeParams,
8921
+ row: newRow
8922
+ }, evnt);
8900
8923
  });
8901
8924
  $xeTable.dispatchEvent('enter-append-row', etrParams, evnt);
8902
8925
  return;
8903
8926
  }
8904
8927
  }
8905
- this.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
8928
+ this.moveSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
8906
8929
  if (enterMethod) {
8907
8930
  enterMethod(etrParams);
8908
8931
  }
@@ -12221,7 +12244,8 @@ const Methods = {
12221
12244
  }
12222
12245
  $xeTable.checkScrolling();
12223
12246
  internalData.lastScrollLeft = scrollLeft;
12224
- } else {
12247
+ }
12248
+ if (isRollY) {
12225
12249
  const yThreshold = $xeTable.computeScrollYThreshold;
12226
12250
  isTop = scrollTop <= 0;
12227
12251
  if (!isTop) {
@@ -12351,7 +12375,8 @@ const Methods = {
12351
12375
  const internalData = $xeTable;
12352
12376
  const {
12353
12377
  inFooterScroll,
12354
- inBodyScroll
12378
+ inBodyScroll,
12379
+ lastScrollTop
12355
12380
  } = internalData;
12356
12381
  if (inFooterScroll) {
12357
12382
  return;
@@ -12365,13 +12390,18 @@ const Methods = {
12365
12390
  const bodyElem = tableBody.$el;
12366
12391
  const headerElem = tableHeader ? tableHeader.$el : null;
12367
12392
  const footerElem = tableFooter ? tableFooter.$el : null;
12393
+ const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
12368
12394
  const wrapperEl = evnt.currentTarget;
12369
12395
  const {
12370
- scrollTop,
12371
12396
  scrollLeft
12372
12397
  } = wrapperEl;
12398
+ const yBodyEl = yHandleEl || bodyElem;
12399
+ let scrollTop = 0;
12400
+ if (yBodyEl) {
12401
+ scrollTop = yBodyEl.scrollTop;
12402
+ }
12373
12403
  const isRollX = true;
12374
- const isRollY = false;
12404
+ const isRollY = scrollTop !== lastScrollTop;
12375
12405
  internalData.inVirtualScroll = true;
12376
12406
  setScrollLeft(bodyElem, scrollLeft);
12377
12407
  setScrollLeft(headerElem, scrollLeft);
@@ -12387,7 +12417,8 @@ const Methods = {
12387
12417
  const internalData = $xeTable;
12388
12418
  const {
12389
12419
  inFooterScroll,
12390
- inBodyScroll
12420
+ inBodyScroll,
12421
+ lastScrollLeft
12391
12422
  } = internalData;
12392
12423
  if (inFooterScroll) {
12393
12424
  return;
@@ -12401,12 +12432,17 @@ const Methods = {
12401
12432
  const bodyElem = tableBody.$el;
12402
12433
  const leftElem = leftBody ? leftBody.$el : null;
12403
12434
  const rightElem = rightBody ? rightBody.$el : null;
12435
+ const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
12404
12436
  const wrapperEl = evnt.currentTarget;
12405
12437
  const {
12406
- scrollTop,
12407
- scrollLeft
12438
+ scrollTop
12408
12439
  } = wrapperEl;
12409
- const isRollX = false;
12440
+ const xBodyEl = xHandleEl || bodyElem;
12441
+ let scrollLeft = 0;
12442
+ if (xBodyEl) {
12443
+ scrollLeft = xBodyEl.scrollLeft;
12444
+ }
12445
+ const isRollX = scrollLeft !== lastScrollLeft;
12410
12446
  const isRollY = true;
12411
12447
  internalData.inVirtualScroll = true;
12412
12448
  setScrollTop(bodyElem, scrollTop);
@@ -12711,7 +12747,7 @@ const Methods = {
12711
12747
  }
12712
12748
  }
12713
12749
  if (this.scrollXLoad || this.scrollYLoad) {
12714
- return new Promise(resolve => setTimeout(() => resolve(this.$nextTick()), 50));
12750
+ return new Promise(resolve => setTimeout(() => resolve(this.$nextTick()), 30));
12715
12751
  }
12716
12752
  return this.$nextTick();
12717
12753
  },
@@ -13222,7 +13258,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13222
13258
  const showEllipsis = cellOverflow === 'ellipsis';
13223
13259
  const showTitle = cellOverflow === 'title';
13224
13260
  const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
13225
- const hasEllipsis = showTitle || showTooltip || showEllipsis;
13261
+ // 如果表格加上 showOverflow 则不再支持列单独设置
13262
+ const hasEllipsis = allColumnOverflow || showTitle || showTooltip || showEllipsis;
13226
13263
  let isDirty;
13227
13264
  const tdOns = {};
13228
13265
  const rest = fullAllDataRowIdData[rowid];
@@ -22555,6 +22592,9 @@ function handleUupdateResize(_vm) {
22555
22592
  computed: {
22556
22593
  ...{},
22557
22594
  tableId() {
22595
+ return this.computeTableId;
22596
+ },
22597
+ computeTableId() {
22558
22598
  const {
22559
22599
  id
22560
22600
  } = this;
@@ -23097,8 +23137,10 @@ function handleUupdateResize(_vm) {
23097
23137
  }
23098
23138
  if (true) {
23099
23139
  const customOpts = this.customOpts;
23100
- if (!this.id && this.customConfig && (customOpts.storage === true || customOpts.storage && customOpts.storage.resizable || customOpts.storage && customOpts.storage.visible)) {
23101
- errLog('vxe.error.reqProp', ['id']);
23140
+ if (!this.id) {
23141
+ if ((this.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
23142
+ errLog('vxe.error.reqProp', ['id']);
23143
+ }
23102
23144
  }
23103
23145
  if (this.treeConfig && this.checkboxOpts.range) {
23104
23146
  errLog('vxe.error.noTree', ['checkbox-config.range']);