vxe-table 3.21.17 → 3.21.18

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 (44) 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/custom/panel.js +5 -2
  6. package/es/table/src/columnInfo.js +6 -6
  7. package/es/table/src/footer.js +5 -5
  8. package/es/table/src/header.js +10 -8
  9. package/es/table/src/methods.js +8 -2
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/lib/index.css +1 -1
  13. package/lib/index.min.css +1 -1
  14. package/lib/index.umd.js +979 -964
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/module/custom/panel.js +5 -2
  19. package/lib/table/module/custom/panel.min.js +1 -1
  20. package/lib/table/src/columnInfo.js +6 -0
  21. package/lib/table/src/footer.js +5 -4
  22. package/lib/table/src/footer.min.js +1 -1
  23. package/lib/table/src/header.js +12 -8
  24. package/lib/table/src/header.min.js +1 -1
  25. package/lib/table/src/methods.js +3 -2
  26. package/lib/table/src/methods.min.js +1 -1
  27. package/lib/ui/index.js +1 -1
  28. package/lib/ui/index.min.js +1 -1
  29. package/lib/ui/src/log.js +1 -1
  30. package/lib/ui/src/log.min.js +1 -1
  31. package/package.json +3 -3
  32. package/packages/table/module/custom/panel.ts +5 -2
  33. package/packages/table/src/footer.ts +5 -5
  34. package/packages/table/src/header.ts +10 -8
  35. package/packages/table/src/methods.ts +6 -1
  36. package/packages/table/src/util.ts +2 -16
  37. package/styles/theme/dark.scss +1 -1
  38. package/styles/variable.scss +1 -1
  39. /package/es/{iconfont.1781876872867.ttf → iconfont.1782186465261.ttf} +0 -0
  40. /package/es/{iconfont.1781876872867.woff → iconfont.1782186465261.woff} +0 -0
  41. /package/es/{iconfont.1781876872867.woff2 → iconfont.1782186465261.woff2} +0 -0
  42. /package/lib/{iconfont.1781876872867.ttf → iconfont.1782186465261.ttf} +0 -0
  43. /package/lib/{iconfont.1781876872867.woff → iconfont.1782186465261.woff} +0 -0
  44. /package/lib/{iconfont.1781876872867.woff2 → iconfont.1782186465261.woff2} +0 -0
