vxe-table 4.11.13 → 4.11.15
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/locale/lang/ar-EG.js +1 -0
- package/es/locale/lang/de-DE.js +1 -0
- package/es/locale/lang/en-US.js +11 -10
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/fr-FR.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/hy-AM.js +1 -0
- package/es/locale/lang/id-ID.js +1 -0
- package/es/locale/lang/it-IT.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/nb-NO.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/th-TH.js +1 -0
- package/es/locale/lang/ug-CN.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +18 -16
- package/es/table/src/cell.js +4 -3
- package/es/table/src/columnInfo.js +0 -3
- package/es/table/src/table.js +137 -135
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +166 -161
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +11 -10
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +11 -10
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/hy-AM.js +1 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +18 -16
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/cell.js +5 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +0 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +140 -137
- 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 +2 -2
- package/packages/locale/lang/ar-EG.ts +1 -0
- package/packages/locale/lang/de-DE.ts +1 -0
- package/packages/locale/lang/en-US.ts +11 -10
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/fr-FR.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/hy-AM.ts +1 -0
- package/packages/locale/lang/id-ID.ts +1 -0
- package/packages/locale/lang/it-IT.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/nb-NO.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/th-TH.ts +1 -0
- package/packages/locale/lang/ug-CN.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/panel.ts +18 -16
- package/packages/table/src/cell.ts +4 -3
- package/packages/table/src/columnInfo.ts +0 -3
- package/packages/table/src/table.ts +137 -135
- /package/es/{iconfont.1740561134294.ttf → iconfont.1740723830079.ttf} +0 -0
- /package/es/{iconfont.1740561134294.woff → iconfont.1740723830079.woff} +0 -0
- /package/es/{iconfont.1740561134294.woff2 → iconfont.1740723830079.woff2} +0 -0
- /package/lib/{iconfont.1740561134294.ttf → iconfont.1740723830079.ttf} +0 -0
- /package/lib/{iconfont.1740561134294.woff → iconfont.1740723830079.woff} +0 -0
- /package/lib/{iconfont.1740561134294.woff2 → iconfont.1740723830079.woff2} +0 -0
|
@@ -247,12 +247,13 @@ export default defineComponent({
|
|
|
247
247
|
if (prevDragCol && dragCol) {
|
|
248
248
|
// 判断是否有拖动
|
|
249
249
|
if (prevDragCol !== dragCol) {
|
|
250
|
-
const
|
|
250
|
+
const dragColumn = dragCol;
|
|
251
251
|
const newColumn = prevDragCol;
|
|
252
252
|
Promise.resolve(dragEndMethod
|
|
253
253
|
? dragEndMethod({
|
|
254
|
-
oldColumn,
|
|
254
|
+
oldColumn: dragColumn,
|
|
255
255
|
newColumn,
|
|
256
|
+
dragColumn,
|
|
256
257
|
dragPos: prevDragPos,
|
|
257
258
|
dragToChild: !!prevDragToChild,
|
|
258
259
|
offsetIndex: dragOffsetIndex
|
|
@@ -264,13 +265,13 @@ export default defineComponent({
|
|
|
264
265
|
let oafIndex = -1;
|
|
265
266
|
let nafIndex = -1;
|
|
266
267
|
const oldAllMaps = {};
|
|
267
|
-
XEUtils.eachTree([
|
|
268
|
+
XEUtils.eachTree([dragColumn], column => {
|
|
268
269
|
oldAllMaps[column.id] = column;
|
|
269
270
|
});
|
|
270
271
|
let isSelfToChildStatus = false;
|
|
271
272
|
// 只有实时拖拽支持跨层级
|
|
272
273
|
if (immediate) {
|
|
273
|
-
if (
|
|
274
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
274
275
|
// 子到子
|
|
275
276
|
if (!isCrossDrag) {
|
|
276
277
|
return;
|
|
@@ -288,7 +289,7 @@ export default defineComponent({
|
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
|
-
else if (
|
|
292
|
+
else if (dragColumn.parentId) {
|
|
292
293
|
// 子到根
|
|
293
294
|
if (!isCrossDrag) {
|
|
294
295
|
return;
|
|
@@ -315,17 +316,17 @@ export default defineComponent({
|
|
|
315
316
|
else {
|
|
316
317
|
// 根到根
|
|
317
318
|
}
|
|
318
|
-
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id ===
|
|
319
|
+
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id === dragColumn.id);
|
|
319
320
|
// 改变层级
|
|
320
321
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
321
322
|
if (oldewMatchRest) {
|
|
322
323
|
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
323
|
-
const childList =
|
|
324
|
+
const childList = dragColumn.children || [];
|
|
324
325
|
childList.forEach(column => {
|
|
325
|
-
column.parentId =
|
|
326
|
+
column.parentId = dragColumn.parentId;
|
|
326
327
|
});
|
|
327
328
|
oCols.splice(oIndex, 1, ...childList);
|
|
328
|
-
|
|
329
|
+
dragColumn.children = [];
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
332
|
else {
|
|
@@ -342,12 +343,12 @@ export default defineComponent({
|
|
|
342
343
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
343
344
|
// 转子级
|
|
344
345
|
if ((isCrossDrag && isToChildDrag) && prevDragToChild) {
|
|
345
|
-
|
|
346
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
346
|
+
dragColumn.parentId = newColumn.id;
|
|
347
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
347
348
|
}
|
|
348
349
|
else {
|
|
349
|
-
|
|
350
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
350
|
+
dragColumn.parentId = newColumn.parentId;
|
|
351
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
|
|
351
352
|
}
|
|
352
353
|
if (!nParent) {
|
|
353
354
|
nafIndex = nIndex;
|
|
@@ -361,10 +362,10 @@ export default defineComponent({
|
|
|
361
362
|
});
|
|
362
363
|
}
|
|
363
364
|
else {
|
|
364
|
-
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id ===
|
|
365
|
+
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === dragColumn.id);
|
|
365
366
|
customColumnList.splice(oafIndex, 1);
|
|
366
367
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
367
|
-
customColumnList.splice(nafIndex + dragOffsetIndex, 0,
|
|
368
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
368
369
|
}
|
|
369
370
|
reactData.isDragColMove = true;
|
|
370
371
|
if (mouseConfig) {
|
|
@@ -377,8 +378,9 @@ export default defineComponent({
|
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
380
|
$xeTable.dispatchEvent('column-dragend', {
|
|
380
|
-
oldColumn,
|
|
381
|
+
oldColumn: dragColumn,
|
|
381
382
|
newColumn,
|
|
383
|
+
dragColumn,
|
|
382
384
|
dragPos: prevDragPos,
|
|
383
385
|
offsetIndex: dragOffsetIndex,
|
|
384
386
|
_index: {
|
package/es/table/src/cell.js
CHANGED
|
@@ -75,15 +75,16 @@ function renderCellBaseVNs(params, content) {
|
|
|
75
75
|
const { dragSort } = column;
|
|
76
76
|
const tableProps = $table.props;
|
|
77
77
|
const { treeConfig, dragConfig } = tableProps;
|
|
78
|
-
const { computeRowOpts, computeRowDragOpts } = $table.getComputeMaps();
|
|
78
|
+
const { computeRowOpts, computeRowDragOpts, computeTreeOpts } = $table.getComputeMaps();
|
|
79
79
|
const rowOpts = computeRowOpts.value;
|
|
80
80
|
const rowDragOpts = computeRowDragOpts.value;
|
|
81
|
+
const treeOpts = computeTreeOpts.value;
|
|
81
82
|
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
|
|
82
83
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
83
84
|
const vns = XEUtils.isArray(content) ? content : [content];
|
|
84
85
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
85
86
|
if (treeConfig) {
|
|
86
|
-
if (isPeerDrag || isCrossDrag || !level) {
|
|
87
|
+
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
87
88
|
vns.unshift(renderCellDragIcon(params));
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -247,7 +248,7 @@ function renderCellHandle(params) {
|
|
|
247
248
|
case 'html':
|
|
248
249
|
return treeNode ? Cell.renderTreeHTMLCell(params) : Cell.renderHTMLCell(params);
|
|
249
250
|
}
|
|
250
|
-
if (editConfig && editRender) {
|
|
251
|
+
if (isEnableConf(editConfig) && editRender) {
|
|
251
252
|
return editOpts.mode === 'cell' ? (treeNode ? Cell.renderTreeCellEdit(params) : Cell.renderCellEdit(params)) : (treeNode ? Cell.renderTreeRowEdit(params) : Cell.renderRowEdit(params));
|
|
252
253
|
}
|
|
253
254
|
return treeNode ? Cell.renderTreeCell(params) : Cell.renderDefaultCell(params);
|
|
@@ -22,9 +22,6 @@ export class ColumnInfo {
|
|
|
22
22
|
if (XEUtils.isBoolean(_vm.editRender) || (_vm.editRender && !XEUtils.isObject(_vm.editRender))) {
|
|
23
23
|
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
24
24
|
}
|
|
25
|
-
if (_vm.cellRender && _vm.editRender) {
|
|
26
|
-
warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render']);
|
|
27
|
-
}
|
|
28
25
|
if (_vm.type === 'expand') {
|
|
29
26
|
const { treeConfig } = tableProps;
|
|
30
27
|
const { computeTreeOpts } = $xeTable.getComputeMaps();
|
package/es/table/src/table.js
CHANGED
|
@@ -250,6 +250,12 @@ export default defineComponent({
|
|
|
250
250
|
mini: 36
|
|
251
251
|
},
|
|
252
252
|
scrollVMLoading: false,
|
|
253
|
+
scrollYHeight: 0,
|
|
254
|
+
scrollYTop: 0,
|
|
255
|
+
isScrollYBig: false,
|
|
256
|
+
scrollXLeft: 0,
|
|
257
|
+
scrollXWidth: 0,
|
|
258
|
+
isScrollXBig: false,
|
|
253
259
|
rowExpandHeightFlag: 1,
|
|
254
260
|
calcCellHeightFlag: 1,
|
|
255
261
|
resizeHeightFlag: 1,
|
|
@@ -1159,7 +1165,7 @@ export default defineComponent({
|
|
|
1159
1165
|
let hasFixed;
|
|
1160
1166
|
const handleFunc = (column, index, items, path, parentColumn) => {
|
|
1161
1167
|
const { id: colid, field, fixed, type, treeNode } = column;
|
|
1162
|
-
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0 };
|
|
1168
|
+
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
1163
1169
|
if (field) {
|
|
1164
1170
|
if (fullColumnFieldData[field]) {
|
|
1165
1171
|
errLog('vxe.error.colRepet', ['field', field]);
|
|
@@ -7992,6 +7998,7 @@ export default defineComponent({
|
|
|
7992
7998
|
const dragParams = {
|
|
7993
7999
|
oldRow: dragRow,
|
|
7994
8000
|
newRow: prevDragRow,
|
|
8001
|
+
dragRow,
|
|
7995
8002
|
dragPos: prevDragPos,
|
|
7996
8003
|
dragToChild: !!prevDragToChild,
|
|
7997
8004
|
offsetIndex: dragOffsetIndex
|
|
@@ -8132,6 +8139,7 @@ export default defineComponent({
|
|
|
8132
8139
|
dispatchEvent('row-dragend', {
|
|
8133
8140
|
oldRow: dragRow,
|
|
8134
8141
|
newRow: prevDragRow,
|
|
8142
|
+
dragRow,
|
|
8135
8143
|
dragPos: prevDragPos,
|
|
8136
8144
|
dragToChild: isDragToChildFlag,
|
|
8137
8145
|
offsetIndex: dragOffsetIndex,
|
|
@@ -8274,11 +8282,12 @@ export default defineComponent({
|
|
|
8274
8282
|
if (prevDragCol && dragCol) {
|
|
8275
8283
|
// 判断是否有拖动
|
|
8276
8284
|
if (prevDragCol !== dragCol) {
|
|
8277
|
-
const
|
|
8285
|
+
const dragColumn = dragCol;
|
|
8278
8286
|
const newColumn = prevDragCol;
|
|
8279
8287
|
const dragParams = {
|
|
8280
|
-
oldColumn,
|
|
8288
|
+
oldColumn: dragColumn,
|
|
8281
8289
|
newColumn,
|
|
8290
|
+
dragColumn,
|
|
8282
8291
|
dragPos: prevDragPos,
|
|
8283
8292
|
dragToChild: !!prevDragToChild,
|
|
8284
8293
|
offsetIndex: dragOffsetIndex
|
|
@@ -8291,14 +8300,14 @@ export default defineComponent({
|
|
|
8291
8300
|
let oafIndex = -1;
|
|
8292
8301
|
let nafIndex = -1;
|
|
8293
8302
|
const oldAllMaps = {};
|
|
8294
|
-
XEUtils.eachTree([
|
|
8303
|
+
XEUtils.eachTree([dragColumn], column => {
|
|
8295
8304
|
oldAllMaps[column.id] = column;
|
|
8296
8305
|
});
|
|
8297
8306
|
let isSelfToChildStatus = false;
|
|
8298
|
-
if (
|
|
8307
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
8299
8308
|
// 子到子
|
|
8300
8309
|
if (isPeerDrag && !isCrossDrag) {
|
|
8301
|
-
if (
|
|
8310
|
+
if (dragColumn.parentId !== newColumn.parentId) {
|
|
8302
8311
|
// 非同级
|
|
8303
8312
|
return;
|
|
8304
8313
|
}
|
|
@@ -8321,7 +8330,7 @@ export default defineComponent({
|
|
|
8321
8330
|
}
|
|
8322
8331
|
}
|
|
8323
8332
|
}
|
|
8324
|
-
else if (
|
|
8333
|
+
else if (dragColumn.parentId) {
|
|
8325
8334
|
// 子到根
|
|
8326
8335
|
if (!isCrossDrag) {
|
|
8327
8336
|
return;
|
|
@@ -8348,17 +8357,17 @@ export default defineComponent({
|
|
|
8348
8357
|
else {
|
|
8349
8358
|
// 根到根
|
|
8350
8359
|
}
|
|
8351
|
-
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id ===
|
|
8360
|
+
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id === dragColumn.id);
|
|
8352
8361
|
// 改变层级
|
|
8353
8362
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
8354
8363
|
if (oldewMatchRest) {
|
|
8355
8364
|
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
8356
|
-
const childList =
|
|
8365
|
+
const childList = dragColumn.children || [];
|
|
8357
8366
|
childList.forEach(column => {
|
|
8358
|
-
column.parentId =
|
|
8367
|
+
column.parentId = dragColumn.parentId;
|
|
8359
8368
|
});
|
|
8360
8369
|
oCols.splice(oIndex, 1, ...childList);
|
|
8361
|
-
|
|
8370
|
+
dragColumn.children = [];
|
|
8362
8371
|
}
|
|
8363
8372
|
}
|
|
8364
8373
|
else {
|
|
@@ -8375,12 +8384,12 @@ export default defineComponent({
|
|
|
8375
8384
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
8376
8385
|
// 转子级
|
|
8377
8386
|
if ((isCrossDrag && isToChildDrag) && isDragToChildFlag) {
|
|
8378
|
-
|
|
8379
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
8387
|
+
dragColumn.parentId = newColumn.id;
|
|
8388
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
8380
8389
|
}
|
|
8381
8390
|
else {
|
|
8382
|
-
|
|
8383
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
8391
|
+
dragColumn.parentId = newColumn.parentId;
|
|
8392
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
|
|
8384
8393
|
}
|
|
8385
8394
|
if (!nParent) {
|
|
8386
8395
|
nafIndex = nIndex;
|
|
@@ -8403,8 +8412,9 @@ export default defineComponent({
|
|
|
8403
8412
|
}
|
|
8404
8413
|
}
|
|
8405
8414
|
dispatchEvent('column-dragend', {
|
|
8406
|
-
oldColumn,
|
|
8415
|
+
oldColumn: dragColumn,
|
|
8407
8416
|
newColumn,
|
|
8417
|
+
dragColumn,
|
|
8408
8418
|
dragPos: prevDragPos,
|
|
8409
8419
|
dragToChild: isDragToChildFlag,
|
|
8410
8420
|
offsetIndex: dragOffsetIndex,
|
|
@@ -8809,7 +8819,7 @@ export default defineComponent({
|
|
|
8809
8819
|
});
|
|
8810
8820
|
},
|
|
8811
8821
|
triggerBodyWheelEvent(evnt) {
|
|
8812
|
-
const { target, deltaY, deltaX } = evnt;
|
|
8822
|
+
const { target, deltaY, deltaX, shiftKey } = evnt;
|
|
8813
8823
|
if (target && /^textarea$/i.test(target.tagName)) {
|
|
8814
8824
|
return;
|
|
8815
8825
|
}
|
|
@@ -8840,8 +8850,8 @@ export default defineComponent({
|
|
|
8840
8850
|
return;
|
|
8841
8851
|
}
|
|
8842
8852
|
const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
|
|
8843
|
-
const deltaTop = Math.ceil(deltaY * wheelSpeed);
|
|
8844
|
-
const deltaLeft = Math.ceil(deltaX * wheelSpeed);
|
|
8853
|
+
const deltaTop = Math.ceil((shiftKey ? deltaX : deltaY) * wheelSpeed);
|
|
8854
|
+
const deltaLeft = Math.ceil((shiftKey ? deltaY : deltaX) * wheelSpeed);
|
|
8845
8855
|
const isTopWheel = deltaTop < 0;
|
|
8846
8856
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
8847
8857
|
// 如果滚动位置已经是顶部或底部,则不需要触发
|
|
@@ -9977,7 +9987,7 @@ export default defineComponent({
|
|
|
9977
9987
|
initTpImg();
|
|
9978
9988
|
}
|
|
9979
9989
|
nextTick(() => {
|
|
9980
|
-
const { data, treeConfig, showOverflow } = props;
|
|
9990
|
+
const { data, exportConfig, importConfig, treeConfig, showOverflow } = props;
|
|
9981
9991
|
const { scrollXStore, scrollYStore } = internalData;
|
|
9982
9992
|
const sYOpts = computeSYOpts.value;
|
|
9983
9993
|
const editOpts = computeEditOpts.value;
|
|
@@ -9986,129 +9996,121 @@ export default defineComponent({
|
|
|
9986
9996
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
9987
9997
|
const expandOpts = computeExpandOpts.value;
|
|
9988
9998
|
const rowOpts = computeRowOpts.value;
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
}
|
|
9996
|
-
if (props.columnKey) {
|
|
9997
|
-
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
9998
|
-
}
|
|
9999
|
-
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
10000
|
-
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
10001
|
-
}
|
|
10002
|
-
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
10003
|
-
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
10004
|
-
}
|
|
10005
|
-
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
10006
|
-
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
10007
|
-
}
|
|
10008
|
-
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
10009
|
-
warnLog('vxe.error.noTree', ['stripe']);
|
|
10010
|
-
}
|
|
10011
|
-
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
10012
|
-
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
10013
|
-
}
|
|
10014
|
-
if (rowOpts.height) {
|
|
10015
|
-
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
10016
|
-
}
|
|
10017
|
-
// if (props.highlightCurrentRow) {
|
|
10018
|
-
// warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent'])
|
|
10019
|
-
// }
|
|
10020
|
-
// if (props.highlightHoverRow) {
|
|
10021
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover'])
|
|
10022
|
-
// }
|
|
10023
|
-
// if (props.highlightCurrentColumn) {
|
|
10024
|
-
// warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent'])
|
|
10025
|
-
// }
|
|
10026
|
-
// if (props.highlightHoverColumn) {
|
|
10027
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover'])
|
|
10028
|
-
// }
|
|
10029
|
-
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
10030
|
-
const { exportConfig, importConfig } = props;
|
|
10031
|
-
const exportOpts = computeExportOpts.value;
|
|
10032
|
-
const importOpts = computeImportOpts.value;
|
|
10033
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
10034
|
-
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
10035
|
-
}
|
|
10036
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
10037
|
-
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
10038
|
-
}
|
|
9999
|
+
const customOpts = computeCustomOpts.value;
|
|
10000
|
+
const mouseOpts = computeMouseOpts.value;
|
|
10001
|
+
const exportOpts = computeExportOpts.value;
|
|
10002
|
+
const importOpts = computeImportOpts.value;
|
|
10003
|
+
if (props.rowId) {
|
|
10004
|
+
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
10039
10005
|
}
|
|
10040
|
-
if (
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
}
|
|
10079
|
-
|
|
10080
|
-
|
|
10006
|
+
if (props.rowKey) {
|
|
10007
|
+
warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey']);
|
|
10008
|
+
}
|
|
10009
|
+
if (props.columnKey) {
|
|
10010
|
+
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
10011
|
+
}
|
|
10012
|
+
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
10013
|
+
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
10014
|
+
}
|
|
10015
|
+
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
10016
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
10017
|
+
}
|
|
10018
|
+
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
10019
|
+
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
10020
|
+
}
|
|
10021
|
+
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
10022
|
+
warnLog('vxe.error.noTree', ['stripe']);
|
|
10023
|
+
}
|
|
10024
|
+
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
10025
|
+
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
10026
|
+
}
|
|
10027
|
+
if (rowOpts.height) {
|
|
10028
|
+
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
10029
|
+
}
|
|
10030
|
+
if (props.highlightCurrentRow) {
|
|
10031
|
+
warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent']);
|
|
10032
|
+
}
|
|
10033
|
+
if (props.highlightHoverRow) {
|
|
10034
|
+
warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover']);
|
|
10035
|
+
}
|
|
10036
|
+
if (props.highlightCurrentColumn) {
|
|
10037
|
+
warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent']);
|
|
10038
|
+
}
|
|
10039
|
+
if (props.highlightHoverColumn) {
|
|
10040
|
+
warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover']);
|
|
10041
|
+
}
|
|
10042
|
+
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
10043
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
10044
|
+
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
10045
|
+
}
|
|
10046
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
10047
|
+
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
10048
|
+
}
|
|
10049
|
+
if (!props.id) {
|
|
10050
|
+
if ((props.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
10051
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
10081
10052
|
}
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10053
|
+
}
|
|
10054
|
+
if (props.treeConfig && checkboxOpts.range) {
|
|
10055
|
+
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
10056
|
+
}
|
|
10057
|
+
if (rowOpts.height && !props.showOverflow) {
|
|
10058
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
10059
|
+
}
|
|
10060
|
+
if (!$xeTable.handleMousedownCellAreaEvent) {
|
|
10061
|
+
if (props.areaConfig) {
|
|
10062
|
+
warnLog('vxe.error.notProp', ['area-config']);
|
|
10087
10063
|
}
|
|
10088
|
-
if (props.
|
|
10089
|
-
warnLog('vxe.error.
|
|
10064
|
+
if (props.clipConfig) {
|
|
10065
|
+
warnLog('vxe.error.notProp', ['clip-config']);
|
|
10090
10066
|
}
|
|
10091
|
-
if (props.
|
|
10092
|
-
|
|
10067
|
+
if (props.fnrConfig) {
|
|
10068
|
+
warnLog('vxe.error.notProp', ['fnr-config']);
|
|
10093
10069
|
}
|
|
10094
|
-
if (
|
|
10095
|
-
|
|
10070
|
+
if (mouseOpts.area) {
|
|
10071
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
10072
|
+
return;
|
|
10096
10073
|
}
|
|
10097
10074
|
}
|
|
10075
|
+
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
10076
|
+
warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
|
|
10077
|
+
}
|
|
10078
|
+
if (props.dragConfig) {
|
|
10079
|
+
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
10080
|
+
}
|
|
10081
|
+
if (props.treeConfig && treeOpts.children) {
|
|
10082
|
+
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
10083
|
+
}
|
|
10084
|
+
if (props.treeConfig && treeOpts.line) {
|
|
10085
|
+
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine']);
|
|
10086
|
+
}
|
|
10087
|
+
if (mouseOpts.area && mouseOpts.selected) {
|
|
10088
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
|
|
10089
|
+
}
|
|
10090
|
+
if (mouseOpts.area && (props.treeConfig && !treeOpts.transform)) {
|
|
10091
|
+
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
10092
|
+
}
|
|
10093
|
+
if (props.editConfig && editOpts.activeMethod) {
|
|
10094
|
+
warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod']);
|
|
10095
|
+
}
|
|
10096
|
+
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
10097
|
+
errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey']);
|
|
10098
|
+
}
|
|
10099
|
+
if (checkboxOpts.halfField) {
|
|
10100
|
+
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|
|
10101
|
+
}
|
|
10098
10102
|
// 检查是否有安装需要的模块
|
|
10099
|
-
if (
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
errLog('vxe.error.reqModule', ['Export']);
|
|
10111
|
-
}
|
|
10103
|
+
if (props.editConfig && !$xeTable.insert) {
|
|
10104
|
+
errLog('vxe.error.reqModule', ['Edit']);
|
|
10105
|
+
}
|
|
10106
|
+
if (props.editRules && !$xeTable.validate) {
|
|
10107
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
10108
|
+
}
|
|
10109
|
+
if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.handleCellMousedownEvent) {
|
|
10110
|
+
errLog('vxe.error.reqModule', ['Keyboard']);
|
|
10111
|
+
}
|
|
10112
|
+
if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
|
|
10113
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
10112
10114
|
}
|
|
10113
10115
|
Object.assign(scrollYStore, {
|
|
10114
10116
|
startIndex: 0,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED