vxe-table 4.11.17 → 4.11.19
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/grid/src/grid.js +4 -1
- package/es/style.css +1 -1
- package/es/table/render/index.js +88 -57
- package/es/table/src/body.js +11 -6
- package/es/table/src/footer.js +7 -2
- package/es/table/src/table.js +188 -67
- package/es/table/src/util.js +13 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +4 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +335 -143
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +96 -62
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +10 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +7 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/table.js +203 -66
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +16 -6
- package/lib/table/src/util.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/grid/src/grid.ts +4 -1
- package/packages/table/render/index.ts +87 -55
- package/packages/table/src/body.ts +10 -5
- package/packages/table/src/footer.ts +7 -2
- package/packages/table/src/table.ts +187 -67
- package/packages/table/src/util.ts +15 -3
- /package/es/{iconfont.1741140593243.ttf → iconfont.1741333398347.ttf} +0 -0
- /package/es/{iconfont.1741140593243.woff → iconfont.1741333398347.woff} +0 -0
- /package/es/{iconfont.1741140593243.woff2 → iconfont.1741333398347.woff2} +0 -0
- /package/lib/{iconfont.1741140593243.ttf → iconfont.1741333398347.ttf} +0 -0
- /package/lib/{iconfont.1741140593243.woff → iconfont.1741333398347.woff} +0 -0
- /package/lib/{iconfont.1741140593243.woff2 → iconfont.1741333398347.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.19";
|
|
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.19"}`;
|
|
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
|
|
@@ -3962,16 +3962,17 @@ function getRowkey($xeTable) {
|
|
|
3962
3962
|
const {
|
|
3963
3963
|
computeRowOpts
|
|
3964
3964
|
} = $xeTable.getComputeMaps();
|
|
3965
|
-
const {
|
|
3966
|
-
rowId
|
|
3967
|
-
} = props;
|
|
3968
3965
|
const rowOpts = computeRowOpts.value;
|
|
3969
|
-
return rowId || rowOpts.keyField || '_X_ROW_KEY'
|
|
3966
|
+
return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`;
|
|
3970
3967
|
}
|
|
3971
3968
|
// 行主键 value
|
|
3972
3969
|
function getRowid($xeTable, row) {
|
|
3973
3970
|
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, getRowkey($xeTable));
|
|
3974
|
-
return
|
|
3971
|
+
return encodeRowid(rowid);
|
|
3972
|
+
}
|
|
3973
|
+
// 编码行主键
|
|
3974
|
+
function encodeRowid(rowVal) {
|
|
3975
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rowVal) ? '' : encodeURIComponent(rowVal);
|
|
3975
3976
|
}
|
|
3976
3977
|
const handleFieldOrColumn = ($xeTable, fieldOrColumn) => {
|
|
3977
3978
|
if (fieldOrColumn) {
|
|
@@ -3979,6 +3980,13 @@ const handleFieldOrColumn = ($xeTable, fieldOrColumn) => {
|
|
|
3979
3980
|
}
|
|
3980
3981
|
return null;
|
|
3981
3982
|
};
|
|
3983
|
+
const handleRowidOrRow = ($xeTable, rowidOrRow) => {
|
|
3984
|
+
if (rowidOrRow) {
|
|
3985
|
+
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowidOrRow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow);
|
|
3986
|
+
return $xeTable.getRowById(rowid);
|
|
3987
|
+
}
|
|
3988
|
+
return null;
|
|
3989
|
+
};
|
|
3982
3990
|
function getPaddingLeftRightSize(elem) {
|
|
3983
3991
|
if (elem) {
|
|
3984
3992
|
const computedStyle = getComputedStyle(elem);
|
|
@@ -6375,6 +6383,7 @@ const renderType = 'body';
|
|
|
6375
6383
|
tdOns.onDblclick = evnt => {
|
|
6376
6384
|
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
6377
6385
|
};
|
|
6386
|
+
let isMergeCell = false;
|
|
6378
6387
|
// 合并行或列
|
|
6379
6388
|
if (mergeList.length) {
|
|
6380
6389
|
const spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex);
|
|
@@ -6387,9 +6396,11 @@ const renderType = 'body';
|
|
|
6387
6396
|
return null;
|
|
6388
6397
|
}
|
|
6389
6398
|
if (rowspan > 1) {
|
|
6399
|
+
isMergeCell = true;
|
|
6390
6400
|
tdAttrs.rowspan = rowspan;
|
|
6391
6401
|
}
|
|
6392
6402
|
if (colspan > 1) {
|
|
6403
|
+
isMergeCell = true;
|
|
6393
6404
|
tdAttrs.colspan = colspan;
|
|
6394
6405
|
}
|
|
6395
6406
|
}
|
|
@@ -6424,11 +6435,13 @@ const renderType = 'body';
|
|
|
6424
6435
|
const isLastColumn = $columnIndex === columns.length - 1;
|
|
6425
6436
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
6426
6437
|
let isVNPreEmptyStatus = false;
|
|
6427
|
-
if (!
|
|
6428
|
-
if (
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6438
|
+
if (!isMergeCell) {
|
|
6439
|
+
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
6440
|
+
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
6441
|
+
isVNPreEmptyStatus = true;
|
|
6442
|
+
} else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
6443
|
+
isVNPreEmptyStatus = true;
|
|
6444
|
+
}
|
|
6432
6445
|
}
|
|
6433
6446
|
}
|
|
6434
6447
|
const tcStyle = {};
|
|
@@ -7618,6 +7631,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7618
7631
|
cell: evnt.currentTarget
|
|
7619
7632
|
}, cellParams), evnt);
|
|
7620
7633
|
};
|
|
7634
|
+
let isMergeCell = false;
|
|
7621
7635
|
// 合并行或列
|
|
7622
7636
|
if (mergeFooterList.length) {
|
|
7623
7637
|
const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
@@ -7630,9 +7644,11 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7630
7644
|
return null;
|
|
7631
7645
|
}
|
|
7632
7646
|
if (rowspan > 1) {
|
|
7647
|
+
isMergeCell = true;
|
|
7633
7648
|
attrs.rowspan = rowspan;
|
|
7634
7649
|
}
|
|
7635
7650
|
if (colspan > 1) {
|
|
7651
|
+
isMergeCell = true;
|
|
7636
7652
|
attrs.colspan = colspan;
|
|
7637
7653
|
}
|
|
7638
7654
|
}
|
|
@@ -7655,8 +7671,10 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7655
7671
|
const isLastColumn = $columnIndex === tableColumn.length - 1;
|
|
7656
7672
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7657
7673
|
let isVNPreEmptyStatus = false;
|
|
7658
|
-
if (
|
|
7659
|
-
|
|
7674
|
+
if (!isMergeCell) {
|
|
7675
|
+
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
7676
|
+
isVNPreEmptyStatus = true;
|
|
7677
|
+
}
|
|
7660
7678
|
}
|
|
7661
7679
|
const tcStyle = {};
|
|
7662
7680
|
if (hasEllipsis) {
|
|
@@ -13405,7 +13423,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13405
13423
|
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
13406
13424
|
// }
|
|
13407
13425
|
if (props.spanMethod) {
|
|
13408
|
-
|
|
13426
|
+
errLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
13409
13427
|
}
|
|
13410
13428
|
}
|
|
13411
13429
|
handleReserveStatus();
|
|
@@ -14168,6 +14186,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14168
14186
|
};
|
|
14169
14187
|
tableMethods = {
|
|
14170
14188
|
dispatchEvent,
|
|
14189
|
+
getEl() {
|
|
14190
|
+
return refElem.value;
|
|
14191
|
+
},
|
|
14171
14192
|
/**
|
|
14172
14193
|
* 重置表格的一切数据状态
|
|
14173
14194
|
*/
|
|
@@ -14533,6 +14554,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14533
14554
|
} = props;
|
|
14534
14555
|
const {
|
|
14535
14556
|
fullAllDataRowIdData,
|
|
14557
|
+
fullDataRowIdData,
|
|
14536
14558
|
tableSourceData,
|
|
14537
14559
|
sourceDataRowIdData,
|
|
14538
14560
|
tableFullData,
|
|
@@ -14544,7 +14566,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14544
14566
|
} = treeOpts;
|
|
14545
14567
|
if (!keepSource) {
|
|
14546
14568
|
if (true) {
|
|
14547
|
-
|
|
14569
|
+
errLog('vxe.error.reqProp', ['keep-source']);
|
|
14548
14570
|
}
|
|
14549
14571
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14550
14572
|
}
|
|
@@ -14558,22 +14580,22 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14558
14580
|
}
|
|
14559
14581
|
let reDelFlag = false;
|
|
14560
14582
|
if (targetRows.length) {
|
|
14561
|
-
targetRows.forEach(
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
tableFullData.unshift(
|
|
14576
|
-
afterFullData.unshift(
|
|
14583
|
+
targetRows.forEach(item => {
|
|
14584
|
+
const rowid = getRowid($xeTable, item);
|
|
14585
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
14586
|
+
if (rowRest) {
|
|
14587
|
+
const row = rowRest.row;
|
|
14588
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
14589
|
+
const oRow = sourceDataRowIdData[rowid];
|
|
14590
|
+
if (oRow && row) {
|
|
14591
|
+
if (field) {
|
|
14592
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
|
|
14593
|
+
} else {
|
|
14594
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
|
|
14595
|
+
}
|
|
14596
|
+
if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
|
|
14597
|
+
tableFullData.unshift(row);
|
|
14598
|
+
afterFullData.unshift(row);
|
|
14577
14599
|
reDelFlag = true;
|
|
14578
14600
|
}
|
|
14579
14601
|
}
|
|
@@ -14752,10 +14774,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14752
14774
|
},
|
|
14753
14775
|
/**
|
|
14754
14776
|
* 检查行或列数据是否发生改变
|
|
14755
|
-
* @param {Row}
|
|
14777
|
+
* @param {Row} rowOrId 行对象
|
|
14756
14778
|
* @param {String} field 字段名
|
|
14757
14779
|
*/
|
|
14758
|
-
isUpdateByRow(
|
|
14780
|
+
isUpdateByRow(rowOrId, field) {
|
|
14759
14781
|
const {
|
|
14760
14782
|
keepSource
|
|
14761
14783
|
} = props;
|
|
@@ -14765,11 +14787,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14765
14787
|
sourceDataRowIdData
|
|
14766
14788
|
} = internalData;
|
|
14767
14789
|
if (keepSource) {
|
|
14768
|
-
const rowid = getRowid($xeTable,
|
|
14790
|
+
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
|
|
14791
|
+
const rowRest = fullDataRowIdData[rowid];
|
|
14769
14792
|
// 新增的数据不需要检测
|
|
14770
|
-
if (!
|
|
14793
|
+
if (!rowRest) {
|
|
14771
14794
|
return false;
|
|
14772
14795
|
}
|
|
14796
|
+
const row = rowRest.row;
|
|
14773
14797
|
const oRow = sourceDataRowIdData[rowid];
|
|
14774
14798
|
if (oRow) {
|
|
14775
14799
|
if (arguments.length > 1) {
|
|
@@ -14833,6 +14857,108 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14833
14857
|
tableColumn: reactData.tableColumn.slice(0)
|
|
14834
14858
|
};
|
|
14835
14859
|
},
|
|
14860
|
+
/**
|
|
14861
|
+
* 移动列到指定列的位置
|
|
14862
|
+
* @param fieldOrColumn
|
|
14863
|
+
* @param targetFieldOrColumn
|
|
14864
|
+
* @param options
|
|
14865
|
+
*/
|
|
14866
|
+
moveColumnTo(fieldOrColumn, targetFieldOrColumn, options) {
|
|
14867
|
+
const {
|
|
14868
|
+
fullColumnIdData,
|
|
14869
|
+
visibleColumn
|
|
14870
|
+
} = internalData;
|
|
14871
|
+
const {
|
|
14872
|
+
dragToChild,
|
|
14873
|
+
dragPos,
|
|
14874
|
+
isCrossDrag
|
|
14875
|
+
} = Object.assign({}, options);
|
|
14876
|
+
const dragCol = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
14877
|
+
let prevDragCol = null;
|
|
14878
|
+
const colRest = dragCol ? fullColumnIdData[dragCol.id] : null;
|
|
14879
|
+
let defPos = 'left';
|
|
14880
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(targetFieldOrColumn)) {
|
|
14881
|
+
if (colRest && targetFieldOrColumn) {
|
|
14882
|
+
let currList = colRest.items;
|
|
14883
|
+
let offsetIndex = colRest._index + targetFieldOrColumn;
|
|
14884
|
+
if (isCrossDrag) {
|
|
14885
|
+
currList = visibleColumn;
|
|
14886
|
+
offsetIndex = colRest._index + targetFieldOrColumn;
|
|
14887
|
+
}
|
|
14888
|
+
if (offsetIndex > 0 && offsetIndex < currList.length - 1) {
|
|
14889
|
+
prevDragCol = currList[offsetIndex];
|
|
14890
|
+
}
|
|
14891
|
+
if (targetFieldOrColumn > 0) {
|
|
14892
|
+
defPos = 'right';
|
|
14893
|
+
}
|
|
14894
|
+
}
|
|
14895
|
+
} else {
|
|
14896
|
+
prevDragCol = handleFieldOrColumn($xeTable, targetFieldOrColumn);
|
|
14897
|
+
const targetColRest = prevDragCol ? fullColumnIdData[prevDragCol.id] : null;
|
|
14898
|
+
if (colRest && targetColRest) {
|
|
14899
|
+
if (targetColRest._index > colRest._index) {
|
|
14900
|
+
defPos = 'right';
|
|
14901
|
+
}
|
|
14902
|
+
}
|
|
14903
|
+
}
|
|
14904
|
+
return $xeTable.handleColDragSwapEvent(null, true, dragCol, prevDragCol, dragPos || defPos, dragToChild === true);
|
|
14905
|
+
},
|
|
14906
|
+
/**
|
|
14907
|
+
* 移动行到指定行的位置
|
|
14908
|
+
* @param rowidOrRow
|
|
14909
|
+
* @param targetRowidOrRow
|
|
14910
|
+
* @param options
|
|
14911
|
+
*/
|
|
14912
|
+
moveRowTo(rowidOrRow, targetRowidOrRow, options) {
|
|
14913
|
+
const {
|
|
14914
|
+
treeConfig
|
|
14915
|
+
} = props;
|
|
14916
|
+
const {
|
|
14917
|
+
fullAllDataRowIdData,
|
|
14918
|
+
afterFullData
|
|
14919
|
+
} = internalData;
|
|
14920
|
+
const {
|
|
14921
|
+
dragToChild,
|
|
14922
|
+
dragPos,
|
|
14923
|
+
isCrossDrag
|
|
14924
|
+
} = Object.assign({}, options);
|
|
14925
|
+
const treeOpts = computeTreeOpts.value;
|
|
14926
|
+
const dragRow = handleRowidOrRow($xeTable, rowidOrRow);
|
|
14927
|
+
let prevDragRow = null;
|
|
14928
|
+
let defPos = 'top';
|
|
14929
|
+
const rowRest = dragRow ? fullAllDataRowIdData[getRowid($xeTable, dragRow)] : null;
|
|
14930
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(targetRowidOrRow)) {
|
|
14931
|
+
if (rowRest && targetRowidOrRow) {
|
|
14932
|
+
let currList = afterFullData;
|
|
14933
|
+
let offsetIndex = rowRest._index + targetRowidOrRow;
|
|
14934
|
+
if (treeConfig) {
|
|
14935
|
+
currList = rowRest.items;
|
|
14936
|
+
if (treeOpts.transform) {
|
|
14937
|
+
offsetIndex = rowRest.treeIndex + targetRowidOrRow;
|
|
14938
|
+
if (isCrossDrag) {
|
|
14939
|
+
currList = afterFullData;
|
|
14940
|
+
offsetIndex = rowRest._index + targetRowidOrRow;
|
|
14941
|
+
}
|
|
14942
|
+
}
|
|
14943
|
+
}
|
|
14944
|
+
if (offsetIndex >= 0 && offsetIndex <= currList.length - 1) {
|
|
14945
|
+
prevDragRow = currList[offsetIndex];
|
|
14946
|
+
}
|
|
14947
|
+
if (targetRowidOrRow > 0) {
|
|
14948
|
+
defPos = 'bottom';
|
|
14949
|
+
}
|
|
14950
|
+
}
|
|
14951
|
+
} else {
|
|
14952
|
+
prevDragRow = handleRowidOrRow($xeTable, targetRowidOrRow);
|
|
14953
|
+
const targetRowRest = prevDragRow ? fullAllDataRowIdData[getRowid($xeTable, prevDragRow)] : null;
|
|
14954
|
+
if (rowRest && targetRowRest) {
|
|
14955
|
+
if (targetRowRest._index > rowRest._index) {
|
|
14956
|
+
defPos = 'bottom';
|
|
14957
|
+
}
|
|
14958
|
+
}
|
|
14959
|
+
}
|
|
14960
|
+
return $xeTable.handleRowDragSwapEvent(null, true, dragRow, prevDragRow, dragPos || defPos, dragToChild === true);
|
|
14961
|
+
},
|
|
14836
14962
|
/**
|
|
14837
14963
|
* 获取表格的全量列
|
|
14838
14964
|
*/
|
|
@@ -17818,7 +17944,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17818
17944
|
if (el) {
|
|
17819
17945
|
const parentElem = el.parentNode;
|
|
17820
17946
|
const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
|
|
17821
|
-
|
|
17947
|
+
let parentWrapperHeight = 0;
|
|
17948
|
+
if (parentElem) {
|
|
17949
|
+
if ($xeGrid && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
|
|
17950
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
17951
|
+
} else {
|
|
17952
|
+
parentWrapperHeight = parentElem.clientHeight;
|
|
17953
|
+
}
|
|
17954
|
+
}
|
|
17955
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
17822
17956
|
}
|
|
17823
17957
|
return 0;
|
|
17824
17958
|
},
|
|
@@ -19594,6 +19728,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19594
19728
|
} = internalData;
|
|
19595
19729
|
const dEndMethod = dragEndMethod || (dragConfig ? dragConfig.dragEndMethod : null);
|
|
19596
19730
|
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
19731
|
+
const errRest = {
|
|
19732
|
+
status: false
|
|
19733
|
+
};
|
|
19597
19734
|
if (prevDragRow && dragRow) {
|
|
19598
19735
|
// 判断是否有拖动
|
|
19599
19736
|
if (prevDragRow !== dragRow) {
|
|
@@ -19608,7 +19745,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19608
19745
|
const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
|
|
19609
19746
|
return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then(status => {
|
|
19610
19747
|
if (!status) {
|
|
19611
|
-
return;
|
|
19748
|
+
return errRest;
|
|
19612
19749
|
}
|
|
19613
19750
|
let oafIndex = -1;
|
|
19614
19751
|
let nafIndex = -1;
|
|
@@ -19639,11 +19776,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19639
19776
|
if (isPeerDrag && !isCrossDrag) {
|
|
19640
19777
|
if (oldRest.row[parentField] !== newRest.row[parentField]) {
|
|
19641
19778
|
// 非同级
|
|
19642
|
-
return;
|
|
19779
|
+
return errRest;
|
|
19643
19780
|
}
|
|
19644
19781
|
} else {
|
|
19645
19782
|
if (!isCrossDrag) {
|
|
19646
|
-
return;
|
|
19783
|
+
return errRest;
|
|
19647
19784
|
}
|
|
19648
19785
|
if (oldAllMaps[newRowid]) {
|
|
19649
19786
|
isSelfToChildStatus = true;
|
|
@@ -19654,19 +19791,19 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19654
19791
|
content: table_getI18n('vxe.error.treeDragChild')
|
|
19655
19792
|
});
|
|
19656
19793
|
}
|
|
19657
|
-
return;
|
|
19794
|
+
return errRest;
|
|
19658
19795
|
}
|
|
19659
19796
|
}
|
|
19660
19797
|
}
|
|
19661
19798
|
} else if (oldLevel) {
|
|
19662
19799
|
// 子到根
|
|
19663
19800
|
if (!isCrossDrag) {
|
|
19664
|
-
return;
|
|
19801
|
+
return errRest;
|
|
19665
19802
|
}
|
|
19666
19803
|
} else if (newLevel) {
|
|
19667
19804
|
// 根到子
|
|
19668
19805
|
if (!isCrossDrag) {
|
|
19669
|
-
return;
|
|
19806
|
+
return errRest;
|
|
19670
19807
|
}
|
|
19671
19808
|
if (oldAllMaps[newRowid]) {
|
|
19672
19809
|
isSelfToChildStatus = true;
|
|
@@ -19677,7 +19814,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19677
19814
|
content: table_getI18n('vxe.error.treeDragChild')
|
|
19678
19815
|
});
|
|
19679
19816
|
}
|
|
19680
|
-
return;
|
|
19817
|
+
return errRest;
|
|
19681
19818
|
}
|
|
19682
19819
|
}
|
|
19683
19820
|
} else {
|
|
@@ -19735,26 +19872,34 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19735
19872
|
if (reactData.scrollYLoad) {
|
|
19736
19873
|
$xeTable.updateScrollYSpace();
|
|
19737
19874
|
}
|
|
19738
|
-
(
|
|
19875
|
+
if (evnt) {
|
|
19876
|
+
dispatchEvent('row-dragend', {
|
|
19877
|
+
oldRow: dragRow,
|
|
19878
|
+
newRow: prevDragRow,
|
|
19879
|
+
dragRow,
|
|
19880
|
+
dragPos: prevDragPos,
|
|
19881
|
+
dragToChild: isDragToChildFlag,
|
|
19882
|
+
offsetIndex: dragOffsetIndex,
|
|
19883
|
+
_index: {
|
|
19884
|
+
newIndex: nafIndex,
|
|
19885
|
+
oldIndex: oafIndex
|
|
19886
|
+
}
|
|
19887
|
+
}, evnt);
|
|
19888
|
+
}
|
|
19889
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
19739
19890
|
$xeTable.updateCellAreas();
|
|
19740
19891
|
$xeTable.recalculate();
|
|
19892
|
+
}).then(() => {
|
|
19893
|
+
return {
|
|
19894
|
+
status: true
|
|
19895
|
+
};
|
|
19741
19896
|
});
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
-
|
|
19745
|
-
dragRow,
|
|
19746
|
-
dragPos: prevDragPos,
|
|
19747
|
-
dragToChild: isDragToChildFlag,
|
|
19748
|
-
offsetIndex: dragOffsetIndex,
|
|
19749
|
-
_index: {
|
|
19750
|
-
newIndex: nafIndex,
|
|
19751
|
-
oldIndex: oafIndex
|
|
19752
|
-
}
|
|
19753
|
-
}, evnt);
|
|
19754
|
-
}).catch(() => {});
|
|
19897
|
+
}).catch(() => {
|
|
19898
|
+
return errRest;
|
|
19899
|
+
});
|
|
19755
19900
|
}
|
|
19756
19901
|
}
|
|
19757
|
-
return Promise.resolve();
|
|
19902
|
+
return Promise.resolve(errRest);
|
|
19758
19903
|
},
|
|
19759
19904
|
handleRowDragDragendEvent(evnt) {
|
|
19760
19905
|
const {
|
|
@@ -19922,6 +20067,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19922
20067
|
collectColumn
|
|
19923
20068
|
} = internalData;
|
|
19924
20069
|
const dragOffsetIndex = prevDragPos === 'right' ? 1 : 0;
|
|
20070
|
+
const errRest = {
|
|
20071
|
+
status: false
|
|
20072
|
+
};
|
|
19925
20073
|
if (prevDragCol && dragCol) {
|
|
19926
20074
|
// 判断是否有拖动
|
|
19927
20075
|
if (prevDragCol !== dragCol) {
|
|
@@ -19938,7 +20086,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19938
20086
|
const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
|
|
19939
20087
|
return Promise.resolve(dragEndMethod ? dragEndMethod(dragParams) : true).then(status => {
|
|
19940
20088
|
if (!status) {
|
|
19941
|
-
return;
|
|
20089
|
+
return errRest;
|
|
19942
20090
|
}
|
|
19943
20091
|
let oafIndex = -1;
|
|
19944
20092
|
let nafIndex = -1;
|
|
@@ -19952,11 +20100,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19952
20100
|
if (isPeerDrag && !isCrossDrag) {
|
|
19953
20101
|
if (dragColumn.parentId !== newColumn.parentId) {
|
|
19954
20102
|
// 非同级
|
|
19955
|
-
return;
|
|
20103
|
+
return errRest;
|
|
19956
20104
|
}
|
|
19957
20105
|
} else {
|
|
19958
20106
|
if (!isCrossDrag) {
|
|
19959
|
-
return;
|
|
20107
|
+
return errRest;
|
|
19960
20108
|
}
|
|
19961
20109
|
if (oldAllMaps[newColumn.id]) {
|
|
19962
20110
|
isSelfToChildStatus = true;
|
|
@@ -19967,19 +20115,19 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19967
20115
|
content: table_getI18n('vxe.error.treeDragChild')
|
|
19968
20116
|
});
|
|
19969
20117
|
}
|
|
19970
|
-
return;
|
|
20118
|
+
return errRest;
|
|
19971
20119
|
}
|
|
19972
20120
|
}
|
|
19973
20121
|
}
|
|
19974
20122
|
} else if (dragColumn.parentId) {
|
|
19975
20123
|
// 子到根
|
|
19976
20124
|
if (!isCrossDrag) {
|
|
19977
|
-
return;
|
|
20125
|
+
return errRest;
|
|
19978
20126
|
}
|
|
19979
20127
|
} else if (newColumn.parentId) {
|
|
19980
20128
|
// 根到子
|
|
19981
20129
|
if (!isCrossDrag) {
|
|
19982
|
-
return;
|
|
20130
|
+
return errRest;
|
|
19983
20131
|
}
|
|
19984
20132
|
if (oldAllMaps[newColumn.id]) {
|
|
19985
20133
|
isSelfToChildStatus = true;
|
|
@@ -19990,7 +20138,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
19990
20138
|
content: table_getI18n('vxe.error.treeDragChild')
|
|
19991
20139
|
});
|
|
19992
20140
|
}
|
|
19993
|
-
return;
|
|
20141
|
+
return errRest;
|
|
19994
20142
|
}
|
|
19995
20143
|
}
|
|
19996
20144
|
} else {
|
|
@@ -20059,25 +20207,32 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20059
20207
|
$xeTable.clearCopyCellArea();
|
|
20060
20208
|
}
|
|
20061
20209
|
}
|
|
20062
|
-
|
|
20063
|
-
|
|
20064
|
-
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20210
|
+
if (evnt) {
|
|
20211
|
+
dispatchEvent('column-dragend', {
|
|
20212
|
+
oldColumn: dragColumn,
|
|
20213
|
+
newColumn,
|
|
20214
|
+
dragColumn,
|
|
20215
|
+
dragPos: prevDragPos,
|
|
20216
|
+
dragToChild: isDragToChildFlag,
|
|
20217
|
+
offsetIndex: dragOffsetIndex,
|
|
20218
|
+
_index: {
|
|
20219
|
+
newIndex: nafIndex,
|
|
20220
|
+
oldIndex: oafIndex
|
|
20221
|
+
}
|
|
20222
|
+
}, evnt);
|
|
20223
|
+
}
|
|
20074
20224
|
if (isSyncColumn) {
|
|
20075
20225
|
$xeTable.handleColDragSwapColumn();
|
|
20076
20226
|
}
|
|
20077
|
-
|
|
20227
|
+
return {
|
|
20228
|
+
status: true
|
|
20229
|
+
};
|
|
20230
|
+
}).catch(() => {
|
|
20231
|
+
return errRest;
|
|
20232
|
+
});
|
|
20078
20233
|
}
|
|
20079
20234
|
}
|
|
20080
|
-
return Promise.resolve();
|
|
20235
|
+
return Promise.resolve(errRest);
|
|
20081
20236
|
},
|
|
20082
20237
|
handleHeaderCellDragDragendEvent(evnt) {
|
|
20083
20238
|
const {
|
|
@@ -28059,6 +28214,69 @@ function handleExportTreeSelectMethod(params) {
|
|
|
28059
28214
|
} = params;
|
|
28060
28215
|
return options.original ? getCellValue(row, column) : getTreeSelectCellValue(column.editRender || column.cellRender, params);
|
|
28061
28216
|
}
|
|
28217
|
+
function handleNumberCell(renderOpts, params) {
|
|
28218
|
+
const {
|
|
28219
|
+
props = {},
|
|
28220
|
+
showNegativeStatus
|
|
28221
|
+
} = renderOpts;
|
|
28222
|
+
const {
|
|
28223
|
+
row,
|
|
28224
|
+
column
|
|
28225
|
+
} = params;
|
|
28226
|
+
const {
|
|
28227
|
+
type
|
|
28228
|
+
} = props;
|
|
28229
|
+
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
28230
|
+
let isNegative = false;
|
|
28231
|
+
if (!isEmptyValue(cellValue)) {
|
|
28232
|
+
const numberInputConfig = render_getConfig().numberInput || {};
|
|
28233
|
+
if (type === 'float') {
|
|
28234
|
+
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
28235
|
+
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
|
|
28236
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
28237
|
+
if (!autoFill) {
|
|
28238
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28239
|
+
}
|
|
28240
|
+
if (showNegativeStatus) {
|
|
28241
|
+
if (cellValue < 0) {
|
|
28242
|
+
isNegative = true;
|
|
28243
|
+
}
|
|
28244
|
+
}
|
|
28245
|
+
} else if (type === 'amount') {
|
|
28246
|
+
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
28247
|
+
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
|
|
28248
|
+
const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
|
|
28249
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28250
|
+
if (showNegativeStatus) {
|
|
28251
|
+
if (cellValue < 0) {
|
|
28252
|
+
isNegative = true;
|
|
28253
|
+
}
|
|
28254
|
+
}
|
|
28255
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(cellValue, {
|
|
28256
|
+
digits
|
|
28257
|
+
});
|
|
28258
|
+
if (!autoFill) {
|
|
28259
|
+
const [iStr, dStr] = cellValue.split('.');
|
|
28260
|
+
if (dStr) {
|
|
28261
|
+
const dRest = dStr.replace(/0+$/, '');
|
|
28262
|
+
cellValue = dRest ? [iStr, '.', dRest].join('') : iStr;
|
|
28263
|
+
}
|
|
28264
|
+
}
|
|
28265
|
+
if (showCurrency) {
|
|
28266
|
+
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
|
|
28267
|
+
}
|
|
28268
|
+
} else {
|
|
28269
|
+
if (showNegativeStatus) {
|
|
28270
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue) < 0) {
|
|
28271
|
+
isNegative = true;
|
|
28272
|
+
}
|
|
28273
|
+
}
|
|
28274
|
+
}
|
|
28275
|
+
}
|
|
28276
|
+
return getCellLabelVNs(renderOpts, params, cellValue, isNegative ? {
|
|
28277
|
+
class: 'is--negative'
|
|
28278
|
+
} : {});
|
|
28279
|
+
}
|
|
28062
28280
|
/**
|
|
28063
28281
|
* 表格 - 渲染器
|
|
28064
28282
|
*/
|
|
@@ -28130,72 +28348,22 @@ render_renderer.mixin({
|
|
|
28130
28348
|
renderTableFilter: defaultFilterRender,
|
|
28131
28349
|
tableFilterDefaultMethod: handleInputFilterMethod
|
|
28132
28350
|
},
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
const {
|
|
28138
|
-
props = {},
|
|
28139
|
-
showNegativeStatus
|
|
28140
|
-
} = renderOpts;
|
|
28351
|
+
FormatNumberInput: {
|
|
28352
|
+
renderTableDefault: handleNumberCell,
|
|
28353
|
+
tableFilterDefaultMethod: handleInputFilterMethod,
|
|
28354
|
+
tableExportMethod(params) {
|
|
28141
28355
|
const {
|
|
28142
28356
|
row,
|
|
28143
28357
|
column
|
|
28144
28358
|
} = params;
|
|
28145
|
-
const
|
|
28146
|
-
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
28154
|
-
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
|
|
28155
|
-
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
28156
|
-
if (!autoFill) {
|
|
28157
|
-
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28158
|
-
}
|
|
28159
|
-
if (showNegativeStatus) {
|
|
28160
|
-
if (cellValue < 0) {
|
|
28161
|
-
isNegative = true;
|
|
28162
|
-
}
|
|
28163
|
-
}
|
|
28164
|
-
} else if (type === 'amount') {
|
|
28165
|
-
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
28166
|
-
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
|
|
28167
|
-
const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
|
|
28168
|
-
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue);
|
|
28169
|
-
if (showNegativeStatus) {
|
|
28170
|
-
if (cellValue < 0) {
|
|
28171
|
-
isNegative = true;
|
|
28172
|
-
}
|
|
28173
|
-
}
|
|
28174
|
-
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(cellValue, {
|
|
28175
|
-
digits
|
|
28176
|
-
});
|
|
28177
|
-
if (!autoFill) {
|
|
28178
|
-
const [iStr, dStr] = cellValue.split('.');
|
|
28179
|
-
if (dStr) {
|
|
28180
|
-
const dRest = dStr.replace(/0+$/, '');
|
|
28181
|
-
cellValue = dRest ? [iStr, '.', dRest].join('') : iStr;
|
|
28182
|
-
}
|
|
28183
|
-
}
|
|
28184
|
-
if (showCurrency) {
|
|
28185
|
-
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || render_getI18n('vxe.numberInput.currencySymbol') || ''}${cellValue}`;
|
|
28186
|
-
}
|
|
28187
|
-
} else {
|
|
28188
|
-
if (showNegativeStatus) {
|
|
28189
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue) < 0) {
|
|
28190
|
-
isNegative = true;
|
|
28191
|
-
}
|
|
28192
|
-
}
|
|
28193
|
-
}
|
|
28194
|
-
}
|
|
28195
|
-
return getCellLabelVNs(renderOpts, params, cellValue, isNegative ? {
|
|
28196
|
-
class: 'is--negative'
|
|
28197
|
-
} : {});
|
|
28198
|
-
},
|
|
28359
|
+
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
28360
|
+
return cellValue;
|
|
28361
|
+
}
|
|
28362
|
+
},
|
|
28363
|
+
VxeNumberInput: {
|
|
28364
|
+
tableAutoFocus: 'input',
|
|
28365
|
+
renderTableEdit: defaultEditRender,
|
|
28366
|
+
renderTableCell: handleNumberCell,
|
|
28199
28367
|
renderTableFooter(renderOpts, params) {
|
|
28200
28368
|
const {
|
|
28201
28369
|
props = {}
|
|
@@ -28338,11 +28506,22 @@ render_renderer.mixin({
|
|
|
28338
28506
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
28339
28507
|
tableExportMethod: handleExportSelectMethod
|
|
28340
28508
|
},
|
|
28509
|
+
/**
|
|
28510
|
+
* 已废弃,被 FormatSelect 替换
|
|
28511
|
+
* @deprecated
|
|
28512
|
+
*/
|
|
28341
28513
|
formatOption: {
|
|
28342
28514
|
renderTableDefault(renderOpts, params) {
|
|
28343
28515
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
28344
28516
|
}
|
|
28345
28517
|
},
|
|
28518
|
+
FormatSelect: {
|
|
28519
|
+
renderTableDefault(renderOpts, params) {
|
|
28520
|
+
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
28521
|
+
},
|
|
28522
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
28523
|
+
tableExportMethod: handleExportSelectMethod
|
|
28524
|
+
},
|
|
28346
28525
|
VxeTreeSelect: {
|
|
28347
28526
|
tableAutoFocus: 'input',
|
|
28348
28527
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
@@ -28351,11 +28530,21 @@ render_renderer.mixin({
|
|
|
28351
28530
|
},
|
|
28352
28531
|
tableExportMethod: handleExportTreeSelectMethod
|
|
28353
28532
|
},
|
|
28533
|
+
/**
|
|
28534
|
+
* 已废弃,被 FormatTreeSelect 替换
|
|
28535
|
+
* @deprecated
|
|
28536
|
+
*/
|
|
28354
28537
|
formatTree: {
|
|
28355
28538
|
renderTableDefault(renderOpts, params) {
|
|
28356
28539
|
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
|
|
28357
28540
|
}
|
|
28358
28541
|
},
|
|
28542
|
+
FormatTreeSelect: {
|
|
28543
|
+
renderTableDefault(renderOpts, params) {
|
|
28544
|
+
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
|
|
28545
|
+
},
|
|
28546
|
+
tableExportMethod: handleExportTreeSelectMethod
|
|
28547
|
+
},
|
|
28359
28548
|
VxeTableSelect: {
|
|
28360
28549
|
tableAutoFocus: 'input',
|
|
28361
28550
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
@@ -29326,7 +29515,7 @@ const {
|
|
|
29326
29515
|
renderEmptyElement: grid_renderEmptyElement
|
|
29327
29516
|
} = core_.VxeUI;
|
|
29328
29517
|
const tableComponentPropKeys = Object.keys(src_props);
|
|
29329
|
-
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect'];
|
|
29518
|
+
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect'];
|
|
29330
29519
|
const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom'];
|
|
29331
29520
|
/* harmony default export */ var grid = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
29332
29521
|
name: 'VxeGrid',
|
|
@@ -30175,6 +30364,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
30175
30364
|
};
|
|
30176
30365
|
const gridMethods = {
|
|
30177
30366
|
dispatchEvent,
|
|
30367
|
+
getEl() {
|
|
30368
|
+
return refElem.value;
|
|
30369
|
+
},
|
|
30178
30370
|
/**
|
|
30179
30371
|
* 提交指令,支持 code 或 button
|
|
30180
30372
|
* @param {String/Object} code 字符串或对象
|