@@ -1188,8 +1188,11 @@ export default {
1188
1188
  const resizeParams = {
1189
1189
  $table: $xeTable,
1190
1190
  column,
1191
- columnIndex: index,
1192
- $columnIndex: index,
1191
+ columnIndex: $xeTable.getColumnIndex(column),
1192
+ $columnIndex: $xeTable.getVMColumnIndex(column),
1193
+ _columnIndex: $xeTable.getVTColumnIndex(column),
1194
+ rowIndex: -1,
1195
+ _rowIndex: -1,
1193
1196
  $rowIndex: -1
1194
1197
  };
1195
1198
  if (reMinWidth) {
@@ -152,11 +152,11 @@ export class ColumnInfo {
152
152
  // 跨列
153
153
  colSpan: 1,
154
154
  // 数据排序
155
- order: null,
156
- sortTime: 0,
155
+ order: null, // 用于记录排序类型,升序和倒序
156
+ sortTime: 0, // 用于多列的先后顺序
157
157
  // 列排序
158
- sortNumber: 0,
159
- renderSortNumber: 0,
158
+ sortNumber: 0, // 用于记录自定义列顺序
159
+ renderSortNumber: 0, // 用于记录自定义列顺序
160
160
  renderAggFn: '',
161
161
  renderAggDigits: null,
162
162
  renderAggFormat: null,
@@ -166,9 +166,9 @@ export class ColumnInfo {
166
166
  renderHeight: 0,
167
167
  renderResizeWidth: 0,
168
168
  renderAutoWidth: 0,
169
- resizeWidth: 0,
169
+ resizeWidth: 0, // 手动调整
170
170
  renderLeft: 0,
171
- renderArgs: [],
171
+ renderArgs: [], // 渲染参数可用于扩展
172
172
  model: {},
173
173
  renderHeader: renderHeader || colConfs.renderHeader,
174
174
  renderCell: renderCell || colConfs.renderCell,
@@ -194,17 +194,17 @@ function renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
194
194
  const tableProps = $xeTable;
195
195
  const { fixedType, footerTableData } = props;
196
196
  const { footerRowClassName, footerRowStyle } = tableProps;
197
- return footerTableData.map((row, $rowIndex) => {
198
- const _rowIndex = $rowIndex;
199
- const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
197
+ return footerTableData.map((row, _rowIndex) => {
198
+ const $rowIndex = _rowIndex;
199
+ const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
200
200
  return h('tr', {
201
- key: $rowIndex,
201
+ key: _rowIndex,
202
202
  class: [
203
203
  'vxe-footer--row',
204
204
  footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
205
205
  ],
206
206
  style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : undefined
207
- }, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
207
+ }, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex));
208
208
  });
209
209
  }
210
210
  export default {
@@ -7,7 +7,7 @@ import { getSlotVNs } from '../../ui/src/vn';
7
7
  const { renderer, renderEmptyElement } = VxeUI;
8
8
  const sourceType = 'table';
9
9
  const renderType = 'header';
10
- function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols) {
10
+ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols) {
11
11
  const props = _vm;
12
12
  const $xeTable = _vm.$parent;
13
13
  const $xeGrid = $xeTable.$xeGrid;
@@ -27,7 +27,7 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
27
27
  const headerCellOpts = $xeTable.computeHeaderCellOpts;
28
28
  const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
29
29
  const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
30
- const isLastRow = $rowIndex === headerGroups.length - 1;
30
+ const isLastRow = _rowIndex === headerGroups.length - 1;
31
31
  return cols.map((column, $columnIndex) => {
32
32
  const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
33
33
  // const { enabled } = tooltipOpts
@@ -56,7 +56,9 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
56
56
  $table: $xeTable,
57
57
  $grid: $xeGrid,
58
58
  $gantt: $xeGantt,
59
- $rowIndex,
59
+ rowIndex: _rowIndex,
60
+ _rowIndex,
61
+ $rowIndex: _rowIndex,
60
62
  column,
61
63
  columnIndex,
62
64
  $columnIndex,
@@ -78,7 +80,7 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
78
80
  thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null;
79
81
  }
80
82
  if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
81
- const spanRest = mergeHeaderCellMaps[`${$rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
83
+ const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
82
84
  if (spanRest) {
83
85
  const { rowspan, colspan } = spanRest;
84
86
  if (!rowspan || !colspan) {
@@ -317,16 +319,16 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups, renderColumn
317
319
  const { fixedType } = props;
318
320
  const { headerRowClassName, headerRowStyle } = tableProps;
319
321
  const floatingFilterOpts = $xeTable.computeFloatingFilterOpts;
320
- const rowVNs = headerGroups.map((cols, $rowIndex) => {
321
- const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType };
322
+ const rowVNs = headerGroups.map((cols, _rowIndex) => {
323
+ const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
322
324
  return h('tr', {
323
- key: $rowIndex,
325
+ key: _rowIndex,
324
326
  class: [
325
327
  'vxe-header--row',
326
328
  headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''
327
329
  ],
328
330
  style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : undefined
329
- }, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols));
331
+ }, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols));
330
332
  });
331
333
  if (floatingFilterOpts.enabled) {
332
334
  rowVNs.push(h('tr', {
@@ -9534,7 +9534,13 @@ const tableMethods = {
9534
9534
  }
9535
9535
  if (editOpts.trigger === 'manual') {
9536
9536
  if (actived.args && actived.row === row && column !== actived.column) {
9537
- handleChangeCell($xeTable, evnt, params);
9537
+ if (editOpts.mode === 'row') {
9538
+ handleChangeCell($xeTable, evnt, params);
9539
+ }
9540
+ else {
9541
+ checkValidate($xeTable, 'blur')
9542
+ .catch((e) => e);
9543
+ }
9538
9544
  }
9539
9545
  }
9540
9546
  else if (!actived.args || row !== actived.row || column !== actived.column) {
@@ -11191,7 +11197,7 @@ const tableMethods = {
11191
11197
  style: null,
11192
11198
  options: [],
11193
11199
  column: null,
11194
- multiple: false,
11200
+ multiple: false, // 选项是覅多选
11195
11201
  visible: false
11196
11202
  });
11197
11203
  }
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.21.17";
3
+ export const version = "3.21.18";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const tableVersion = `table v${"3.21.17"}`;
3
+ const tableVersion = `table v${"3.21.18"}`;
4
4
  export function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
6
6
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';