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
package/lib/index.umd.js
CHANGED
|
@@ -3051,7 +3051,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3051
3051
|
;// ./packages/ui/index.ts
|
|
3052
3052
|
|
|
3053
3053
|
|
|
3054
|
-
const version = "4.11.
|
|
3054
|
+
const version = "4.11.15";
|
|
3055
3055
|
core_.VxeUI.version = version;
|
|
3056
3056
|
core_.VxeUI.tableVersion = version;
|
|
3057
3057
|
core_.VxeUI.setConfig({
|
|
@@ -3499,7 +3499,7 @@ var es_iterator_some = __webpack_require__(3579);
|
|
|
3499
3499
|
const {
|
|
3500
3500
|
log: log_log
|
|
3501
3501
|
} = core_.VxeUI;
|
|
3502
|
-
const log_version = `table v${"4.11.
|
|
3502
|
+
const log_version = `table v${"4.11.15"}`;
|
|
3503
3503
|
const warnLog = log_log.create('warn', log_version);
|
|
3504
3504
|
const errLog = log_log.create('error', log_version);
|
|
3505
3505
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3537,9 +3537,6 @@ class ColumnInfo {
|
|
|
3537
3537
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.editRender) || _vm.editRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(_vm.editRender)) {
|
|
3538
3538
|
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
3539
3539
|
}
|
|
3540
|
-
if (_vm.cellRender && _vm.editRender) {
|
|
3541
|
-
warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render']);
|
|
3542
|
-
}
|
|
3543
3540
|
if (_vm.type === 'expand') {
|
|
3544
3541
|
const {
|
|
3545
3542
|
treeConfig
|
|
@@ -4648,10 +4645,12 @@ function renderCellBaseVNs(params, content) {
|
|
|
4648
4645
|
} = tableProps;
|
|
4649
4646
|
const {
|
|
4650
4647
|
computeRowOpts,
|
|
4651
|
-
computeRowDragOpts
|
|
4648
|
+
computeRowDragOpts,
|
|
4649
|
+
computeTreeOpts
|
|
4652
4650
|
} = $table.getComputeMaps();
|
|
4653
4651
|
const rowOpts = computeRowOpts.value;
|
|
4654
4652
|
const rowDragOpts = computeRowDragOpts.value;
|
|
4653
|
+
const treeOpts = computeTreeOpts.value;
|
|
4655
4654
|
const {
|
|
4656
4655
|
showIcon,
|
|
4657
4656
|
isPeerDrag,
|
|
@@ -4662,7 +4661,7 @@ function renderCellBaseVNs(params, content) {
|
|
|
4662
4661
|
const vns = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content];
|
|
4663
4662
|
if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
|
|
4664
4663
|
if (treeConfig) {
|
|
4665
|
-
if (isPeerDrag || isCrossDrag || !level) {
|
|
4664
|
+
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
4666
4665
|
vns.unshift(renderCellDragIcon(params));
|
|
4667
4666
|
}
|
|
4668
4667
|
} else {
|
|
@@ -4874,7 +4873,7 @@ function renderCellHandle(params) {
|
|
|
4874
4873
|
case 'html':
|
|
4875
4874
|
return treeNode ? Cell.renderTreeHTMLCell(params) : Cell.renderHTMLCell(params);
|
|
4876
4875
|
}
|
|
4877
|
-
if (editConfig && editRender) {
|
|
4876
|
+
if (isEnableConf(editConfig) && editRender) {
|
|
4878
4877
|
return editOpts.mode === 'cell' ? treeNode ? Cell.renderTreeCellEdit(params) : Cell.renderCellEdit(params) : treeNode ? Cell.renderTreeRowEdit(params) : Cell.renderRowEdit(params);
|
|
4879
4878
|
}
|
|
4880
4879
|
return treeNode ? Cell.renderTreeCell(params) : Cell.renderDefaultCell(params);
|
|
@@ -8451,11 +8450,12 @@ const {
|
|
|
8451
8450
|
if (prevDragCol && dragCol) {
|
|
8452
8451
|
// 判断是否有拖动
|
|
8453
8452
|
if (prevDragCol !== dragCol) {
|
|
8454
|
-
const
|
|
8453
|
+
const dragColumn = dragCol;
|
|
8455
8454
|
const newColumn = prevDragCol;
|
|
8456
8455
|
Promise.resolve(dragEndMethod ? dragEndMethod({
|
|
8457
|
-
oldColumn,
|
|
8456
|
+
oldColumn: dragColumn,
|
|
8458
8457
|
newColumn,
|
|
8458
|
+
dragColumn,
|
|
8459
8459
|
dragPos: prevDragPos,
|
|
8460
8460
|
dragToChild: !!prevDragToChild,
|
|
8461
8461
|
offsetIndex: dragOffsetIndex
|
|
@@ -8466,13 +8466,13 @@ const {
|
|
|
8466
8466
|
let oafIndex = -1;
|
|
8467
8467
|
let nafIndex = -1;
|
|
8468
8468
|
const oldAllMaps = {};
|
|
8469
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([
|
|
8469
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragColumn], column => {
|
|
8470
8470
|
oldAllMaps[column.id] = column;
|
|
8471
8471
|
});
|
|
8472
8472
|
let isSelfToChildStatus = false;
|
|
8473
8473
|
// 只有实时拖拽支持跨层级
|
|
8474
8474
|
if (immediate) {
|
|
8475
|
-
if (
|
|
8475
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
8476
8476
|
// 子到子
|
|
8477
8477
|
if (!isCrossDrag) {
|
|
8478
8478
|
return;
|
|
@@ -8489,7 +8489,7 @@ const {
|
|
|
8489
8489
|
return;
|
|
8490
8490
|
}
|
|
8491
8491
|
}
|
|
8492
|
-
} else if (
|
|
8492
|
+
} else if (dragColumn.parentId) {
|
|
8493
8493
|
// 子到根
|
|
8494
8494
|
if (!isCrossDrag) {
|
|
8495
8495
|
return;
|
|
@@ -8514,7 +8514,7 @@ const {
|
|
|
8514
8514
|
} else {
|
|
8515
8515
|
// 根到根
|
|
8516
8516
|
}
|
|
8517
|
-
const oldewMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id ===
|
|
8517
|
+
const oldewMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id === dragColumn.id);
|
|
8518
8518
|
// 改变层级
|
|
8519
8519
|
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
8520
8520
|
if (oldewMatchRest) {
|
|
@@ -8522,12 +8522,12 @@ const {
|
|
|
8522
8522
|
items: oCols,
|
|
8523
8523
|
index: oIndex
|
|
8524
8524
|
} = oldewMatchRest;
|
|
8525
|
-
const childList =
|
|
8525
|
+
const childList = dragColumn.children || [];
|
|
8526
8526
|
childList.forEach(column => {
|
|
8527
|
-
column.parentId =
|
|
8527
|
+
column.parentId = dragColumn.parentId;
|
|
8528
8528
|
});
|
|
8529
8529
|
oCols.splice(oIndex, 1, ...childList);
|
|
8530
|
-
|
|
8530
|
+
dragColumn.children = [];
|
|
8531
8531
|
}
|
|
8532
8532
|
} else {
|
|
8533
8533
|
if (oldewMatchRest) {
|
|
@@ -8551,11 +8551,11 @@ const {
|
|
|
8551
8551
|
} = newMatchRest;
|
|
8552
8552
|
// 转子级
|
|
8553
8553
|
if (isCrossDrag && isToChildDrag && prevDragToChild) {
|
|
8554
|
-
|
|
8555
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
8554
|
+
dragColumn.parentId = newColumn.id;
|
|
8555
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
8556
8556
|
} else {
|
|
8557
|
-
|
|
8558
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
8557
|
+
dragColumn.parentId = newColumn.parentId;
|
|
8558
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
|
|
8559
8559
|
}
|
|
8560
8560
|
if (!nParent) {
|
|
8561
8561
|
nafIndex = nIndex;
|
|
@@ -8568,10 +8568,10 @@ const {
|
|
|
8568
8568
|
}
|
|
8569
8569
|
});
|
|
8570
8570
|
} else {
|
|
8571
|
-
oafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id ===
|
|
8571
|
+
oafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === dragColumn.id);
|
|
8572
8572
|
customColumnList.splice(oafIndex, 1);
|
|
8573
8573
|
nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
8574
|
-
customColumnList.splice(nafIndex + dragOffsetIndex, 0,
|
|
8574
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
8575
8575
|
}
|
|
8576
8576
|
reactData.isDragColMove = true;
|
|
8577
8577
|
if (mouseConfig) {
|
|
@@ -8584,8 +8584,9 @@ const {
|
|
|
8584
8584
|
}
|
|
8585
8585
|
}
|
|
8586
8586
|
$xeTable.dispatchEvent('column-dragend', {
|
|
8587
|
-
oldColumn,
|
|
8587
|
+
oldColumn: dragColumn,
|
|
8588
8588
|
newColumn,
|
|
8589
|
+
dragColumn,
|
|
8589
8590
|
dragPos: prevDragPos,
|
|
8590
8591
|
offsetIndex: dragOffsetIndex,
|
|
8591
8592
|
_index: {
|
|
@@ -10498,6 +10499,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
10498
10499
|
mini: 36
|
|
10499
10500
|
},
|
|
10500
10501
|
scrollVMLoading: false,
|
|
10502
|
+
scrollYHeight: 0,
|
|
10503
|
+
scrollYTop: 0,
|
|
10504
|
+
isScrollYBig: false,
|
|
10505
|
+
scrollXLeft: 0,
|
|
10506
|
+
scrollXWidth: 0,
|
|
10507
|
+
isScrollXBig: false,
|
|
10501
10508
|
rowExpandHeightFlag: 1,
|
|
10502
10509
|
calcCellHeightFlag: 1,
|
|
10503
10510
|
resizeHeightFlag: 1,
|
|
@@ -11557,7 +11564,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11557
11564
|
index,
|
|
11558
11565
|
items,
|
|
11559
11566
|
parent: parentColumn || null,
|
|
11560
|
-
width: 0
|
|
11567
|
+
width: 0,
|
|
11568
|
+
oLeft: 0
|
|
11561
11569
|
};
|
|
11562
11570
|
if (field) {
|
|
11563
11571
|
if (fullColumnFieldData[field]) {
|
|
@@ -19547,6 +19555,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19547
19555
|
const dragParams = {
|
|
19548
19556
|
oldRow: dragRow,
|
|
19549
19557
|
newRow: prevDragRow,
|
|
19558
|
+
dragRow,
|
|
19550
19559
|
dragPos: prevDragPos,
|
|
19551
19560
|
dragToChild: !!prevDragToChild,
|
|
19552
19561
|
offsetIndex: dragOffsetIndex
|
|
@@ -19688,6 +19697,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19688
19697
|
dispatchEvent('row-dragend', {
|
|
19689
19698
|
oldRow: dragRow,
|
|
19690
19699
|
newRow: prevDragRow,
|
|
19700
|
+
dragRow,
|
|
19691
19701
|
dragPos: prevDragPos,
|
|
19692
19702
|
dragToChild: isDragToChildFlag,
|
|
19693
19703
|
offsetIndex: dragOffsetIndex,
|
|
@@ -19870,11 +19880,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19870
19880
|
if (prevDragCol && dragCol) {
|
|
19871
19881
|
// 判断是否有拖动
|
|
19872
19882
|
if (prevDragCol !== dragCol) {
|
|
19873
|
-
const
|
|
19883
|
+
const dragColumn = dragCol;
|
|
19874
19884
|
const newColumn = prevDragCol;
|
|
19875
19885
|
const dragParams = {
|
|
19876
|
-
oldColumn,
|
|
19886
|
+
oldColumn: dragColumn,
|
|
19877
19887
|
newColumn,
|
|
19888
|
+
dragColumn,
|
|
19878
19889
|
dragPos: prevDragPos,
|
|
19879
19890
|
dragToChild: !!prevDragToChild,
|
|
19880
19891
|
offsetIndex: dragOffsetIndex
|
|
@@ -19887,14 +19898,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19887
19898
|
let oafIndex = -1;
|
|
19888
19899
|
let nafIndex = -1;
|
|
19889
19900
|
const oldAllMaps = {};
|
|
19890
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([
|
|
19901
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragColumn], column => {
|
|
19891
19902
|
oldAllMaps[column.id] = column;
|
|
19892
19903
|
});
|
|
19893
19904
|
let isSelfToChildStatus = false;
|
|
19894
|
-
if (
|
|
19905
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
19895
19906
|
// 子到子
|
|
19896
19907
|
if (isPeerDrag && !isCrossDrag) {
|
|
19897
|
-
if (
|
|
19908
|
+
if (dragColumn.parentId !== newColumn.parentId) {
|
|
19898
19909
|
// 非同级
|
|
19899
19910
|
return;
|
|
19900
19911
|
}
|
|
@@ -19915,7 +19926,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19915
19926
|
}
|
|
19916
19927
|
}
|
|
19917
19928
|
}
|
|
19918
|
-
} else if (
|
|
19929
|
+
} else if (dragColumn.parentId) {
|
|
19919
19930
|
// 子到根
|
|
19920
19931
|
if (!isCrossDrag) {
|
|
19921
19932
|
return;
|
|
@@ -19940,7 +19951,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19940
19951
|
} else {
|
|
19941
19952
|
// 根到根
|
|
19942
19953
|
}
|
|
19943
|
-
const oldewMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id ===
|
|
19954
|
+
const oldewMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id === dragColumn.id);
|
|
19944
19955
|
// 改变层级
|
|
19945
19956
|
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
19946
19957
|
if (oldewMatchRest) {
|
|
@@ -19948,12 +19959,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19948
19959
|
items: oCols,
|
|
19949
19960
|
index: oIndex
|
|
19950
19961
|
} = oldewMatchRest;
|
|
19951
|
-
const childList =
|
|
19962
|
+
const childList = dragColumn.children || [];
|
|
19952
19963
|
childList.forEach(column => {
|
|
19953
|
-
column.parentId =
|
|
19964
|
+
column.parentId = dragColumn.parentId;
|
|
19954
19965
|
});
|
|
19955
19966
|
oCols.splice(oIndex, 1, ...childList);
|
|
19956
|
-
|
|
19967
|
+
dragColumn.children = [];
|
|
19957
19968
|
}
|
|
19958
19969
|
} else {
|
|
19959
19970
|
if (oldewMatchRest) {
|
|
@@ -19977,11 +19988,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19977
19988
|
} = newMatchRest;
|
|
19978
19989
|
// 转子级
|
|
19979
19990
|
if (isCrossDrag && isToChildDrag && isDragToChildFlag) {
|
|
19980
|
-
|
|
19981
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
19991
|
+
dragColumn.parentId = newColumn.id;
|
|
19992
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
19982
19993
|
} else {
|
|
19983
|
-
|
|
19984
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
19994
|
+
dragColumn.parentId = newColumn.parentId;
|
|
19995
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
|
|
19985
19996
|
}
|
|
19986
19997
|
if (!nParent) {
|
|
19987
19998
|
nafIndex = nIndex;
|
|
@@ -20004,8 +20015,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20004
20015
|
}
|
|
20005
20016
|
}
|
|
20006
20017
|
dispatchEvent('column-dragend', {
|
|
20007
|
-
oldColumn,
|
|
20018
|
+
oldColumn: dragColumn,
|
|
20008
20019
|
newColumn,
|
|
20020
|
+
dragColumn,
|
|
20009
20021
|
dragPos: prevDragPos,
|
|
20010
20022
|
dragToChild: isDragToChildFlag,
|
|
20011
20023
|
offsetIndex: dragOffsetIndex,
|
|
@@ -20462,7 +20474,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20462
20474
|
const {
|
|
20463
20475
|
target,
|
|
20464
20476
|
deltaY,
|
|
20465
|
-
deltaX
|
|
20477
|
+
deltaX,
|
|
20478
|
+
shiftKey
|
|
20466
20479
|
} = evnt;
|
|
20467
20480
|
if (target && /^textarea$/i.test(target.tagName)) {
|
|
20468
20481
|
return;
|
|
@@ -20503,8 +20516,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20503
20516
|
return;
|
|
20504
20517
|
}
|
|
20505
20518
|
const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
|
|
20506
|
-
const deltaTop = Math.ceil(deltaY * wheelSpeed);
|
|
20507
|
-
const deltaLeft = Math.ceil(deltaX * wheelSpeed);
|
|
20519
|
+
const deltaTop = Math.ceil((shiftKey ? deltaX : deltaY) * wheelSpeed);
|
|
20520
|
+
const deltaLeft = Math.ceil((shiftKey ? deltaY : deltaX) * wheelSpeed);
|
|
20508
20521
|
const isTopWheel = deltaTop < 0;
|
|
20509
20522
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
20510
20523
|
// 如果滚动位置已经是顶部或底部,则不需要触发
|
|
@@ -21694,6 +21707,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21694
21707
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
21695
21708
|
const {
|
|
21696
21709
|
data,
|
|
21710
|
+
exportConfig,
|
|
21711
|
+
importConfig,
|
|
21697
21712
|
treeConfig,
|
|
21698
21713
|
showOverflow
|
|
21699
21714
|
} = props;
|
|
@@ -21708,132 +21723,121 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21708
21723
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
21709
21724
|
const expandOpts = computeExpandOpts.value;
|
|
21710
21725
|
const rowOpts = computeRowOpts.value;
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
}
|
|
21718
|
-
if (props.columnKey) {
|
|
21719
|
-
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
21720
|
-
}
|
|
21721
|
-
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
21722
|
-
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
21723
|
-
}
|
|
21724
|
-
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
21725
|
-
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
21726
|
-
}
|
|
21727
|
-
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
21728
|
-
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
21729
|
-
}
|
|
21730
|
-
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
21731
|
-
warnLog('vxe.error.noTree', ['stripe']);
|
|
21732
|
-
}
|
|
21733
|
-
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
21734
|
-
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
21735
|
-
}
|
|
21736
|
-
if (rowOpts.height) {
|
|
21737
|
-
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
21738
|
-
}
|
|
21739
|
-
// if (props.highlightCurrentRow) {
|
|
21740
|
-
// warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent'])
|
|
21741
|
-
// }
|
|
21742
|
-
// if (props.highlightHoverRow) {
|
|
21743
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover'])
|
|
21744
|
-
// }
|
|
21745
|
-
// if (props.highlightCurrentColumn) {
|
|
21746
|
-
// warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent'])
|
|
21747
|
-
// }
|
|
21748
|
-
// if (props.highlightHoverColumn) {
|
|
21749
|
-
// warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover'])
|
|
21750
|
-
// }
|
|
21751
|
-
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
21752
|
-
const {
|
|
21753
|
-
exportConfig,
|
|
21754
|
-
importConfig
|
|
21755
|
-
} = props;
|
|
21756
|
-
const exportOpts = computeExportOpts.value;
|
|
21757
|
-
const importOpts = computeImportOpts.value;
|
|
21758
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), importOpts.types)) {
|
|
21759
|
-
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), type)).join(',') || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps).join(',')]);
|
|
21760
|
-
}
|
|
21761
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
21762
|
-
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), type)).join(',') || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps).join(',')]);
|
|
21763
|
-
}
|
|
21726
|
+
const customOpts = computeCustomOpts.value;
|
|
21727
|
+
const mouseOpts = computeMouseOpts.value;
|
|
21728
|
+
const exportOpts = computeExportOpts.value;
|
|
21729
|
+
const importOpts = computeImportOpts.value;
|
|
21730
|
+
if (props.rowId) {
|
|
21731
|
+
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
21764
21732
|
}
|
|
21765
|
-
if (
|
|
21766
|
-
|
|
21767
|
-
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
|
|
21771
|
-
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
}
|
|
21804
|
-
|
|
21805
|
-
|
|
21733
|
+
if (props.rowKey) {
|
|
21734
|
+
warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey']);
|
|
21735
|
+
}
|
|
21736
|
+
if (props.columnKey) {
|
|
21737
|
+
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
21738
|
+
}
|
|
21739
|
+
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
21740
|
+
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
21741
|
+
}
|
|
21742
|
+
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
21743
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
21744
|
+
}
|
|
21745
|
+
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
21746
|
+
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
21747
|
+
}
|
|
21748
|
+
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
21749
|
+
warnLog('vxe.error.noTree', ['stripe']);
|
|
21750
|
+
}
|
|
21751
|
+
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
21752
|
+
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
21753
|
+
}
|
|
21754
|
+
if (rowOpts.height) {
|
|
21755
|
+
warnLog('vxe.error.delProp', ['row-config.height', 'cell-config.height']);
|
|
21756
|
+
}
|
|
21757
|
+
if (props.highlightCurrentRow) {
|
|
21758
|
+
warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent']);
|
|
21759
|
+
}
|
|
21760
|
+
if (props.highlightHoverRow) {
|
|
21761
|
+
warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover']);
|
|
21762
|
+
}
|
|
21763
|
+
if (props.highlightCurrentColumn) {
|
|
21764
|
+
warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent']);
|
|
21765
|
+
}
|
|
21766
|
+
if (props.highlightHoverColumn) {
|
|
21767
|
+
warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover']);
|
|
21768
|
+
}
|
|
21769
|
+
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
21770
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), importOpts.types)) {
|
|
21771
|
+
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), type)).join(',') || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps).join(',')]);
|
|
21772
|
+
}
|
|
21773
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includeArrays(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
21774
|
+
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps), type)).join(',') || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(exportOpts._typeMaps).join(',')]);
|
|
21775
|
+
}
|
|
21776
|
+
if (!props.id) {
|
|
21777
|
+
if ((props.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
21778
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
21806
21779
|
}
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21780
|
+
}
|
|
21781
|
+
if (props.treeConfig && checkboxOpts.range) {
|
|
21782
|
+
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
21783
|
+
}
|
|
21784
|
+
if (rowOpts.height && !props.showOverflow) {
|
|
21785
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
21786
|
+
}
|
|
21787
|
+
if (!$xeTable.handleMousedownCellAreaEvent) {
|
|
21788
|
+
if (props.areaConfig) {
|
|
21789
|
+
warnLog('vxe.error.notProp', ['area-config']);
|
|
21812
21790
|
}
|
|
21813
|
-
if (props.
|
|
21814
|
-
warnLog('vxe.error.
|
|
21791
|
+
if (props.clipConfig) {
|
|
21792
|
+
warnLog('vxe.error.notProp', ['clip-config']);
|
|
21815
21793
|
}
|
|
21816
|
-
if (props.
|
|
21817
|
-
|
|
21794
|
+
if (props.fnrConfig) {
|
|
21795
|
+
warnLog('vxe.error.notProp', ['fnr-config']);
|
|
21818
21796
|
}
|
|
21819
|
-
if (
|
|
21820
|
-
|
|
21797
|
+
if (mouseOpts.area) {
|
|
21798
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
21799
|
+
return;
|
|
21821
21800
|
}
|
|
21822
21801
|
}
|
|
21802
|
+
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
21803
|
+
warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
|
|
21804
|
+
}
|
|
21805
|
+
if (props.dragConfig) {
|
|
21806
|
+
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
21807
|
+
}
|
|
21808
|
+
if (props.treeConfig && treeOpts.children) {
|
|
21809
|
+
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
21810
|
+
}
|
|
21811
|
+
if (props.treeConfig && treeOpts.line) {
|
|
21812
|
+
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine']);
|
|
21813
|
+
}
|
|
21814
|
+
if (mouseOpts.area && mouseOpts.selected) {
|
|
21815
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
|
|
21816
|
+
}
|
|
21817
|
+
if (mouseOpts.area && props.treeConfig && !treeOpts.transform) {
|
|
21818
|
+
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
21819
|
+
}
|
|
21820
|
+
if (props.editConfig && editOpts.activeMethod) {
|
|
21821
|
+
warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod']);
|
|
21822
|
+
}
|
|
21823
|
+
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
21824
|
+
errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey']);
|
|
21825
|
+
}
|
|
21826
|
+
if (checkboxOpts.halfField) {
|
|
21827
|
+
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|
|
21828
|
+
}
|
|
21823
21829
|
// 检查是否有安装需要的模块
|
|
21824
|
-
if (
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
errLog('vxe.error.reqModule', ['Export']);
|
|
21836
|
-
}
|
|
21830
|
+
if (props.editConfig && !$xeTable.insert) {
|
|
21831
|
+
errLog('vxe.error.reqModule', ['Edit']);
|
|
21832
|
+
}
|
|
21833
|
+
if (props.editRules && !$xeTable.validate) {
|
|
21834
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
21835
|
+
}
|
|
21836
|
+
if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.handleCellMousedownEvent) {
|
|
21837
|
+
errLog('vxe.error.reqModule', ['Keyboard']);
|
|
21838
|
+
}
|
|
21839
|
+
if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
|
|
21840
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
21837
21841
|
}
|
|
21838
21842
|
Object.assign(scrollYStore, {
|
|
21839
21843
|
startIndex: 0,
|
|
@@ -30879,6 +30883,7 @@ const Grid = VxeGrid;
|
|
|
30879
30883
|
groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
|
|
30880
30884
|
scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
|
|
30881
30885
|
errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
|
|
30886
|
+
notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
|
|
30882
30887
|
unableInsert: '无法插入到指定位置,请检查参数是否正确',
|
|
30883
30888
|
useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
|
|
30884
30889
|
barUnableLink: '工具栏无法关联表格',
|