vxe-table 4.19.17 → 4.19.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.
- package/dist/all.esm.js +40 -29
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +5 -2
- package/es/table/src/columnInfo.js +6 -6
- package/es/table/src/emits.js +4 -4
- package/es/table/src/footer.js +5 -5
- package/es/table/src/header.js +10 -8
- package/es/table/src/table.js +8 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +987 -964
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +5 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -0
- package/lib/table/src/emits.js +9 -1
- package/lib/table/src/footer.js +5 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +12 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +3 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +3 -3
- package/packages/table/module/custom/panel.ts +5 -2
- package/packages/table/src/footer.ts +5 -5
- package/packages/table/src/header.ts +10 -8
- package/packages/table/src/table.ts +6 -1
- package/packages/table/src/util.ts +2 -16
- package/styles/theme/dark.scss +1 -1
- package/styles/variable.scss +1 -1
- /package/es/{iconfont.1781876895482.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/es/{iconfont.1781876895482.woff → iconfont.1782186482222.woff} +0 -0
- /package/es/{iconfont.1781876895482.woff2 → iconfont.1782186482222.woff2} +0 -0
- /package/lib/{iconfont.1781876895482.ttf → iconfont.1782186482222.ttf} +0 -0
- /package/lib/{iconfont.1781876895482.woff → iconfont.1782186482222.woff} +0 -0
- /package/lib/{iconfont.1781876895482.woff2 → iconfont.1782186482222.woff2} +0 -0
|
@@ -1022,8 +1022,11 @@ export default defineVxeComponent({
|
|
|
1022
1022
|
const resizeParams = {
|
|
1023
1023
|
$table: $xeTable,
|
|
1024
1024
|
column,
|
|
1025
|
-
columnIndex:
|
|
1026
|
-
$columnIndex:
|
|
1025
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
1026
|
+
$columnIndex: $xeTable.getVMColumnIndex(column),
|
|
1027
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
1028
|
+
rowIndex: -1,
|
|
1029
|
+
_rowIndex: -1,
|
|
1027
1030
|
$rowIndex: -1
|
|
1028
1031
|
};
|
|
1029
1032
|
if (reMinWidth) {
|
|
@@ -141,11 +141,11 @@ export class ColumnInfo {
|
|
|
141
141
|
// 跨列
|
|
142
142
|
colSpan: 1,
|
|
143
143
|
// 数据排序
|
|
144
|
-
order: null,
|
|
145
|
-
sortTime: 0,
|
|
144
|
+
order: null, // 用于记录排序类型,升序和倒序
|
|
145
|
+
sortTime: 0, // 用于多列的先后顺序
|
|
146
146
|
// 列排序
|
|
147
|
-
sortNumber: 0,
|
|
148
|
-
renderSortNumber: 0,
|
|
147
|
+
sortNumber: 0, // 用于记录自定义列顺序
|
|
148
|
+
renderSortNumber: 0, // 用于记录自定义列顺序
|
|
149
149
|
renderAggFn: '',
|
|
150
150
|
renderAggDigits: null,
|
|
151
151
|
renderAggFormat: null,
|
|
@@ -155,9 +155,9 @@ export class ColumnInfo {
|
|
|
155
155
|
renderHeight: 0,
|
|
156
156
|
renderResizeWidth: 0,
|
|
157
157
|
renderAutoWidth: 0,
|
|
158
|
-
resizeWidth: 0,
|
|
158
|
+
resizeWidth: 0, // 手动调整
|
|
159
159
|
renderLeft: 0,
|
|
160
|
-
renderArgs: [],
|
|
160
|
+
renderArgs: [], // 渲染参数可用于扩展
|
|
161
161
|
model: {},
|
|
162
162
|
renderHeader: renderHeader || colConfs.renderHeader,
|
|
163
163
|
renderCell: renderCell || colConfs.renderCell,
|
package/es/table/src/emits.js
CHANGED
|
@@ -15,7 +15,7 @@ export const tableEmits = [
|
|
|
15
15
|
'columns-change',
|
|
16
16
|
'data-change',
|
|
17
17
|
'footer-data-change',
|
|
18
|
-
'current-change',
|
|
18
|
+
'current-change', // 已废弃
|
|
19
19
|
'current-row-change',
|
|
20
20
|
'current-row-disabled',
|
|
21
21
|
'current-column-change',
|
|
@@ -49,7 +49,7 @@ export const tableEmits = [
|
|
|
49
49
|
'filter-visible',
|
|
50
50
|
'clear-filter',
|
|
51
51
|
'clear-all-filter',
|
|
52
|
-
'resizable-change',
|
|
52
|
+
'resizable-change', // 废弃
|
|
53
53
|
'column-resizable-change',
|
|
54
54
|
'row-resizable-change',
|
|
55
55
|
'toggle-row-group-expand',
|
|
@@ -67,7 +67,7 @@ export const tableEmits = [
|
|
|
67
67
|
'column-dragend',
|
|
68
68
|
'enter-append-row',
|
|
69
69
|
'tab-append-row',
|
|
70
|
-
'edit-actived',
|
|
70
|
+
'edit-actived', // 废弃
|
|
71
71
|
'edit-activated',
|
|
72
72
|
'edit-disabled',
|
|
73
73
|
'valid-error',
|
|
@@ -78,7 +78,7 @@ export const tableEmits = [
|
|
|
78
78
|
'custom-visible-all',
|
|
79
79
|
'custom-fixed-change',
|
|
80
80
|
'custom-sort-change',
|
|
81
|
-
'change-fnr',
|
|
81
|
+
'change-fnr', // 废弃
|
|
82
82
|
'open-fnr',
|
|
83
83
|
'show-fnr',
|
|
84
84
|
'hide-fnr',
|
package/es/table/src/footer.js
CHANGED
|
@@ -206,17 +206,17 @@ export default defineVxeComponent({
|
|
|
206
206
|
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
207
207
|
const { fixedType, footerTableData } = props;
|
|
208
208
|
const { footerRowClassName, footerRowStyle } = tableProps;
|
|
209
|
-
return footerTableData.map((row,
|
|
210
|
-
const
|
|
211
|
-
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
209
|
+
return footerTableData.map((row, _rowIndex) => {
|
|
210
|
+
const $rowIndex = _rowIndex;
|
|
211
|
+
const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
212
212
|
return h('tr', {
|
|
213
|
-
key:
|
|
213
|
+
key: _rowIndex,
|
|
214
214
|
class: [
|
|
215
215
|
'vxe-footer--row',
|
|
216
216
|
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
217
217
|
],
|
|
218
218
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
219
|
-
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row,
|
|
219
|
+
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex));
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
const renderVN = () => {
|
package/es/table/src/header.js
CHANGED
|
@@ -48,7 +48,7 @@ export default defineVxeComponent({
|
|
|
48
48
|
$xeTable.dispatchEvent('columns-change', { visibleColgroups, collectColumn, visibleColumn }, null);
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
const renderRows = (isGroup, isOptimizeMode, headerGroups,
|
|
51
|
+
const renderRows = (isGroup, isOptimizeMode, headerGroups, _rowIndex, cols) => {
|
|
52
52
|
const $xeGrid = $xeTable.xeGrid;
|
|
53
53
|
const $xeGantt = $xeTable.xeGantt;
|
|
54
54
|
const { fixedType } = props;
|
|
@@ -63,7 +63,7 @@ export default defineVxeComponent({
|
|
|
63
63
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
64
64
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
65
65
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
66
|
-
const isLastRow =
|
|
66
|
+
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
67
67
|
return cols.map((column, $columnIndex) => {
|
|
68
68
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
|
|
69
69
|
const colid = column.id;
|
|
@@ -91,7 +91,9 @@ export default defineVxeComponent({
|
|
|
91
91
|
$table: $xeTable,
|
|
92
92
|
$grid: $xeGrid,
|
|
93
93
|
$gantt: $xeGantt,
|
|
94
|
-
|
|
94
|
+
rowIndex: _rowIndex,
|
|
95
|
+
_rowIndex,
|
|
96
|
+
$rowIndex: _rowIndex,
|
|
95
97
|
column,
|
|
96
98
|
columnIndex,
|
|
97
99
|
$columnIndex,
|
|
@@ -113,7 +115,7 @@ export default defineVxeComponent({
|
|
|
113
115
|
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null;
|
|
114
116
|
}
|
|
115
117
|
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
|
|
116
|
-
const spanRest = mergeHeaderCellMaps[`${
|
|
118
|
+
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
|
|
117
119
|
if (spanRest) {
|
|
118
120
|
const { rowspan, colspan } = spanRest;
|
|
119
121
|
if (!rowspan || !colspan) {
|
|
@@ -331,16 +333,16 @@ export default defineVxeComponent({
|
|
|
331
333
|
const { fixedType } = props;
|
|
332
334
|
const { headerRowClassName, headerRowStyle } = tableProps;
|
|
333
335
|
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
334
|
-
const rowVNs = headerGroups.map((cols,
|
|
335
|
-
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType };
|
|
336
|
+
const rowVNs = headerGroups.map((cols, _rowIndex) => {
|
|
337
|
+
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
|
|
336
338
|
return h('tr', {
|
|
337
|
-
key:
|
|
339
|
+
key: _rowIndex,
|
|
338
340
|
class: [
|
|
339
341
|
'vxe-header--row',
|
|
340
342
|
headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
|
|
341
343
|
],
|
|
342
344
|
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
|
|
343
|
-
}, renderRows(isGroup, isOptimizeMode, headerGroups,
|
|
345
|
+
}, renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols));
|
|
344
346
|
});
|
|
345
347
|
if (floatingFilterOpts.enabled) {
|
|
346
348
|
rowVNs.push(h('tr', {
|
package/es/table/src/table.js
CHANGED
|
@@ -6959,7 +6959,7 @@ export default defineVxeComponent({
|
|
|
6959
6959
|
style: null,
|
|
6960
6960
|
options: [],
|
|
6961
6961
|
column: null,
|
|
6962
|
-
multiple: false,
|
|
6962
|
+
multiple: false, // 选项是覅多选
|
|
6963
6963
|
visible: false
|
|
6964
6964
|
});
|
|
6965
6965
|
}
|
|
@@ -10668,7 +10668,13 @@ export default defineVxeComponent({
|
|
|
10668
10668
|
}
|
|
10669
10669
|
if (editOpts.trigger === 'manual') {
|
|
10670
10670
|
if (actived.args && actived.row === row && column !== actived.column) {
|
|
10671
|
-
|
|
10671
|
+
if (editOpts.mode === 'row') {
|
|
10672
|
+
handleChangeCell(evnt, params);
|
|
10673
|
+
}
|
|
10674
|
+
else {
|
|
10675
|
+
checkValidate('blur')
|
|
10676
|
+
.catch((e) => e);
|
|
10677
|
+
}
|
|
10672
10678
|
}
|
|
10673
10679
|
}
|
|
10674
10680
|
else if (!actived.args || row !== actived.row || column !== actived.column) {
|
package/es/ui/index.js
CHANGED
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${"4.19.
|
|
3
|
+
const tableVersion = `table v${"4.19.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}` : '';
|