vxe-table 3.12.0-beta.4 → 3.12.0-beta.6
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/es/style.css +1 -1
- package/es/table/src/body.js +31 -27
- package/es/table/src/footer.js +2 -2
- package/es/table/src/header.js +1 -1
- package/es/table/src/methods.js +18 -6
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +58 -37
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +32 -27
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +2 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +21 -6
- package/lib/table/src/methods.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 +2 -2
- package/packages/table/src/body.ts +31 -27
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/methods.ts +21 -6
- /package/es/{iconfont.1735197318909.ttf → iconfont.1735262166812.ttf} +0 -0
- /package/es/{iconfont.1735197318909.woff → iconfont.1735262166812.woff} +0 -0
- /package/es/{iconfont.1735197318909.woff2 → iconfont.1735262166812.woff2} +0 -0
- /package/lib/{iconfont.1735197318909.ttf → iconfont.1735262166812.ttf} +0 -0
- /package/lib/{iconfont.1735197318909.woff → iconfont.1735262166812.woff} +0 -0
- /package/lib/{iconfont.1735197318909.woff2 → iconfont.1735262166812.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -48,12 +48,12 @@ function renderLine(h, _vm, $xetable, params) {
|
|
|
48
48
|
/**
|
|
49
49
|
* 渲染列
|
|
50
50
|
*/
|
|
51
|
-
function renderColumn(h, _vm, $
|
|
52
|
-
const { $listeners: tableListeners, fullAllDataRowIdData, afterFullData, tableData, height, columnKey, overflowX, sYOpts, scrollXLoad, scrollYLoad, highlightCurrentRow, showOverflow: allColumnOverflow, isAllOverflow, align: allAlign, currentColumn, cellClassName: allCellClassName, cellStyle, mergeList, spanMethod, radioOpts, checkboxOpts, expandOpts, treeOpts, tooltipOpts, mouseConfig, editConfig, editOpts, editRules, validOpts, editStore, tooltipConfig, rowOpts, columnOpts, mouseOpts, areaOpts, validErrorMaps } = $
|
|
53
|
-
const rowDragOpts = $
|
|
51
|
+
function renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
52
|
+
const { $listeners: tableListeners, fullAllDataRowIdData, afterFullData, tableData, height, columnKey, overflowX, sYOpts, scrollXLoad, scrollYLoad, highlightCurrentRow, showOverflow: allColumnOverflow, isAllOverflow, align: allAlign, currentColumn, cellClassName: allCellClassName, cellStyle, mergeList, spanMethod, radioOpts, checkboxOpts, expandOpts, treeOpts, tooltipOpts, mouseConfig, editConfig, editOpts, editRules, validOpts, editStore, tooltipConfig, rowOpts, columnOpts, mouseOpts, areaOpts, validErrorMaps } = $xeTable;
|
|
53
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
54
54
|
const { disabledMethod: dragDisabledMethod } = rowDragOpts;
|
|
55
55
|
const { selectCellToRow } = areaOpts;
|
|
56
|
-
const cellOpts = $
|
|
56
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
57
57
|
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column;
|
|
58
58
|
const { verticalAlign } = cellOpts;
|
|
59
59
|
const { actived } = editStore;
|
|
@@ -64,8 +64,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
64
64
|
const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : '';
|
|
65
65
|
const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
|
|
66
66
|
const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
67
|
-
const columnIndex = $
|
|
68
|
-
const _columnIndex = $
|
|
67
|
+
const columnIndex = $xeTable.getColumnIndex(column);
|
|
68
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
69
69
|
const isEdit = isEnableConf(editRender);
|
|
70
70
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
71
71
|
const cellOverflow = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow;
|
|
@@ -84,19 +84,19 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
84
84
|
const bindMouseenter = tableListeners['cell-mouseenter'];
|
|
85
85
|
const bindMouseleave = tableListeners['cell-mouseleave'];
|
|
86
86
|
const triggerDblclick = (editRender && editConfig && editOpts.trigger === 'dblclick');
|
|
87
|
-
const params = { $table: $
|
|
88
|
-
let
|
|
87
|
+
const params = { $table: $xeTable, $grid: $xeTable.$xegrid, isEdit: false, seq, rowid, row, rowIndex, $rowIndex, _rowIndex, column, columnIndex, $columnIndex, _columnIndex, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, level: rowLevel, visibleData: afterFullData, data: tableData, items };
|
|
88
|
+
let isRowDragCell = false;
|
|
89
89
|
let isDisabledDrag = false;
|
|
90
90
|
if (rowOpts.drag) {
|
|
91
|
-
|
|
91
|
+
isRowDragCell = rowDragOpts.trigger === 'row' || (column.dragSort && rowDragOpts.trigger === 'cell');
|
|
92
92
|
}
|
|
93
|
-
if (
|
|
93
|
+
if (isRowDragCell) {
|
|
94
94
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(params));
|
|
95
95
|
}
|
|
96
96
|
// hover 进入事件
|
|
97
97
|
if (showTitle || showTooltip || showAllTip || bindMouseenter || tooltipConfig) {
|
|
98
98
|
tdOns.mouseenter = (evnt) => {
|
|
99
|
-
if (isVMScrollProcess($
|
|
99
|
+
if (isVMScrollProcess($xeTable)) {
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
if (showTitle) {
|
|
@@ -104,33 +104,37 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
104
104
|
}
|
|
105
105
|
else if (showTooltip || showAllTip) {
|
|
106
106
|
// 如果配置了显示 tooltip
|
|
107
|
-
$
|
|
107
|
+
$xeTable.triggerBodyTooltipEvent(evnt, params);
|
|
108
108
|
}
|
|
109
109
|
if (bindMouseenter) {
|
|
110
|
-
$
|
|
110
|
+
$xeTable.emitEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, params), evnt);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
// hover 退出事件
|
|
115
115
|
if (showTooltip || showAllTip || bindMouseleave || tooltipConfig) {
|
|
116
116
|
tdOns.mouseleave = (evnt) => {
|
|
117
|
-
if (isVMScrollProcess($
|
|
117
|
+
if (isVMScrollProcess($xeTable)) {
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
if (showTooltip || showAllTip) {
|
|
121
|
-
$
|
|
121
|
+
$xeTable.handleTargetLeaveEvent(evnt);
|
|
122
122
|
}
|
|
123
123
|
if (bindMouseleave) {
|
|
124
|
-
$
|
|
124
|
+
$xeTable.emitEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, params), evnt);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
// 按下事件处理
|
|
129
|
-
if (
|
|
129
|
+
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
130
130
|
tdOns.mousedown = (evnt) => {
|
|
131
|
-
$
|
|
131
|
+
$xeTable.triggerCellMousedownEvent(evnt, params);
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
+
// 拖拽列事件
|
|
135
|
+
if (isRowDragCell) {
|
|
136
|
+
tdOns.mouseup = $xeTable.triggerCellMouseupEvent;
|
|
137
|
+
}
|
|
134
138
|
// 点击事件处理
|
|
135
139
|
if ((rowOpts.isCurrent || highlightCurrentRow) ||
|
|
136
140
|
tableListeners['cell-click'] ||
|
|
@@ -140,13 +144,13 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
140
144
|
(checkboxOpts.trigger === 'row' || (column.type === 'checkbox' && checkboxOpts.trigger === 'cell')) ||
|
|
141
145
|
(treeOpts.trigger === 'row' || (column.treeNode && treeOpts.trigger === 'cell'))) {
|
|
142
146
|
tdOns.click = (evnt) => {
|
|
143
|
-
$
|
|
147
|
+
$xeTable.triggerCellClickEvent(evnt, params);
|
|
144
148
|
};
|
|
145
149
|
}
|
|
146
150
|
// 双击事件处理
|
|
147
151
|
if (triggerDblclick || tableListeners['cell-dblclick']) {
|
|
148
152
|
tdOns.dblclick = (evnt) => {
|
|
149
|
-
$
|
|
153
|
+
$xeTable.triggerCellDblclickEvent(evnt, params);
|
|
150
154
|
};
|
|
151
155
|
}
|
|
152
156
|
// 合并行或列
|
|
@@ -186,7 +190,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
186
190
|
}
|
|
187
191
|
// 如果编辑列开启显示状态
|
|
188
192
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
189
|
-
isDirty = $
|
|
193
|
+
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
190
194
|
}
|
|
191
195
|
const tdVNs = [];
|
|
192
196
|
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
@@ -203,7 +207,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
203
207
|
}
|
|
204
208
|
else {
|
|
205
209
|
// 渲染单元格
|
|
206
|
-
tdVNs.push(...renderLine(h, _vm, $
|
|
210
|
+
tdVNs.push(...renderLine(h, _vm, $xeTable, params), h('div', {
|
|
207
211
|
class: ['vxe-cell', {
|
|
208
212
|
'c--title': showTitle,
|
|
209
213
|
'c--tooltip': showTooltip,
|
|
@@ -213,7 +217,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
213
217
|
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : ''
|
|
214
218
|
},
|
|
215
219
|
attrs: {
|
|
216
|
-
title: showTitle ? $
|
|
220
|
+
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
217
221
|
}
|
|
218
222
|
}, column.renderCell(h, params)));
|
|
219
223
|
if (showValidTip && errorValidItem) {
|
|
@@ -232,7 +236,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
232
236
|
class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || 'normal'}`
|
|
233
237
|
}, [
|
|
234
238
|
validSlot
|
|
235
|
-
? $
|
|
239
|
+
? $xeTable.callSlot(validSlot, validParams, h)
|
|
236
240
|
: [
|
|
237
241
|
h('span', {
|
|
238
242
|
class: 'vxe-cell--valid-error-msg'
|
|
@@ -274,7 +278,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
274
278
|
'col--ellipsis': hasEllipsis,
|
|
275
279
|
'fixed--width': !isAutoCellWidth,
|
|
276
280
|
'fixed--hidden': fixedHiddenColumn,
|
|
277
|
-
'is--drag-cell':
|
|
281
|
+
'is--drag-cell': isRowDragCell,
|
|
278
282
|
'is--drag-disabled': isDisabledDrag,
|
|
279
283
|
'col--dirty': isDirty,
|
|
280
284
|
'col--active': editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === 'row')),
|
|
@@ -500,7 +504,7 @@ export default {
|
|
|
500
504
|
const { tId, $scopedSlots } = $xeTable;
|
|
501
505
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
502
506
|
const { showOverflow: allColumnOverflow, spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
503
|
-
const { tableData, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
507
|
+
const { isGroup, tableData, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
504
508
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
505
509
|
const rowOpts = $xeTable.computeRowOpts;
|
|
506
510
|
const sYOpts = $xeTable.computeSYOpts;
|
|
@@ -547,7 +551,7 @@ export default {
|
|
|
547
551
|
}
|
|
548
552
|
}
|
|
549
553
|
}
|
|
550
|
-
if (!fixedType) {
|
|
554
|
+
if (!fixedType && !isGroup) {
|
|
551
555
|
// 列拖拽
|
|
552
556
|
if (scrollXLoad && dragCol) {
|
|
553
557
|
if (renderColumnList.length > 2) {
|
package/es/table/src/footer.js
CHANGED
|
@@ -220,7 +220,7 @@ export default {
|
|
|
220
220
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
221
221
|
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
222
222
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
223
|
-
const { scrollXLoad, scrollYLoad, scrollbarWidth, dragCol } = tableReactData;
|
|
223
|
+
const { isGroup, scrollXLoad, scrollYLoad, scrollbarWidth, dragCol } = tableReactData;
|
|
224
224
|
let renderColumnList = tableColumn;
|
|
225
225
|
// 如果是使用优化模式
|
|
226
226
|
if (fixedType) {
|
|
@@ -238,7 +238,7 @@ export default {
|
|
|
238
238
|
renderColumnList = visibleColumn;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
if (!fixedType) {
|
|
241
|
+
if (!fixedType && !isGroup) {
|
|
242
242
|
// 列拖拽
|
|
243
243
|
if (scrollXLoad && dragCol) {
|
|
244
244
|
if (renderColumnList.length > 2) {
|
package/es/table/src/header.js
CHANGED
package/es/table/src/methods.js
CHANGED
|
@@ -333,6 +333,19 @@ function getOrderField(_vm, column) {
|
|
|
333
333
|
return cellValue;
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
+
function clearDragStatus($xeTable) {
|
|
337
|
+
const reactData = $xeTable;
|
|
338
|
+
const { dragRow, dragCol } = reactData;
|
|
339
|
+
if (dragRow || dragCol) {
|
|
340
|
+
clearColDropOrigin($xeTable);
|
|
341
|
+
clearRowDropOrigin($xeTable);
|
|
342
|
+
hideDropTip($xeTable);
|
|
343
|
+
reactData.dragRow = null;
|
|
344
|
+
reactData.dragCol = null;
|
|
345
|
+
reactData.isDragColMove = false;
|
|
346
|
+
reactData.isDragRowMove = false;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
336
349
|
function clearRowDropOrigin($xeTable) {
|
|
337
350
|
const el = $xeTable.$el;
|
|
338
351
|
if (el) {
|
|
@@ -5196,6 +5209,10 @@ const Methods = {
|
|
|
5196
5209
|
$xeTable.closeMenu();
|
|
5197
5210
|
}
|
|
5198
5211
|
},
|
|
5212
|
+
triggerCellMouseupEvent() {
|
|
5213
|
+
const $xeTable = this;
|
|
5214
|
+
clearDragStatus($xeTable);
|
|
5215
|
+
},
|
|
5199
5216
|
/**
|
|
5200
5217
|
* 行拖拽
|
|
5201
5218
|
*/
|
|
@@ -5446,12 +5463,7 @@ const Methods = {
|
|
|
5446
5463
|
},
|
|
5447
5464
|
handleCellDragMouseupEvent() {
|
|
5448
5465
|
const $xeTable = this;
|
|
5449
|
-
|
|
5450
|
-
clearRowDropOrigin($xeTable);
|
|
5451
|
-
hideDropTip($xeTable);
|
|
5452
|
-
reactData.dragRow = null;
|
|
5453
|
-
reactData.dragCol = null;
|
|
5454
|
-
reactData.isDragRowMove = false;
|
|
5466
|
+
clearDragStatus($xeTable);
|
|
5455
5467
|
},
|
|
5456
5468
|
/**
|
|
5457
5469
|
* 列拖拽
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
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.12.0-beta.
|
|
2223
|
+
const version = "3.12.0-beta.6";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2808,7 +2808,7 @@ function isNodeElement(elem) {
|
|
|
2808
2808
|
const {
|
|
2809
2809
|
log: log_log
|
|
2810
2810
|
} = core_.VxeUI;
|
|
2811
|
-
const log_version = `table v${"3.12.0-beta.
|
|
2811
|
+
const log_version = `table v${"3.12.0-beta.6"}`;
|
|
2812
2812
|
const warnLog = log_log.create('warn', log_version);
|
|
2813
2813
|
const errLog = log_log.create('error', log_version);
|
|
2814
2814
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5322,6 +5322,22 @@ function getOrderField(_vm, column) {
|
|
|
5322
5322
|
return cellValue;
|
|
5323
5323
|
};
|
|
5324
5324
|
}
|
|
5325
|
+
function clearDragStatus($xeTable) {
|
|
5326
|
+
const reactData = $xeTable;
|
|
5327
|
+
const {
|
|
5328
|
+
dragRow,
|
|
5329
|
+
dragCol
|
|
5330
|
+
} = reactData;
|
|
5331
|
+
if (dragRow || dragCol) {
|
|
5332
|
+
clearColDropOrigin($xeTable);
|
|
5333
|
+
clearRowDropOrigin($xeTable);
|
|
5334
|
+
hideDropTip($xeTable);
|
|
5335
|
+
reactData.dragRow = null;
|
|
5336
|
+
reactData.dragCol = null;
|
|
5337
|
+
reactData.isDragColMove = false;
|
|
5338
|
+
reactData.isDragRowMove = false;
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5325
5341
|
function clearRowDropOrigin($xeTable) {
|
|
5326
5342
|
const el = $xeTable.$el;
|
|
5327
5343
|
if (el) {
|
|
@@ -11054,6 +11070,10 @@ const Methods = {
|
|
|
11054
11070
|
$xeTable.closeMenu();
|
|
11055
11071
|
}
|
|
11056
11072
|
},
|
|
11073
|
+
triggerCellMouseupEvent() {
|
|
11074
|
+
const $xeTable = this;
|
|
11075
|
+
clearDragStatus($xeTable);
|
|
11076
|
+
},
|
|
11057
11077
|
/**
|
|
11058
11078
|
* 行拖拽
|
|
11059
11079
|
*/
|
|
@@ -11346,12 +11366,7 @@ const Methods = {
|
|
|
11346
11366
|
},
|
|
11347
11367
|
handleCellDragMouseupEvent() {
|
|
11348
11368
|
const $xeTable = this;
|
|
11349
|
-
|
|
11350
|
-
clearRowDropOrigin($xeTable);
|
|
11351
|
-
hideDropTip($xeTable);
|
|
11352
|
-
reactData.dragRow = null;
|
|
11353
|
-
reactData.dragCol = null;
|
|
11354
|
-
reactData.isDragRowMove = false;
|
|
11369
|
+
clearDragStatus($xeTable);
|
|
11355
11370
|
},
|
|
11356
11371
|
/**
|
|
11357
11372
|
* 列拖拽
|
|
@@ -13807,7 +13822,7 @@ function renderLine(h, _vm, $xetable, params) {
|
|
|
13807
13822
|
/**
|
|
13808
13823
|
* 渲染列
|
|
13809
13824
|
*/
|
|
13810
|
-
function renderColumn(h, _vm, $
|
|
13825
|
+
function renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
13811
13826
|
const {
|
|
13812
13827
|
$listeners: tableListeners,
|
|
13813
13828
|
fullAllDataRowIdData,
|
|
@@ -13845,15 +13860,15 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
13845
13860
|
mouseOpts,
|
|
13846
13861
|
areaOpts,
|
|
13847
13862
|
validErrorMaps
|
|
13848
|
-
} = $
|
|
13849
|
-
const rowDragOpts = $
|
|
13863
|
+
} = $xeTable;
|
|
13864
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
13850
13865
|
const {
|
|
13851
13866
|
disabledMethod: dragDisabledMethod
|
|
13852
13867
|
} = rowDragOpts;
|
|
13853
13868
|
const {
|
|
13854
13869
|
selectCellToRow
|
|
13855
13870
|
} = areaOpts;
|
|
13856
|
-
const cellOpts = $
|
|
13871
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
13857
13872
|
const {
|
|
13858
13873
|
type,
|
|
13859
13874
|
cellRender,
|
|
@@ -13881,8 +13896,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
13881
13896
|
const compCellClassName = compConf ? compConf.tableCellClassName || compConf.cellClassName : '';
|
|
13882
13897
|
const compCellStyle = compConf ? compConf.tableCellStyle || compConf.cellStyle : '';
|
|
13883
13898
|
const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
13884
|
-
const columnIndex = $
|
|
13885
|
-
const _columnIndex = $
|
|
13899
|
+
const columnIndex = $xeTable.getColumnIndex(column);
|
|
13900
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
13886
13901
|
const isEdit = isEnableConf(editRender);
|
|
13887
13902
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
13888
13903
|
const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
@@ -13904,8 +13919,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
13904
13919
|
const bindMouseleave = tableListeners['cell-mouseleave'];
|
|
13905
13920
|
const triggerDblclick = editRender && editConfig && editOpts.trigger === 'dblclick';
|
|
13906
13921
|
const params = {
|
|
13907
|
-
$table: $
|
|
13908
|
-
$grid: $
|
|
13922
|
+
$table: $xeTable,
|
|
13923
|
+
$grid: $xeTable.$xegrid,
|
|
13909
13924
|
isEdit: false,
|
|
13910
13925
|
seq,
|
|
13911
13926
|
rowid,
|
|
@@ -13925,28 +13940,28 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
13925
13940
|
data: tableData,
|
|
13926
13941
|
items
|
|
13927
13942
|
};
|
|
13928
|
-
let
|
|
13943
|
+
let isRowDragCell = false;
|
|
13929
13944
|
let isDisabledDrag = false;
|
|
13930
13945
|
if (rowOpts.drag) {
|
|
13931
|
-
|
|
13946
|
+
isRowDragCell = rowDragOpts.trigger === 'row' || column.dragSort && rowDragOpts.trigger === 'cell';
|
|
13932
13947
|
}
|
|
13933
|
-
if (
|
|
13948
|
+
if (isRowDragCell) {
|
|
13934
13949
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(params));
|
|
13935
13950
|
}
|
|
13936
13951
|
// hover 进入事件
|
|
13937
13952
|
if (showTitle || showTooltip || showAllTip || bindMouseenter || tooltipConfig) {
|
|
13938
13953
|
tdOns.mouseenter = evnt => {
|
|
13939
|
-
if (isVMScrollProcess($
|
|
13954
|
+
if (isVMScrollProcess($xeTable)) {
|
|
13940
13955
|
return;
|
|
13941
13956
|
}
|
|
13942
13957
|
if (showTitle) {
|
|
13943
13958
|
updateCellTitle(evnt.currentTarget, column);
|
|
13944
13959
|
} else if (showTooltip || showAllTip) {
|
|
13945
13960
|
// 如果配置了显示 tooltip
|
|
13946
|
-
$
|
|
13961
|
+
$xeTable.triggerBodyTooltipEvent(evnt, params);
|
|
13947
13962
|
}
|
|
13948
13963
|
if (bindMouseenter) {
|
|
13949
|
-
$
|
|
13964
|
+
$xeTable.emitEvent('cell-mouseenter', Object.assign({
|
|
13950
13965
|
cell: evnt.currentTarget
|
|
13951
13966
|
}, params), evnt);
|
|
13952
13967
|
}
|
|
@@ -13955,35 +13970,39 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
13955
13970
|
// hover 退出事件
|
|
13956
13971
|
if (showTooltip || showAllTip || bindMouseleave || tooltipConfig) {
|
|
13957
13972
|
tdOns.mouseleave = evnt => {
|
|
13958
|
-
if (isVMScrollProcess($
|
|
13973
|
+
if (isVMScrollProcess($xeTable)) {
|
|
13959
13974
|
return;
|
|
13960
13975
|
}
|
|
13961
13976
|
if (showTooltip || showAllTip) {
|
|
13962
|
-
$
|
|
13977
|
+
$xeTable.handleTargetLeaveEvent(evnt);
|
|
13963
13978
|
}
|
|
13964
13979
|
if (bindMouseleave) {
|
|
13965
|
-
$
|
|
13980
|
+
$xeTable.emitEvent('cell-mouseleave', Object.assign({
|
|
13966
13981
|
cell: evnt.currentTarget
|
|
13967
13982
|
}, params), evnt);
|
|
13968
13983
|
}
|
|
13969
13984
|
};
|
|
13970
13985
|
}
|
|
13971
13986
|
// 按下事件处理
|
|
13972
|
-
if (
|
|
13987
|
+
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
13973
13988
|
tdOns.mousedown = evnt => {
|
|
13974
|
-
$
|
|
13989
|
+
$xeTable.triggerCellMousedownEvent(evnt, params);
|
|
13975
13990
|
};
|
|
13976
13991
|
}
|
|
13992
|
+
// 拖拽列事件
|
|
13993
|
+
if (isRowDragCell) {
|
|
13994
|
+
tdOns.mouseup = $xeTable.triggerCellMouseupEvent;
|
|
13995
|
+
}
|
|
13977
13996
|
// 点击事件处理
|
|
13978
13997
|
if (rowOpts.isCurrent || highlightCurrentRow || tableListeners['cell-click'] || editRender && editConfig || expandOpts.trigger === 'row' || expandOpts.trigger === 'cell' || radioOpts.trigger === 'row' || column.type === 'radio' && radioOpts.trigger === 'cell' || checkboxOpts.trigger === 'row' || column.type === 'checkbox' && checkboxOpts.trigger === 'cell' || treeOpts.trigger === 'row' || column.treeNode && treeOpts.trigger === 'cell') {
|
|
13979
13998
|
tdOns.click = evnt => {
|
|
13980
|
-
$
|
|
13999
|
+
$xeTable.triggerCellClickEvent(evnt, params);
|
|
13981
14000
|
};
|
|
13982
14001
|
}
|
|
13983
14002
|
// 双击事件处理
|
|
13984
14003
|
if (triggerDblclick || tableListeners['cell-dblclick']) {
|
|
13985
14004
|
tdOns.dblclick = evnt => {
|
|
13986
|
-
$
|
|
14005
|
+
$xeTable.triggerCellDblclickEvent(evnt, params);
|
|
13987
14006
|
};
|
|
13988
14007
|
}
|
|
13989
14008
|
// 合并行或列
|
|
@@ -14028,7 +14047,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14028
14047
|
}
|
|
14029
14048
|
// 如果编辑列开启显示状态
|
|
14030
14049
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
14031
|
-
isDirty = $
|
|
14050
|
+
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
14032
14051
|
}
|
|
14033
14052
|
const tdVNs = [];
|
|
14034
14053
|
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
@@ -14044,7 +14063,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14044
14063
|
}));
|
|
14045
14064
|
} else {
|
|
14046
14065
|
// 渲染单元格
|
|
14047
|
-
tdVNs.push(...renderLine(h, _vm, $
|
|
14066
|
+
tdVNs.push(...renderLine(h, _vm, $xeTable, params), h('div', {
|
|
14048
14067
|
class: ['vxe-cell', {
|
|
14049
14068
|
'c--title': showTitle,
|
|
14050
14069
|
'c--tooltip': showTooltip,
|
|
@@ -14054,7 +14073,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14054
14073
|
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : ''
|
|
14055
14074
|
},
|
|
14056
14075
|
attrs: {
|
|
14057
|
-
title: showTitle ? $
|
|
14076
|
+
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
14058
14077
|
}
|
|
14059
14078
|
}, column.renderCell(h, params)));
|
|
14060
14079
|
if (showValidTip && errorValidItem) {
|
|
@@ -14072,7 +14091,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14072
14091
|
} : null
|
|
14073
14092
|
}, [h('div', {
|
|
14074
14093
|
class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || 'normal'}`
|
|
14075
|
-
}, [validSlot ? $
|
|
14094
|
+
}, [validSlot ? $xeTable.callSlot(validSlot, validParams, h) : [h('span', {
|
|
14076
14095
|
class: 'vxe-cell--valid-error-msg'
|
|
14077
14096
|
}, errorValidItem.content)]])]));
|
|
14078
14097
|
}
|
|
@@ -14104,7 +14123,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14104
14123
|
'col--ellipsis': hasEllipsis,
|
|
14105
14124
|
'fixed--width': !isAutoCellWidth,
|
|
14106
14125
|
'fixed--hidden': fixedHiddenColumn,
|
|
14107
|
-
'is--drag-cell':
|
|
14126
|
+
'is--drag-cell': isRowDragCell,
|
|
14108
14127
|
'is--drag-disabled': isDisabledDrag,
|
|
14109
14128
|
'col--dirty': isDirty,
|
|
14110
14129
|
'col--active': editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row'),
|
|
@@ -14392,6 +14411,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14392
14411
|
mouseConfig
|
|
14393
14412
|
} = tableProps;
|
|
14394
14413
|
const {
|
|
14414
|
+
isGroup,
|
|
14395
14415
|
tableData,
|
|
14396
14416
|
scrollXLoad,
|
|
14397
14417
|
scrollYLoad,
|
|
@@ -14448,7 +14468,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14448
14468
|
}
|
|
14449
14469
|
}
|
|
14450
14470
|
}
|
|
14451
|
-
if (!fixedType) {
|
|
14471
|
+
if (!fixedType && !isGroup) {
|
|
14452
14472
|
// 列拖拽
|
|
14453
14473
|
if (scrollXLoad && dragCol) {
|
|
14454
14474
|
if (renderColumnList.length > 2) {
|
|
@@ -15084,7 +15104,7 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
15084
15104
|
}
|
|
15085
15105
|
renderHeaderList = [renderColumnList];
|
|
15086
15106
|
}
|
|
15087
|
-
if (!fixedType) {
|
|
15107
|
+
if (!fixedType && !isGroup) {
|
|
15088
15108
|
// 列拖拽
|
|
15089
15109
|
if (scrollXLoad && dragCol) {
|
|
15090
15110
|
if (renderColumnList.length > 2) {
|
|
@@ -15604,6 +15624,7 @@ function footer_renderHeads(h, _vm, renderColumnList) {
|
|
|
15604
15624
|
fullColumnIdData
|
|
15605
15625
|
} = tableInternalData;
|
|
15606
15626
|
const {
|
|
15627
|
+
isGroup,
|
|
15607
15628
|
scrollXLoad,
|
|
15608
15629
|
scrollYLoad,
|
|
15609
15630
|
scrollbarWidth,
|
|
@@ -15624,7 +15645,7 @@ function footer_renderHeads(h, _vm, renderColumnList) {
|
|
|
15624
15645
|
renderColumnList = visibleColumn;
|
|
15625
15646
|
}
|
|
15626
15647
|
}
|
|
15627
|
-
if (!fixedType) {
|
|
15648
|
+
if (!fixedType && !isGroup) {
|
|
15628
15649
|
// 列拖拽
|
|
15629
15650
|
if (scrollXLoad && dragCol) {
|
|
15630
15651
|
if (renderColumnList.length > 2) {
|