vxe-table 4.11.0-beta.9 → 4.11.1

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 (121) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/export/hook.js +9 -6
  3. package/es/table/src/table.js +25 -9
  4. package/es/ui/index.js +1 -1
  5. package/es/ui/src/log.js +1 -1
  6. package/lib/index.umd.js +41 -18
  7. package/lib/index.umd.min.js +1 -1
  8. package/lib/locale/lang/en-US.min.js +1 -1
  9. package/lib/locale/lang/es-ES.min.js +1 -1
  10. package/lib/locale/lang/hu-HU.min.js +1 -1
  11. package/lib/locale/lang/ja-JP.min.js +1 -1
  12. package/lib/locale/lang/ko-KR.min.js +1 -1
  13. package/lib/locale/lang/pt-BR.min.js +1 -1
  14. package/lib/locale/lang/ru-RU.min.js +1 -1
  15. package/lib/locale/lang/uk-UA.min.js +1 -1
  16. package/lib/locale/lang/zh-CN.min.js +1 -1
  17. package/lib/locale/lang/zh-HK.min.js +1 -1
  18. package/lib/locale/lang/zh-MO.min.js +1 -1
  19. package/lib/locale/lang/zh-TC.min.js +1 -1
  20. package/lib/locale/lang/zh-TW.min.js +1 -1
  21. package/lib/style.css +1 -1
  22. package/lib/table/module/export/hook.js +10 -7
  23. package/lib/table/module/export/hook.min.js +1 -1
  24. package/lib/table/src/table.js +29 -9
  25. package/lib/table/src/table.min.js +1 -1
  26. package/lib/ui/index.js +1 -1
  27. package/lib/ui/index.min.js +1 -1
  28. package/lib/ui/src/log.js +1 -1
  29. package/lib/ui/src/log.min.js +1 -1
  30. package/package.json +2 -2
  31. package/packages/table/module/export/hook.ts +9 -6
  32. package/packages/table/src/table.ts +26 -9
  33. package/es/colgroup/style.css +0 -0
  34. package/es/colgroup/style.min.css +0 -0
  35. package/es/column/style.css +0 -0
  36. package/es/column/style.min.css +0 -0
  37. package/es/grid/style.css +0 -83
  38. package/es/grid/style.min.css +0 -1
  39. package/es/iconfont.1739785861561.ttf +0 -0
  40. package/es/iconfont.1739785861561.woff +0 -0
  41. package/es/iconfont.1739785861561.woff2 +0 -0
  42. package/es/table/style.css +0 -3474
  43. package/es/table/style.min.css +0 -1
  44. package/es/toolbar/style.css +0 -90
  45. package/es/toolbar/style.min.css +0 -1
  46. package/es/ui/style.css +0 -0
  47. package/es/ui/style.min.css +0 -0
  48. package/es/v-x-e-table/style.css +0 -0
  49. package/es/v-x-e-table/style.min.css +0 -0
  50. package/es/vxe-colgroup/style.css +0 -0
  51. package/es/vxe-colgroup/style.min.css +0 -0
  52. package/es/vxe-column/style.css +0 -0
  53. package/es/vxe-column/style.min.css +0 -0
  54. package/es/vxe-grid/style.css +0 -83
  55. package/es/vxe-grid/style.min.css +0 -1
  56. package/es/vxe-table/style.css +0 -3474
  57. package/es/vxe-table/style.min.css +0 -1
  58. package/es/vxe-toolbar/style.css +0 -90
  59. package/es/vxe-toolbar/style.min.css +0 -1
  60. package/es/vxe-ui/style.css +0 -0
  61. package/es/vxe-ui/style.min.css +0 -0
  62. package/es/vxe-v-x-e-table/style.css +0 -0
  63. package/es/vxe-v-x-e-table/style.min.css +0 -0
  64. package/lib/colgroup/style/index.js +0 -1
  65. package/lib/colgroup/style/style.css +0 -0
  66. package/lib/colgroup/style/style.min.css +0 -0
  67. package/lib/column/style/index.js +0 -1
  68. package/lib/column/style/style.css +0 -0
  69. package/lib/column/style/style.min.css +0 -0
  70. package/lib/grid/style/index.js +0 -1
  71. package/lib/grid/style/style.css +0 -83
  72. package/lib/grid/style/style.min.css +0 -1
  73. package/lib/iconfont.1739785861561.ttf +0 -0
  74. package/lib/iconfont.1739785861561.woff +0 -0
  75. package/lib/iconfont.1739785861561.woff2 +0 -0
  76. package/lib/locale/lang/en-US.umd.js +0 -715
  77. package/lib/locale/lang/es-ES.umd.js +0 -722
  78. package/lib/locale/lang/hu-HU.umd.js +0 -715
  79. package/lib/locale/lang/ja-JP.umd.js +0 -715
  80. package/lib/locale/lang/ko-KR.umd.js +0 -715
  81. package/lib/locale/lang/pt-BR.umd.js +0 -715
  82. package/lib/locale/lang/ru-RU.umd.js +0 -715
  83. package/lib/locale/lang/uk-UA.umd.js +0 -715
  84. package/lib/locale/lang/zh-CN.umd.js +0 -715
  85. package/lib/locale/lang/zh-HK.umd.js +0 -23
  86. package/lib/locale/lang/zh-MO.umd.js +0 -23
  87. package/lib/locale/lang/zh-TC.umd.js +0 -23
  88. package/lib/locale/lang/zh-TW.umd.js +0 -23
  89. package/lib/table/style/index.js +0 -1
  90. package/lib/table/style/style.css +0 -3474
  91. package/lib/table/style/style.min.css +0 -1
  92. package/lib/toolbar/style/index.js +0 -1
  93. package/lib/toolbar/style/style.css +0 -90
  94. package/lib/toolbar/style/style.min.css +0 -1
  95. package/lib/ui/style/index.js +0 -1
  96. package/lib/ui/style/style.css +0 -0
  97. package/lib/ui/style/style.min.css +0 -0
  98. package/lib/v-x-e-table/style/index.js +0 -1
  99. package/lib/v-x-e-table/style/style.css +0 -0
  100. package/lib/v-x-e-table/style/style.min.css +0 -0
  101. package/lib/vxe-colgroup/style/index.js +0 -1
  102. package/lib/vxe-colgroup/style/style.css +0 -0
  103. package/lib/vxe-colgroup/style/style.min.css +0 -0
  104. package/lib/vxe-column/style/index.js +0 -1
  105. package/lib/vxe-column/style/style.css +0 -0
  106. package/lib/vxe-column/style/style.min.css +0 -0
  107. package/lib/vxe-grid/style/index.js +0 -1
  108. package/lib/vxe-grid/style/style.css +0 -83
  109. package/lib/vxe-grid/style/style.min.css +0 -1
  110. package/lib/vxe-table/style/index.js +0 -1
  111. package/lib/vxe-table/style/style.css +0 -3474
  112. package/lib/vxe-table/style/style.min.css +0 -1
  113. package/lib/vxe-toolbar/style/index.js +0 -1
  114. package/lib/vxe-toolbar/style/style.css +0 -90
  115. package/lib/vxe-toolbar/style/style.min.css +0 -1
  116. package/lib/vxe-ui/style/index.js +0 -1
  117. package/lib/vxe-ui/style/style.css +0 -0
  118. package/lib/vxe-ui/style/style.min.css +0 -0
  119. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  120. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  121. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
@@ -1474,6 +1474,7 @@ export default defineComponent({
1474
1474
  };
1475
1475
  };
1476
1476
  const updateAfterListIndex = () => {
1477
+ const { treeConfig } = props;
1477
1478
  const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
1478
1479
  const fullMaps = {};
1479
1480
  afterFullData.forEach((row, index) => {
@@ -1481,7 +1482,9 @@ export default defineComponent({
1481
1482
  const rowRest = fullAllDataRowIdData[rowid];
1482
1483
  const seq = index + 1;
1483
1484
  if (rowRest) {
1484
- rowRest.seq = seq;
1485
+ if (!treeConfig) {
1486
+ rowRest.seq = seq;
1487
+ }
1485
1488
  rowRest._index = index;
1486
1489
  }
1487
1490
  else {
@@ -3344,6 +3347,14 @@ export default defineComponent({
3344
3347
  }
3345
3348
  }
3346
3349
  };
3350
+ const handleRowExpandScroll = () => {
3351
+ const { elemStore } = internalData;
3352
+ const rowExpandEl = refRowExpandElem.value;
3353
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
3354
+ if (rowExpandEl && bodyScrollElem) {
3355
+ rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
3356
+ }
3357
+ };
3347
3358
  tableMethods = {
3348
3359
  dispatchEvent,
3349
3360
  /**
@@ -5078,14 +5089,14 @@ export default defineComponent({
5078
5089
  * @param {Boolean} expanded 是否展开
5079
5090
  */
5080
5091
  setRowExpand(rows, expanded) {
5081
- const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn: column } = reactData;
5092
+ const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn } = reactData;
5082
5093
  const { fullAllDataRowIdData } = internalData;
5083
5094
  let rExpandedMaps = Object.assign({}, rowExpandedMaps);
5084
5095
  const expandOpts = computeExpandOpts.value;
5085
5096
  const { reserve, lazy, accordion, toggleMethod } = expandOpts;
5086
5097
  const lazyRests = [];
5087
- const columnIndex = tableMethods.getColumnIndex(column);
5088
- const $columnIndex = tableMethods.getVMColumnIndex(column);
5098
+ const columnIndex = $xeTable.getColumnIndex(expandColumn);
5099
+ const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
5089
5100
  if (rows) {
5090
5101
  if (!XEUtils.isArray(rows)) {
5091
5102
  rows = [rows];
@@ -5095,7 +5106,7 @@ export default defineComponent({
5095
5106
  rExpandedMaps = {};
5096
5107
  rows = rows.slice(rows.length - 1, rows.length);
5097
5108
  }
5098
- const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
5109
+ const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
5099
5110
  if (expanded) {
5100
5111
  validRows.forEach((row) => {
5101
5112
  const rowid = getRowid($xeTable, row);
@@ -5126,7 +5137,13 @@ export default defineComponent({
5126
5137
  reactData.rowExpandedMaps = rExpandedMaps;
5127
5138
  return Promise.all(lazyRests)
5128
5139
  .then(() => $xeTable.recalculate())
5129
- .then(() => $xeTable.updateCellAreas());
5140
+ .then(() => {
5141
+ if (expandColumn) {
5142
+ updateRowExpandStyle();
5143
+ handleRowExpandScroll();
5144
+ }
5145
+ return $xeTable.updateCellAreas();
5146
+ });
5130
5147
  },
5131
5148
  /**
5132
5149
  * 判断行是否为展开状态
@@ -7208,7 +7225,7 @@ export default defineComponent({
7208
7225
  const isSelected = sLen >= vLen;
7209
7226
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
7210
7227
  if (checkField) {
7211
- XEUtils.get(row, checkField, isSelected);
7228
+ XEUtils.set(row, checkField, isSelected);
7212
7229
  }
7213
7230
  if (isSelected) {
7214
7231
  if (!checkField) {
@@ -8811,7 +8828,6 @@ export default defineComponent({
8811
8828
  const isRollY = scrollTop !== lastScrollTop;
8812
8829
  // 用于鼠标纵向滚轮处理
8813
8830
  if (isRollY) {
8814
- evnt.preventDefault();
8815
8831
  if (rowOpts.isHover || highlightHoverRow) {
8816
8832
  $xeTable.clearHoverRow();
8817
8833
  }
@@ -9419,7 +9435,7 @@ export default defineComponent({
9419
9435
  const rightFixedWidth = computeRightFixedWidth.value;
9420
9436
  const ons = {};
9421
9437
  if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
9422
- ons.onWheel = $xeTable.triggerBodyWheelEvent;
9438
+ ons.onWheelPassive = $xeTable.triggerBodyWheelEvent;
9423
9439
  }
9424
9440
  return h('div', Object.assign({ ref: refTableViewportElem, class: 'vxe-table--viewport-wrapper' }, ons), [
9425
9441
  h('div', {
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 = "4.11.0-beta.9";
3
+ export const version = "4.11.1";
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${"4.11.0-beta.9"}`;
3
+ const version = `table v${"4.11.1"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.11.0-beta.9";
3141
+ const version = "4.11.0";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3586
3586
  const {
3587
3587
  log: log_log
3588
3588
  } = core_.VxeUI;
3589
- const log_version = `table v${"4.11.0-beta.9"}`;
3589
+ const log_version = `table v${"4.11.0"}`;
3590
3590
  const warnLog = log_log.create('warn', log_version);
3591
3591
  const errLog = log_log.create('error', log_version);
3592
3592
  ;// ./packages/table/src/columnInfo.ts
@@ -11975,6 +11975,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11975
11975
  };
11976
11976
  };
11977
11977
  const updateAfterListIndex = () => {
11978
+ const {
11979
+ treeConfig
11980
+ } = props;
11978
11981
  const {
11979
11982
  afterFullData,
11980
11983
  fullDataRowIdData,
@@ -11986,7 +11989,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11986
11989
  const rowRest = fullAllDataRowIdData[rowid];
11987
11990
  const seq = index + 1;
11988
11991
  if (rowRest) {
11989
- rowRest.seq = seq;
11992
+ if (!treeConfig) {
11993
+ rowRest.seq = seq;
11994
+ }
11990
11995
  rowRest._index = index;
11991
11996
  } else {
11992
11997
  const rest = {
@@ -14223,6 +14228,16 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14223
14228
  }
14224
14229
  }
14225
14230
  };
14231
+ const handleRowExpandScroll = () => {
14232
+ const {
14233
+ elemStore
14234
+ } = internalData;
14235
+ const rowExpandEl = refRowExpandElem.value;
14236
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
14237
+ if (rowExpandEl && bodyScrollElem) {
14238
+ rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
14239
+ }
14240
+ };
14226
14241
  tableMethods = {
14227
14242
  dispatchEvent,
14228
14243
  /**
@@ -16210,7 +16225,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16210
16225
  const {
16211
16226
  rowExpandedMaps,
16212
16227
  rowExpandLazyLoadedMaps,
16213
- expandColumn: column
16228
+ expandColumn
16214
16229
  } = reactData;
16215
16230
  const {
16216
16231
  fullAllDataRowIdData
@@ -16226,8 +16241,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16226
16241
  toggleMethod
16227
16242
  } = expandOpts;
16228
16243
  const lazyRests = [];
16229
- const columnIndex = tableMethods.getColumnIndex(column);
16230
- const $columnIndex = tableMethods.getVMColumnIndex(column);
16244
+ const columnIndex = $xeTable.getColumnIndex(expandColumn);
16245
+ const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
16231
16246
  if (rows) {
16232
16247
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
16233
16248
  rows = [rows];
@@ -16240,7 +16255,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16240
16255
  const validRows = toggleMethod ? rows.filter(row => toggleMethod({
16241
16256
  $table: $xeTable,
16242
16257
  expanded,
16243
- column,
16258
+ column: expandColumn,
16244
16259
  columnIndex,
16245
16260
  $columnIndex,
16246
16261
  row,
@@ -16273,7 +16288,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16273
16288
  }
16274
16289
  }
16275
16290
  reactData.rowExpandedMaps = rExpandedMaps;
16276
- return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => $xeTable.updateCellAreas());
16291
+ return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => {
16292
+ if (expandColumn) {
16293
+ updateRowExpandStyle();
16294
+ handleRowExpandScroll();
16295
+ }
16296
+ return $xeTable.updateCellAreas();
16297
+ });
16277
16298
  },
16278
16299
  /**
16279
16300
  * 判断行是否为展开状态
@@ -18623,7 +18644,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
18623
18644
  const isSelected = sLen >= vLen;
18624
18645
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
18625
18646
  if (checkField) {
18626
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField, isSelected);
18647
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
18627
18648
  }
18628
18649
  if (isSelected) {
18629
18650
  if (!checkField) {
@@ -20554,7 +20575,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
20554
20575
  const isRollY = scrollTop !== lastScrollTop;
20555
20576
  // 用于鼠标纵向滚轮处理
20556
20577
  if (isRollY) {
20557
- evnt.preventDefault();
20558
20578
  if (rowOpts.isHover || highlightHoverRow) {
20559
20579
  $xeTable.clearHoverRow();
20560
20580
  }
@@ -21233,7 +21253,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
21233
21253
  const rightFixedWidth = computeRightFixedWidth.value;
21234
21254
  const ons = {};
21235
21255
  if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
21236
- ons.onWheel = $xeTable.triggerBodyWheelEvent;
21256
+ ons.onWheelPassive = $xeTable.triggerBodyWheelEvent;
21237
21257
  }
21238
21258
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
21239
21259
  ref: refTableViewportElem,
@@ -25381,12 +25401,12 @@ export_hook_hooks.add('tableExportModule', {
25381
25401
  const {
25382
25402
  mergeList,
25383
25403
  mergeFooterList,
25384
- isGroup,
25385
- tableGroupColumn
25404
+ isGroup
25386
25405
  } = reactData;
25387
25406
  const {
25388
25407
  tableFullColumn,
25389
- afterFullData
25408
+ afterFullData,
25409
+ collectColumn
25390
25410
  } = internalData;
25391
25411
  const exportOpts = computeExportOpts.value;
25392
25412
  const treeOpts = computeTreeOpts.value;
@@ -25416,7 +25436,7 @@ export_hook_hooks.add('tableExportModule', {
25416
25436
  // beforeExportMethod: null,
25417
25437
  // afterExportMethod: null
25418
25438
  }, exportOpts, options);
25419
- const {
25439
+ let {
25420
25440
  filename,
25421
25441
  sheetName,
25422
25442
  type,
@@ -25429,7 +25449,11 @@ export_hook_hooks.add('tableExportModule', {
25429
25449
  excludeFields
25430
25450
  } = opts;
25431
25451
  let groups = [];
25432
- const customCols = columns && columns.length ? columns : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableGroupColumn, column => {
25452
+ const selectRecords = $xeTable.getCheckboxRecords();
25453
+ if (!mode) {
25454
+ mode = selectRecords.length ? 'selected' : 'current';
25455
+ }
25456
+ const customCols = columns && columns.length ? columns : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(collectColumn, column => {
25433
25457
  const isColGroup = column.children && column.children.length;
25434
25458
  let isChecked = false;
25435
25459
  if (columns && columns.length) {
@@ -25505,7 +25529,7 @@ export_hook_hooks.add('tableExportModule', {
25505
25529
  original: true
25506
25530
  });
25507
25531
  } else {
25508
- groups = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(isGroup ? tableGroupColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({
25532
+ groups = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({
25509
25533
  column,
25510
25534
  $columnIndex: index
25511
25535
  })), {
@@ -25580,7 +25604,6 @@ export_hook_hooks.add('tableExportModule', {
25580
25604
  if (!handleOptions.data) {
25581
25605
  handleOptions.data = [];
25582
25606
  if (mode === 'selected') {
25583
- const selectRecords = $xeTable.getCheckboxRecords();
25584
25607
  if (['html', 'pdf'].indexOf(type) > -1 && treeConfig) {
25585
25608
  handleOptions.data = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree($xeTable.getTableData().fullData, item => $xeTable.findRowIndexOf(selectRecords, item) > -1, Object.assign({}, treeOpts, {
25586
25609
  data: '_row'