vxe-table 4.1.0-beta.0 → 4.1.2
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/README.md +1 -0
- package/README.zh-TW.md +1 -0
- package/es/edit/src/hook.js +2 -2
- package/es/export/src/hook.js +24 -0
- package/es/export/src/util.js +20 -8
- package/es/footer/src/footer.js +4 -4
- package/es/form/src/form.js +13 -6
- package/es/form/src/render.js +4 -4
- package/es/grid/src/grid.js +48 -1
- package/es/header/src/header.js +7 -5
- package/es/select/src/select.js +5 -5
- package/es/table/src/body.js +18 -14
- package/es/table/src/props.js +4 -1
- package/es/table/src/table.js +212 -89
- package/es/v-x-e-table/src/conf.js +2 -1
- package/es/validator/src/hook.js +12 -5
- package/helper/vetur/attributes.json +16 -204
- package/helper/vetur/tags.json +3 -65
- package/lib/edit/src/hook.js +2 -2
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/hook.js +28 -0
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/util.js +21 -7
- package/lib/export/src/util.min.js +1 -1
- package/lib/footer/src/footer.js +4 -4
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form.js +23 -6
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +4 -4
- package/lib/form/src/render.min.js +1 -1
- package/lib/grid/src/grid.js +56 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/header/src/header.js +7 -5
- package/lib/header/src/header.min.js +1 -1
- package/lib/index.umd.js +451 -182
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +5 -5
- package/lib/table/src/body.js +18 -14
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/props.js +4 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +272 -120
- package/lib/table/src/table.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +2 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/validator/src/hook.js +12 -5
- package/lib/validator/src/hook.min.js +1 -1
- package/package.json +3 -3
- package/packages/edit/src/hook.ts +2 -2
- package/packages/export/src/hook.ts +24 -0
- package/packages/export/src/util.ts +17 -5
- package/packages/footer/src/footer.ts +4 -4
- package/packages/form/src/form.ts +10 -6
- package/packages/form/src/render.ts +4 -4
- package/packages/grid/src/grid.ts +48 -1
- package/packages/header/src/header.ts +7 -5
- package/packages/select/src/select.ts +5 -5
- package/packages/table/src/body.ts +18 -14
- package/packages/table/src/props.ts +4 -1
- package/packages/table/src/table.ts +215 -88
- package/packages/v-x-e-table/src/conf.ts +2 -1
- package/packages/validator/src/hook.ts +9 -5
- package/types/column.d.ts +5 -1
- package/types/form-item.d.ts +5 -1
- package/types/form.d.ts +5 -1
- package/types/modal.d.ts +4 -5
- package/types/table.d.ts +41 -10
- package/types/validator.d.ts +5 -1
package/lib/index.umd.js
CHANGED
|
@@ -7976,7 +7976,6 @@ var GlobalConfig = {
|
|
|
7976
7976
|
// resizeInterval: 500,
|
|
7977
7977
|
// size: null,
|
|
7978
7978
|
// zIndex: null,
|
|
7979
|
-
// resizable: false,
|
|
7980
7979
|
// autoResize: false,
|
|
7981
7980
|
// stripe: false,
|
|
7982
7981
|
// border: false,
|
|
@@ -8022,6 +8021,8 @@ var GlobalConfig = {
|
|
|
8022
8021
|
showIcon: true
|
|
8023
8022
|
},
|
|
8024
8023
|
treeConfig: {
|
|
8024
|
+
rowtKey: 'id',
|
|
8025
|
+
parentKey: 'parentId',
|
|
8025
8026
|
children: 'children',
|
|
8026
8027
|
hasChild: 'hasChild',
|
|
8027
8028
|
indent: 20,
|
|
@@ -11762,7 +11763,7 @@ var editHook = {
|
|
|
11762
11763
|
|
|
11763
11764
|
reactData.scrollYLoad = !treeConfig && sYOpts.gt > -1 && sYOpts.gt < tableFullData.length;
|
|
11764
11765
|
$xetable.updateFooter();
|
|
11765
|
-
$xetable.
|
|
11766
|
+
$xetable.cacheRowMap();
|
|
11766
11767
|
$xetable.handleTableData();
|
|
11767
11768
|
$xetable.updateAfterDataIndex();
|
|
11768
11769
|
$xetable.checkSelectionStatus();
|
|
@@ -11876,7 +11877,7 @@ var editHook = {
|
|
|
11876
11877
|
});
|
|
11877
11878
|
reactData.scrollYLoad = !treeConfig && sYOpts.gt > -1 && sYOpts.gt < tableFullData.length;
|
|
11878
11879
|
$xetable.updateFooter();
|
|
11879
|
-
$xetable.
|
|
11880
|
+
$xetable.cacheRowMap();
|
|
11880
11881
|
$xetable.handleTableData();
|
|
11881
11882
|
$xetable.updateAfterDataIndex();
|
|
11882
11883
|
$xetable.checkSelectionStatus();
|
|
@@ -16931,7 +16932,7 @@ function getOptUniqueId() {
|
|
|
16931
16932
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
16932
16933
|
};
|
|
16933
16934
|
|
|
16934
|
-
var
|
|
16935
|
+
var cacheItemMap = function cacheItemMap() {
|
|
16935
16936
|
var fullOptionList = reactData.fullOptionList,
|
|
16936
16937
|
fullGroupList = reactData.fullGroupList;
|
|
16937
16938
|
var groupOptionsField = computeGroupOptionsField.value;
|
|
@@ -17542,21 +17543,21 @@ function getOptUniqueId() {
|
|
|
17542
17543
|
reactData.fullOptionList = value || [];
|
|
17543
17544
|
}
|
|
17544
17545
|
|
|
17545
|
-
|
|
17546
|
+
cacheItemMap();
|
|
17546
17547
|
});
|
|
17547
17548
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
17548
17549
|
return props.options;
|
|
17549
17550
|
}, function (value) {
|
|
17550
17551
|
reactData.fullGroupList = [];
|
|
17551
17552
|
reactData.fullOptionList = value || [];
|
|
17552
|
-
|
|
17553
|
+
cacheItemMap();
|
|
17553
17554
|
});
|
|
17554
17555
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
17555
17556
|
return props.optionGroups;
|
|
17556
17557
|
}, function (value) {
|
|
17557
17558
|
reactData.fullOptionList = [];
|
|
17558
17559
|
reactData.fullGroupList = value || [];
|
|
17559
|
-
|
|
17560
|
+
cacheItemMap();
|
|
17560
17561
|
});
|
|
17561
17562
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
17562
17563
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
@@ -17569,7 +17570,7 @@ function getOptUniqueId() {
|
|
|
17569
17570
|
reactData.fullOptionList = options;
|
|
17570
17571
|
}
|
|
17571
17572
|
|
|
17572
|
-
|
|
17573
|
+
cacheItemMap();
|
|
17573
17574
|
});
|
|
17574
17575
|
GlobalEvent.on($xeselect, 'mousewheel', handleGlobalMousewheelEvent);
|
|
17575
17576
|
GlobalEvent.on($xeselect, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -18397,9 +18398,6 @@ var web_url_search_params = __webpack_require__("9861");
|
|
|
18397
18398
|
|
|
18398
18399
|
|
|
18399
18400
|
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
18401
|
// 导入
|
|
18404
18402
|
|
|
18405
18403
|
var fileForm;
|
|
@@ -18477,6 +18475,13 @@ var util_readLocalFile = function readLocalFile(options) {
|
|
|
18477
18475
|
});
|
|
18478
18476
|
} else {
|
|
18479
18477
|
if (opts.message !== false) {
|
|
18478
|
+
// 检测弹窗模块
|
|
18479
|
+
if (true) {
|
|
18480
|
+
if (!VXETable.modal) {
|
|
18481
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
18482
|
+
}
|
|
18483
|
+
}
|
|
18484
|
+
|
|
18480
18485
|
VXETable.modal.message({
|
|
18481
18486
|
content: conf.i18n('vxe.error.notType', [errType]),
|
|
18482
18487
|
status: 'error'
|
|
@@ -18575,13 +18580,20 @@ var util_saveLocalFile = function saveLocalFile(options) {
|
|
|
18575
18580
|
if (navigator.msSaveBlob) {
|
|
18576
18581
|
navigator.msSaveBlob(blob, name);
|
|
18577
18582
|
} else {
|
|
18583
|
+
var url = URL.createObjectURL(blob);
|
|
18578
18584
|
var linkElem = document.createElement('a');
|
|
18579
18585
|
linkElem.target = '_blank';
|
|
18580
18586
|
linkElem.download = name;
|
|
18581
|
-
linkElem.href =
|
|
18587
|
+
linkElem.href = url;
|
|
18582
18588
|
document.body.appendChild(linkElem);
|
|
18583
18589
|
linkElem.click();
|
|
18584
|
-
|
|
18590
|
+
requestAnimationFrame(function () {
|
|
18591
|
+
if (linkElem.parentNode) {
|
|
18592
|
+
linkElem.parentNode.removeChild(linkElem);
|
|
18593
|
+
}
|
|
18594
|
+
|
|
18595
|
+
URL.revokeObjectURL(url);
|
|
18596
|
+
});
|
|
18585
18597
|
}
|
|
18586
18598
|
|
|
18587
18599
|
return Promise.resolve();
|
|
@@ -18611,8 +18623,6 @@ var util_saveLocalFile = function saveLocalFile(options) {
|
|
|
18611
18623
|
|
|
18612
18624
|
|
|
18613
18625
|
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
18626
|
|
|
18617
18627
|
|
|
18618
18628
|
|
|
@@ -19532,6 +19542,13 @@ var tableExportHook = {
|
|
|
19532
19542
|
content: content
|
|
19533
19543
|
}).then(function () {
|
|
19534
19544
|
if (opts.message !== false) {
|
|
19545
|
+
// 检测弹窗模块
|
|
19546
|
+
if (true) {
|
|
19547
|
+
if (!VXETable.modal) {
|
|
19548
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19549
|
+
}
|
|
19550
|
+
}
|
|
19551
|
+
|
|
19535
19552
|
VXETable.modal.message({
|
|
19536
19553
|
content: conf.i18n('vxe.table.expSuccess'),
|
|
19537
19554
|
status: 'success'
|
|
@@ -19646,6 +19663,13 @@ var tableExportHook = {
|
|
|
19646
19663
|
}
|
|
19647
19664
|
|
|
19648
19665
|
if (opts.message !== false) {
|
|
19666
|
+
// 检测弹窗模块
|
|
19667
|
+
if (true) {
|
|
19668
|
+
if (!VXETable.modal) {
|
|
19669
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19670
|
+
}
|
|
19671
|
+
}
|
|
19672
|
+
|
|
19649
19673
|
VXETable.modal.message({
|
|
19650
19674
|
content: conf.i18n('vxe.table.impSuccess', [rows.length]),
|
|
19651
19675
|
status: 'success'
|
|
@@ -19661,6 +19685,13 @@ var tableExportHook = {
|
|
|
19661
19685
|
});
|
|
19662
19686
|
});
|
|
19663
19687
|
} else if (opts.message !== false) {
|
|
19688
|
+
// 检测弹窗模块
|
|
19689
|
+
if (true) {
|
|
19690
|
+
if (!VXETable.modal) {
|
|
19691
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19692
|
+
}
|
|
19693
|
+
}
|
|
19694
|
+
|
|
19664
19695
|
VXETable.modal.message({
|
|
19665
19696
|
content: conf.i18n('vxe.error.impFields'),
|
|
19666
19697
|
status: 'error'
|
|
@@ -19685,6 +19716,13 @@ var tableExportHook = {
|
|
|
19685
19716
|
|
|
19686
19717
|
if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.includes(VXETable.config.importTypes, type)) {
|
|
19687
19718
|
if (opts.message !== false) {
|
|
19719
|
+
// 检测弹窗模块
|
|
19720
|
+
if (true) {
|
|
19721
|
+
if (!VXETable.modal) {
|
|
19722
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19723
|
+
}
|
|
19724
|
+
}
|
|
19725
|
+
|
|
19688
19726
|
VXETable.modal.message({
|
|
19689
19727
|
content: conf.i18n('vxe.error.notType', [type]),
|
|
19690
19728
|
status: 'error'
|
|
@@ -20849,9 +20887,6 @@ var Keyboard = {
|
|
|
20849
20887
|
|
|
20850
20888
|
|
|
20851
20889
|
|
|
20852
|
-
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
20890
|
/**
|
|
20856
20891
|
* 校验规则
|
|
20857
20892
|
*/
|
|
@@ -20879,9 +20914,14 @@ var hook_Rule = /*#__PURE__*/function () {
|
|
|
20879
20914
|
|
|
20880
20915
|
|
|
20881
20916
|
_createClass(Rule, [{
|
|
20917
|
+
key: "content",
|
|
20918
|
+
get: function get() {
|
|
20919
|
+
return getFuncText(this.$options.content || this.$options.message);
|
|
20920
|
+
}
|
|
20921
|
+
}, {
|
|
20882
20922
|
key: "message",
|
|
20883
20923
|
get: function get() {
|
|
20884
|
-
return
|
|
20924
|
+
return this.content;
|
|
20885
20925
|
}
|
|
20886
20926
|
}]);
|
|
20887
20927
|
|
|
@@ -21190,7 +21230,7 @@ var validatorHook = {
|
|
|
21190
21230
|
errorRules.push(new hook_Rule({
|
|
21191
21231
|
type: 'custom',
|
|
21192
21232
|
trigger: trigger,
|
|
21193
|
-
|
|
21233
|
+
content: customValid.message,
|
|
21194
21234
|
rule: new hook_Rule(rule)
|
|
21195
21235
|
}));
|
|
21196
21236
|
} else if (customValid.catch) {
|
|
@@ -21200,7 +21240,7 @@ var validatorHook = {
|
|
|
21200
21240
|
errorRules.push(new hook_Rule({
|
|
21201
21241
|
type: 'custom',
|
|
21202
21242
|
trigger: trigger,
|
|
21203
|
-
|
|
21243
|
+
content: e && e.message ? e.message : rule.content || rule.message,
|
|
21204
21244
|
rule: new hook_Rule(rule)
|
|
21205
21245
|
}));
|
|
21206
21246
|
}));
|
|
@@ -21304,7 +21344,7 @@ var validatorHook = {
|
|
|
21304
21344
|
column = params.column,
|
|
21305
21345
|
cell = params.cell;
|
|
21306
21346
|
var validTip = refValidTooltip.value;
|
|
21307
|
-
var content = rule.
|
|
21347
|
+
var content = rule.content;
|
|
21308
21348
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])().then(function () {
|
|
21309
21349
|
Object.assign(validStore, {
|
|
21310
21350
|
row: row,
|
|
@@ -21450,6 +21490,9 @@ var renderType = 'header';
|
|
|
21450
21490
|
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
21451
21491
|
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
21452
21492
|
|
|
21493
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
21494
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
21495
|
+
|
|
21453
21496
|
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
21454
21497
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
21455
21498
|
var refHeaderTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
@@ -21595,14 +21638,15 @@ var renderType = 'header';
|
|
|
21595
21638
|
mouseConfig = tableProps.mouseConfig;
|
|
21596
21639
|
var isGroup = tableReactData.isGroup,
|
|
21597
21640
|
currentColumn = tableReactData.currentColumn,
|
|
21598
|
-
|
|
21641
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
21599
21642
|
overflowX = tableReactData.overflowX,
|
|
21600
21643
|
scrollbarWidth = tableReactData.scrollbarWidth;
|
|
21644
|
+
var columnOpts = computeColumnOpts.value;
|
|
21601
21645
|
var headerGroups = headerColumn.value; // 如果是使用优化模式
|
|
21602
21646
|
|
|
21603
21647
|
if (!isGroup) {
|
|
21604
21648
|
if (fixedType) {
|
|
21605
|
-
if (
|
|
21649
|
+
if (scrollYLoad || allColumnHeaderOverflow) {
|
|
21606
21650
|
tableColumn = fixedColumn;
|
|
21607
21651
|
}
|
|
21608
21652
|
}
|
|
@@ -21699,9 +21743,9 @@ var renderType = 'header';
|
|
|
21699
21743
|
onDblclick: function onDblclick(evnt) {
|
|
21700
21744
|
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
21701
21745
|
}
|
|
21702
|
-
}; //
|
|
21746
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
21703
21747
|
|
|
21704
|
-
if (
|
|
21748
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
21705
21749
|
showEllipsis = hasEllipsis = true;
|
|
21706
21750
|
} // 按下事件处理
|
|
21707
21751
|
|
|
@@ -21730,7 +21774,7 @@ var renderType = 'header';
|
|
|
21730
21774
|
/**
|
|
21731
21775
|
* 列宽拖动
|
|
21732
21776
|
*/
|
|
21733
|
-
!fixedHiddenColumn && !isColGroup && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isBoolean(column.resizable) ? column.resizable : resizable) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
21777
|
+
!fixedHiddenColumn && !isColGroup && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || resizable) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
21734
21778
|
class: ['vxe-resizable', {
|
|
21735
21779
|
'is--line': !border || border === 'none'
|
|
21736
21780
|
}],
|
|
@@ -21776,7 +21820,6 @@ var Header = Object.assign(header, {
|
|
|
21776
21820
|
|
|
21777
21821
|
|
|
21778
21822
|
|
|
21779
|
-
|
|
21780
21823
|
var footer_renderType = 'footer';
|
|
21781
21824
|
|
|
21782
21825
|
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
@@ -21924,7 +21967,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
21924
21967
|
columnKey = tableProps.columnKey,
|
|
21925
21968
|
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
21926
21969
|
var visibleColumn = tableInternalData.visibleColumn;
|
|
21927
|
-
var
|
|
21970
|
+
var scrollYLoad = tableReactData.scrollYLoad,
|
|
21928
21971
|
overflowX = tableReactData.overflowX,
|
|
21929
21972
|
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
21930
21973
|
currentColumn = tableReactData.currentColumn,
|
|
@@ -21932,7 +21975,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
21932
21975
|
var tooltipOpts = computeTooltipOpts.value; // 如果是使用优化模式
|
|
21933
21976
|
|
|
21934
21977
|
if (fixedType) {
|
|
21935
|
-
if (
|
|
21978
|
+
if (scrollYLoad || allColumnFooterOverflow) {
|
|
21936
21979
|
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
21937
21980
|
tableColumn = fixedColumn;
|
|
21938
21981
|
} else {
|
|
@@ -22033,9 +22076,9 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
22033
22076
|
fixed: fixedType,
|
|
22034
22077
|
type: footer_renderType,
|
|
22035
22078
|
data: footerTableData
|
|
22036
|
-
}; //
|
|
22079
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
22037
22080
|
|
|
22038
|
-
if (
|
|
22081
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
22039
22082
|
showEllipsis = hasEllipsis = true;
|
|
22040
22083
|
}
|
|
22041
22084
|
|
|
@@ -23475,8 +23518,11 @@ var es_array_sort = __webpack_require__("4e82");
|
|
|
23475
23518
|
},
|
|
23476
23519
|
// 是否自动根据状态属性去更新响应式表格宽高
|
|
23477
23520
|
syncResize: [Boolean, String, Number],
|
|
23478
|
-
//
|
|
23521
|
+
// 列配置信息
|
|
23479
23522
|
columnConfig: Object,
|
|
23523
|
+
// 行配置信息
|
|
23524
|
+
rowConfig: Object,
|
|
23525
|
+
// 列调整配置项
|
|
23480
23526
|
resizableConfig: Object,
|
|
23481
23527
|
// 序号配置项
|
|
23482
23528
|
seqConfig: Object,
|
|
@@ -23568,7 +23614,7 @@ var es_array_sort = __webpack_require__("4e82");
|
|
|
23568
23614
|
|
|
23569
23615
|
|
|
23570
23616
|
var tableComponentPropKeys = Object.keys(src_props);
|
|
23571
|
-
var tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isRowExpandLoaded', 'clearRowExpandLoaded', '
|
|
23617
|
+
var tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'focus', 'blur', 'connect'];
|
|
23572
23618
|
var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'toolbar-button-click', 'toolbar-tool-click', 'zoom']);
|
|
23573
23619
|
/* harmony default export */ var grid = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
23574
23620
|
name: 'VxeGrid',
|
|
@@ -23824,6 +23870,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
23824
23870
|
gridExtendTableMethods.clearCheckboxRow();
|
|
23825
23871
|
} else {
|
|
23826
23872
|
if (isMsg) {
|
|
23873
|
+
// 检测弹窗模块
|
|
23874
|
+
if (true) {
|
|
23875
|
+
if (!VXETable.modal) {
|
|
23876
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23877
|
+
}
|
|
23878
|
+
}
|
|
23879
|
+
|
|
23827
23880
|
VXETable.modal.message({
|
|
23828
23881
|
id: code,
|
|
23829
23882
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -23862,6 +23915,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
23862
23915
|
}
|
|
23863
23916
|
});
|
|
23864
23917
|
} else {
|
|
23918
|
+
// 检测弹窗模块
|
|
23919
|
+
if (true) {
|
|
23920
|
+
if (!VXETable.modal) {
|
|
23921
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23922
|
+
}
|
|
23923
|
+
}
|
|
23924
|
+
|
|
23865
23925
|
VXETable.modal.message({
|
|
23866
23926
|
id: "msg_".concat(code),
|
|
23867
23927
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -24527,6 +24587,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24527
24587
|
});
|
|
24528
24588
|
|
|
24529
24589
|
if (isMsg) {
|
|
24590
|
+
// 检测弹窗模块
|
|
24591
|
+
if (true) {
|
|
24592
|
+
if (!VXETable.modal) {
|
|
24593
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24594
|
+
}
|
|
24595
|
+
}
|
|
24596
|
+
|
|
24530
24597
|
VXETable.modal.message({
|
|
24531
24598
|
content: getRespMsg(rest, 'vxe.grid.delSuccess'),
|
|
24532
24599
|
status: 'success'
|
|
@@ -24542,6 +24609,12 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24542
24609
|
reactData.tableLoading = false;
|
|
24543
24610
|
|
|
24544
24611
|
if (isMsg) {
|
|
24612
|
+
if (true) {
|
|
24613
|
+
if (!VXETable.modal.message) {
|
|
24614
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24615
|
+
}
|
|
24616
|
+
}
|
|
24617
|
+
|
|
24545
24618
|
VXETable.modal.message({
|
|
24546
24619
|
id: code,
|
|
24547
24620
|
content: getRespMsg(rest, 'vxe.grid.operError'),
|
|
@@ -24552,6 +24625,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24552
24625
|
});
|
|
24553
24626
|
} else {
|
|
24554
24627
|
if (isMsg) {
|
|
24628
|
+
// 检测弹窗模块
|
|
24629
|
+
if (true) {
|
|
24630
|
+
if (!VXETable.modal) {
|
|
24631
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24632
|
+
}
|
|
24633
|
+
}
|
|
24634
|
+
|
|
24555
24635
|
VXETable.modal.message({
|
|
24556
24636
|
id: code,
|
|
24557
24637
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -24613,6 +24693,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24613
24693
|
reactData.pendingRecords = [];
|
|
24614
24694
|
|
|
24615
24695
|
if (isMsg) {
|
|
24696
|
+
// 检测弹窗模块
|
|
24697
|
+
if (true) {
|
|
24698
|
+
if (!VXETable.modal) {
|
|
24699
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24700
|
+
}
|
|
24701
|
+
}
|
|
24702
|
+
|
|
24616
24703
|
VXETable.modal.message({
|
|
24617
24704
|
content: getRespMsg(rest, 'vxe.grid.saveSuccess'),
|
|
24618
24705
|
status: 'success'
|
|
@@ -24628,6 +24715,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24628
24715
|
reactData.tableLoading = false;
|
|
24629
24716
|
|
|
24630
24717
|
if (isMsg) {
|
|
24718
|
+
// 检测弹窗模块
|
|
24719
|
+
if (true) {
|
|
24720
|
+
if (!VXETable.modal) {
|
|
24721
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24722
|
+
}
|
|
24723
|
+
}
|
|
24724
|
+
|
|
24631
24725
|
VXETable.modal.message({
|
|
24632
24726
|
id: code,
|
|
24633
24727
|
content: getRespMsg(rest, 'vxe.grid.operError'),
|
|
@@ -24637,6 +24731,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24637
24731
|
});
|
|
24638
24732
|
} else {
|
|
24639
24733
|
if (isMsg) {
|
|
24734
|
+
// 检测弹窗模块
|
|
24735
|
+
if (true) {
|
|
24736
|
+
if (!VXETable.modal) {
|
|
24737
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24738
|
+
}
|
|
24739
|
+
}
|
|
24740
|
+
|
|
24640
24741
|
VXETable.modal.message({
|
|
24641
24742
|
id: code,
|
|
24642
24743
|
content: conf.i18n('vxe.grid.dataUnchanged'),
|
|
@@ -27487,8 +27588,8 @@ function renderTitle($xeform, item) {
|
|
|
27487
27588
|
var titVNs = [];
|
|
27488
27589
|
|
|
27489
27590
|
if (titlePrefix) {
|
|
27490
|
-
titVNs.push(titlePrefix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27491
|
-
content: getFuncText(titlePrefix.message),
|
|
27591
|
+
titVNs.push(titlePrefix.content || titlePrefix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27592
|
+
content: getFuncText(titlePrefix.content || titlePrefix.message),
|
|
27492
27593
|
enterable: titlePrefix.enterable,
|
|
27493
27594
|
theme: titlePrefix.theme
|
|
27494
27595
|
}, {
|
|
@@ -27507,8 +27608,8 @@ function renderTitle($xeform, item) {
|
|
|
27507
27608
|
var fixVNs = [];
|
|
27508
27609
|
|
|
27509
27610
|
if (titleSuffix) {
|
|
27510
|
-
fixVNs.push(titleSuffix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27511
|
-
content: getFuncText(titleSuffix.message),
|
|
27611
|
+
fixVNs.push(titleSuffix.content || titleSuffix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27612
|
+
content: getFuncText(titleSuffix.content || titleSuffix.message),
|
|
27512
27613
|
enterable: titleSuffix.enterable,
|
|
27513
27614
|
theme: titleSuffix.theme
|
|
27514
27615
|
}, {
|
|
@@ -27548,9 +27649,6 @@ function renderTitle($xeform, item) {
|
|
|
27548
27649
|
|
|
27549
27650
|
|
|
27550
27651
|
|
|
27551
|
-
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
27652
|
|
|
27555
27653
|
|
|
27556
27654
|
|
|
@@ -27573,9 +27671,14 @@ var form_Rule = /*#__PURE__*/function () {
|
|
|
27573
27671
|
}
|
|
27574
27672
|
|
|
27575
27673
|
_createClass(Rule, [{
|
|
27674
|
+
key: "content",
|
|
27675
|
+
get: function get() {
|
|
27676
|
+
return getFuncText(this.$options.content || this.$options.message);
|
|
27677
|
+
}
|
|
27678
|
+
}, {
|
|
27576
27679
|
key: "message",
|
|
27577
27680
|
get: function get() {
|
|
27578
|
-
return
|
|
27681
|
+
return this.content;
|
|
27579
27682
|
}
|
|
27580
27683
|
}]);
|
|
27581
27684
|
|
|
@@ -27635,7 +27738,12 @@ function getResetValue(value, resetValue) {
|
|
|
27635
27738
|
return conf.form.size || conf.size;
|
|
27636
27739
|
}
|
|
27637
27740
|
},
|
|
27638
|
-
span:
|
|
27741
|
+
span: {
|
|
27742
|
+
type: [String, Number],
|
|
27743
|
+
default: function _default() {
|
|
27744
|
+
return conf.form.span;
|
|
27745
|
+
}
|
|
27746
|
+
},
|
|
27639
27747
|
align: {
|
|
27640
27748
|
type: String,
|
|
27641
27749
|
default: function _default() {
|
|
@@ -27648,7 +27756,12 @@ function getResetValue(value, resetValue) {
|
|
|
27648
27756
|
return conf.form.titleAlign;
|
|
27649
27757
|
}
|
|
27650
27758
|
},
|
|
27651
|
-
titleWidth:
|
|
27759
|
+
titleWidth: {
|
|
27760
|
+
type: [String, Number],
|
|
27761
|
+
default: function _default() {
|
|
27762
|
+
return conf.form.titleWidth;
|
|
27763
|
+
}
|
|
27764
|
+
},
|
|
27652
27765
|
titleColon: {
|
|
27653
27766
|
type: Boolean,
|
|
27654
27767
|
default: function _default() {
|
|
@@ -27969,7 +28082,7 @@ function getResetValue(value, resetValue) {
|
|
|
27969
28082
|
errorRules.push(new form_Rule({
|
|
27970
28083
|
type: 'custom',
|
|
27971
28084
|
trigger: trigger,
|
|
27972
|
-
|
|
28085
|
+
content: customValid.message,
|
|
27973
28086
|
rule: new form_Rule(rule)
|
|
27974
28087
|
}));
|
|
27975
28088
|
} else if (customValid.catch) {
|
|
@@ -27978,7 +28091,7 @@ function getResetValue(value, resetValue) {
|
|
|
27978
28091
|
errorRules.push(new form_Rule({
|
|
27979
28092
|
type: 'custom',
|
|
27980
28093
|
trigger: trigger,
|
|
27981
|
-
|
|
28094
|
+
content: e ? e.message : rule.content || rule.message,
|
|
27982
28095
|
rule: new form_Rule(rule)
|
|
27983
28096
|
}));
|
|
27984
28097
|
}));
|
|
@@ -28295,7 +28408,7 @@ function getResetValue(value, resetValue) {
|
|
|
28295
28408
|
style: errRule.maxWidth ? {
|
|
28296
28409
|
width: "".concat(errRule.maxWidth, "px")
|
|
28297
28410
|
} : null
|
|
28298
|
-
}, errRule.
|
|
28411
|
+
}, errRule.content));
|
|
28299
28412
|
}
|
|
28300
28413
|
|
|
28301
28414
|
var ons = showTooltip ? {
|
|
@@ -29997,7 +30110,8 @@ var lineOffsetSizes = {
|
|
|
29997
30110
|
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
29998
30111
|
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
29999
30112
|
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
30000
|
-
computeValidOpts = _$xetable$getComputeM.computeValidOpts
|
|
30113
|
+
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
30114
|
+
computeRowOpts = _$xetable$getComputeM.computeRowOpts;
|
|
30001
30115
|
|
|
30002
30116
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30003
30117
|
var refBodyTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
@@ -30098,7 +30212,6 @@ var lineOffsetSizes = {
|
|
|
30098
30212
|
tooltipConfig = tableProps.tooltipConfig;
|
|
30099
30213
|
var tableData = tableReactData.tableData,
|
|
30100
30214
|
overflowX = tableReactData.overflowX,
|
|
30101
|
-
scrollXLoad = tableReactData.scrollXLoad,
|
|
30102
30215
|
scrollYLoad = tableReactData.scrollYLoad,
|
|
30103
30216
|
currentColumn = tableReactData.currentColumn,
|
|
30104
30217
|
mergeList = tableReactData.mergeList,
|
|
@@ -30110,6 +30223,7 @@ var lineOffsetSizes = {
|
|
|
30110
30223
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
30111
30224
|
var editOpts = computeEditOpts.value;
|
|
30112
30225
|
var tooltipOpts = computeTooltipOpts.value;
|
|
30226
|
+
var rowOpts = computeRowOpts.value;
|
|
30113
30227
|
var sYOpts = computeSYOpts.value;
|
|
30114
30228
|
var type = column.type,
|
|
30115
30229
|
cellRender = column.cellRender,
|
|
@@ -30119,7 +30233,8 @@ var lineOffsetSizes = {
|
|
|
30119
30233
|
className = column.className,
|
|
30120
30234
|
treeNode = column.treeNode;
|
|
30121
30235
|
var actived = editStore.actived;
|
|
30122
|
-
var
|
|
30236
|
+
var scrollYRHeight = sYOpts.rHeight;
|
|
30237
|
+
var rowHeight = rowOpts.height;
|
|
30123
30238
|
var showAllTip = tooltipOpts.showAll;
|
|
30124
30239
|
var columnIndex = $xetable.getColumnIndex(column);
|
|
30125
30240
|
|
|
@@ -30162,7 +30277,7 @@ var lineOffsetSizes = {
|
|
|
30162
30277
|
items: items
|
|
30163
30278
|
}; // 虚拟滚动不支持动态高度
|
|
30164
30279
|
|
|
30165
|
-
if (
|
|
30280
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
30166
30281
|
showEllipsis = hasEllipsis = true;
|
|
30167
30282
|
} // hover 进入事件
|
|
30168
30283
|
|
|
@@ -30283,7 +30398,7 @@ var lineOffsetSizes = {
|
|
|
30283
30398
|
'c--ellipsis': showEllipsis
|
|
30284
30399
|
}],
|
|
30285
30400
|
style: {
|
|
30286
|
-
maxHeight: hasEllipsis &&
|
|
30401
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30287
30402
|
}
|
|
30288
30403
|
}));
|
|
30289
30404
|
} else {
|
|
@@ -30295,7 +30410,7 @@ var lineOffsetSizes = {
|
|
|
30295
30410
|
'c--ellipsis': showEllipsis
|
|
30296
30411
|
}],
|
|
30297
30412
|
style: {
|
|
30298
|
-
maxHeight: hasEllipsis &&
|
|
30413
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30299
30414
|
},
|
|
30300
30415
|
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
30301
30416
|
}, column.renderCell(params))]));
|
|
@@ -30317,12 +30432,12 @@ var lineOffsetSizes = {
|
|
|
30317
30432
|
key: columnKey ? column.id : $columnIndex
|
|
30318
30433
|
}, attrs), {}, {
|
|
30319
30434
|
style: Object.assign({
|
|
30320
|
-
height: hasEllipsis &&
|
|
30435
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30321
30436
|
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
30322
30437
|
}, tdOns), tdVNs);
|
|
30323
30438
|
};
|
|
30324
30439
|
|
|
30325
|
-
var renderRows = function renderRows($seq,
|
|
30440
|
+
var renderRows = function renderRows($seq, fixedType, tableData, tableColumn) {
|
|
30326
30441
|
var stripe = tableProps.stripe,
|
|
30327
30442
|
rowKey = tableProps.rowKey,
|
|
30328
30443
|
highlightHoverRow = tableProps.highlightHoverRow,
|
|
@@ -30338,7 +30453,8 @@ var lineOffsetSizes = {
|
|
|
30338
30453
|
rowExpandeds = tableReactData.rowExpandeds,
|
|
30339
30454
|
expandColumn = tableReactData.expandColumn,
|
|
30340
30455
|
selectRow = tableReactData.selectRow;
|
|
30341
|
-
var
|
|
30456
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData,
|
|
30457
|
+
scrollYStore = tableInternalData.scrollYStore;
|
|
30342
30458
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
30343
30459
|
var radioOpts = computeRadioOpts.value;
|
|
30344
30460
|
var treeOpts = computeTreeOpts.value;
|
|
@@ -30380,6 +30496,8 @@ var lineOffsetSizes = {
|
|
|
30380
30496
|
}
|
|
30381
30497
|
|
|
30382
30498
|
var rowid = util_getRowid($xetable, row);
|
|
30499
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
30500
|
+
var rowLevel = rest ? rest.level : 0;
|
|
30383
30501
|
var params = {
|
|
30384
30502
|
$table: $xetable,
|
|
30385
30503
|
$seq: $seq,
|
|
@@ -30455,11 +30573,11 @@ var lineOffsetSizes = {
|
|
|
30455
30573
|
} // 如果是树形表格
|
|
30456
30574
|
|
|
30457
30575
|
|
|
30458
|
-
if (treeConfig && treeExpandeds.length) {
|
|
30576
|
+
if (treeConfig && !scrollYLoad && treeExpandeds.length) {
|
|
30459
30577
|
var rowChildren = row[treeOpts.children];
|
|
30460
30578
|
|
|
30461
30579
|
if (rowChildren && rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1) {
|
|
30462
|
-
rows.push.apply(rows, _toConsumableArray(renderRows($seq ? "".concat($seq, ".").concat(seq) : "".concat(seq),
|
|
30580
|
+
rows.push.apply(rows, _toConsumableArray(renderRows($seq ? "".concat($seq, ".").concat(seq) : "".concat(seq), fixedType, rowChildren, tableColumn)));
|
|
30463
30581
|
}
|
|
30464
30582
|
}
|
|
30465
30583
|
});
|
|
@@ -30732,7 +30850,6 @@ var lineOffsetSizes = {
|
|
|
30732
30850
|
mouseConfig = tableProps.mouseConfig;
|
|
30733
30851
|
var tableData = tableReactData.tableData,
|
|
30734
30852
|
mergeList = tableReactData.mergeList,
|
|
30735
|
-
scrollXLoad = tableReactData.scrollXLoad,
|
|
30736
30853
|
scrollYLoad = tableReactData.scrollYLoad,
|
|
30737
30854
|
isAllOverflow = tableReactData.isAllOverflow;
|
|
30738
30855
|
var visibleColumn = tableInternalData.visibleColumn;
|
|
@@ -30745,7 +30862,7 @@ var lineOffsetSizes = {
|
|
|
30745
30862
|
// 如果是使用优化模式
|
|
30746
30863
|
|
|
30747
30864
|
if (fixedType) {
|
|
30748
|
-
if (
|
|
30865
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
30749
30866
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
30750
30867
|
tableColumn = fixedColumn;
|
|
30751
30868
|
} else {
|
|
@@ -30818,7 +30935,7 @@ var lineOffsetSizes = {
|
|
|
30818
30935
|
*/
|
|
30819
30936
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tbody', {
|
|
30820
30937
|
ref: refBodyTBody
|
|
30821
|
-
}, renderRows('',
|
|
30938
|
+
}, renderRows('', fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30822
30939
|
class: 'vxe-table--checkbox-range'
|
|
30823
30940
|
}), mouseConfig && mouseOpts.area ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30824
30941
|
class: 'vxe-table--cell-area'
|
|
@@ -31131,6 +31248,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31131
31248
|
treeExpandedReserveRowMap: {},
|
|
31132
31249
|
// 完整数据、条件处理后
|
|
31133
31250
|
tableFullData: [],
|
|
31251
|
+
treeFullData: [],
|
|
31134
31252
|
afterFullData: [],
|
|
31135
31253
|
tableSynchData: [],
|
|
31136
31254
|
tableSourceData: [],
|
|
@@ -31192,7 +31310,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31192
31310
|
};
|
|
31193
31311
|
});
|
|
31194
31312
|
var computeColumnOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31195
|
-
return Object.assign({}, props.columnConfig);
|
|
31313
|
+
return Object.assign({}, conf.table.columnConfig, props.columnConfig);
|
|
31314
|
+
});
|
|
31315
|
+
var computeRowOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31316
|
+
return Object.assign({}, conf.table.rowConfig, props.rowConfig);
|
|
31196
31317
|
});
|
|
31197
31318
|
var computeResizableOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31198
31319
|
return Object.assign({}, conf.table.resizableConfig, props.resizableConfig);
|
|
@@ -31389,6 +31510,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31389
31510
|
computeValidOpts: computeValidOpts,
|
|
31390
31511
|
computeSXOpts: computeSXOpts,
|
|
31391
31512
|
computeSYOpts: computeSYOpts,
|
|
31513
|
+
computeColumnOpts: computeColumnOpts,
|
|
31514
|
+
computeRowOpts: computeRowOpts,
|
|
31392
31515
|
computeResizableOpts: computeResizableOpts,
|
|
31393
31516
|
computeSeqOpts: computeSeqOpts,
|
|
31394
31517
|
computeRadioOpts: computeRadioOpts,
|
|
@@ -32136,7 +32259,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32136
32259
|
$index: -1,
|
|
32137
32260
|
_index: _index,
|
|
32138
32261
|
items: [],
|
|
32139
|
-
parent: null
|
|
32262
|
+
parent: null,
|
|
32263
|
+
level: 0
|
|
32140
32264
|
};
|
|
32141
32265
|
}
|
|
32142
32266
|
});
|
|
@@ -32448,7 +32572,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32448
32572
|
var _tWidth = tableWidth; // 如果是使用优化模式
|
|
32449
32573
|
|
|
32450
32574
|
if (fixedType) {
|
|
32451
|
-
if (
|
|
32575
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
32452
32576
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
32453
32577
|
tableColumn = fixedColumn;
|
|
32454
32578
|
} else {
|
|
@@ -32549,16 +32673,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32549
32673
|
var showTitle = cellOverflow === 'title';
|
|
32550
32674
|
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
32551
32675
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
32552
|
-
var _listElem = elemStore["".concat(name, "-").concat(layout, "-list")]; //
|
|
32676
|
+
var _listElem = elemStore["".concat(name, "-").concat(layout, "-list")]; // 纵向虚拟滚动不支持动态行高
|
|
32553
32677
|
|
|
32554
|
-
if (
|
|
32555
|
-
|
|
32556
|
-
hasEllipsis = true;
|
|
32557
|
-
}
|
|
32558
|
-
} else {
|
|
32559
|
-
if ((scrollXLoad || scrollYLoad) && !hasEllipsis) {
|
|
32560
|
-
hasEllipsis = true;
|
|
32561
|
-
}
|
|
32678
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
32679
|
+
hasEllipsis = true;
|
|
32562
32680
|
}
|
|
32563
32681
|
|
|
32564
32682
|
if (_listElem) {
|
|
@@ -32883,7 +33001,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32883
33001
|
}
|
|
32884
33002
|
|
|
32885
33003
|
if (childRecords) {
|
|
32886
|
-
tableMethods.
|
|
33004
|
+
tableMethods.loadTreeChildren(row, childRecords).then(function (childRows) {
|
|
32887
33005
|
if (childRows.length && $xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
32888
33006
|
treeExpandeds.push(row);
|
|
32889
33007
|
} // 如果当前节点已选中,则展开后子节点也被选中
|
|
@@ -33046,30 +33164,67 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33046
33164
|
scrollXStore = internalData.scrollXStore,
|
|
33047
33165
|
lastScrollLeft = internalData.lastScrollLeft,
|
|
33048
33166
|
lastScrollTop = internalData.lastScrollTop;
|
|
33049
|
-
var
|
|
33050
|
-
var
|
|
33051
|
-
var
|
|
33167
|
+
var treeOpts = computeTreeOpts.value;
|
|
33168
|
+
var transform = treeOpts.transform;
|
|
33169
|
+
var treeData = [];
|
|
33170
|
+
var fullData = datas ? datas.slice(0) : [];
|
|
33171
|
+
|
|
33172
|
+
if (treeConfig) {
|
|
33173
|
+
if (transform) {
|
|
33174
|
+
// 树结构自动转换
|
|
33175
|
+
if (true) {
|
|
33176
|
+
if (!treeOpts.rowtKey) {
|
|
33177
|
+
errLog('vxe.error.reqProp', ['tree-config.rowtKey']);
|
|
33178
|
+
}
|
|
33179
|
+
|
|
33180
|
+
if (!treeOpts.parentKey) {
|
|
33181
|
+
errLog('vxe.error.reqProp', ['tree-config.parentKey']);
|
|
33182
|
+
}
|
|
33183
|
+
|
|
33184
|
+
if (!treeOpts.children) {
|
|
33185
|
+
errLog('vxe.error.reqProp', ['tree-config.children']);
|
|
33186
|
+
}
|
|
33187
|
+
|
|
33188
|
+
fullData.forEach(function (row) {
|
|
33189
|
+
if (row[treeOpts.children] && row[treeOpts.children].length) {
|
|
33190
|
+
warnLog('vxe.error.errConflicts', ['tree-config.transform', "row.".concat(treeOpts.children)]);
|
|
33191
|
+
}
|
|
33192
|
+
});
|
|
33193
|
+
}
|
|
33194
|
+
|
|
33195
|
+
treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toArrayTree(fullData, {
|
|
33196
|
+
key: treeOpts.rowtKey,
|
|
33197
|
+
parentKey: treeOpts.parentKey,
|
|
33198
|
+
children: treeOpts.children
|
|
33199
|
+
});
|
|
33200
|
+
fullData = treeData.slice(0);
|
|
33201
|
+
} else {
|
|
33202
|
+
treeData = fullData.slice(0);
|
|
33203
|
+
}
|
|
33204
|
+
}
|
|
33205
|
+
|
|
33052
33206
|
scrollYStore.startIndex = 0;
|
|
33053
33207
|
scrollYStore.endIndex = 1;
|
|
33054
33208
|
scrollXStore.startIndex = 0;
|
|
33055
33209
|
scrollXStore.endIndex = 1;
|
|
33056
33210
|
editStore.insertList = [];
|
|
33057
|
-
editStore.removeList = [];
|
|
33211
|
+
editStore.removeList = [];
|
|
33212
|
+
var sYLoad = updateScrollYStatus(fullData);
|
|
33213
|
+
reactData.scrollYLoad = sYLoad; // 全量数据
|
|
33058
33214
|
|
|
33059
|
-
internalData.tableFullData =
|
|
33215
|
+
internalData.tableFullData = fullData;
|
|
33216
|
+
internalData.treeFullData = treeData; // 缓存数据
|
|
33060
33217
|
|
|
33061
|
-
tablePrivateMethods.
|
|
33218
|
+
tablePrivateMethods.cacheRowMap(true); // 原始数据
|
|
33062
33219
|
|
|
33063
|
-
internalData.tableSynchData = datas;
|
|
33220
|
+
internalData.tableSynchData = datas; // 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
33064
33221
|
|
|
33065
33222
|
if (keepSource) {
|
|
33066
|
-
internalData.tableSourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clone(
|
|
33223
|
+
internalData.tableSourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clone(fullData, true);
|
|
33067
33224
|
}
|
|
33068
33225
|
|
|
33069
|
-
reactData.scrollYLoad = scrollYLoad;
|
|
33070
|
-
|
|
33071
33226
|
if (true) {
|
|
33072
|
-
if (
|
|
33227
|
+
if (sYLoad) {
|
|
33073
33228
|
if (!(props.height || props.maxHeight)) {
|
|
33074
33229
|
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
33075
33230
|
}
|
|
@@ -33099,8 +33254,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33099
33254
|
}).then(function () {
|
|
33100
33255
|
computeScrollLoad();
|
|
33101
33256
|
}).then(function () {
|
|
33102
|
-
//
|
|
33103
|
-
if (
|
|
33257
|
+
// 是否启用了虚拟滚动
|
|
33258
|
+
if (sYLoad) {
|
|
33104
33259
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
33105
33260
|
}
|
|
33106
33261
|
|
|
@@ -33111,7 +33266,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33111
33266
|
return tableMethods.recalculate();
|
|
33112
33267
|
}).then(function () {
|
|
33113
33268
|
// 是否变更虚拟滚动
|
|
33114
|
-
if (oldScrollYLoad ===
|
|
33269
|
+
if (oldScrollYLoad === sYLoad) {
|
|
33115
33270
|
restoreScrollLocation($xetable, lastScrollLeft, lastScrollTop).then(resolve);
|
|
33116
33271
|
} else {
|
|
33117
33272
|
setTimeout(function () {
|
|
@@ -33380,6 +33535,135 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33380
33535
|
return tableMethods.recalculate();
|
|
33381
33536
|
});
|
|
33382
33537
|
};
|
|
33538
|
+
|
|
33539
|
+
var updateScrollYStatus = function updateScrollYStatus(fullData) {
|
|
33540
|
+
var treeConfig = props.treeConfig;
|
|
33541
|
+
var sYOpts = computeSYOpts.value;
|
|
33542
|
+
var treeOpts = computeTreeOpts.value;
|
|
33543
|
+
var transform = treeOpts.transform;
|
|
33544
|
+
var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && sYOpts.gt < fullData.length;
|
|
33545
|
+
reactData.scrollYLoad = scrollYLoad;
|
|
33546
|
+
return scrollYLoad;
|
|
33547
|
+
};
|
|
33548
|
+
|
|
33549
|
+
var updateVirtualTreeData = function updateVirtualTreeData() {
|
|
33550
|
+
var oldScrollYLoad = reactData.scrollYLoad,
|
|
33551
|
+
treeExpandeds = reactData.treeExpandeds;
|
|
33552
|
+
var treeFullData = internalData.treeFullData;
|
|
33553
|
+
var treeOpts = computeTreeOpts.value;
|
|
33554
|
+
var fullData = [];
|
|
33555
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row, index, items, path, parent) {
|
|
33556
|
+
if (!parent || $xetable.findRowIndexOf(treeExpandeds, parent) > -1) {
|
|
33557
|
+
fullData.push(row);
|
|
33558
|
+
}
|
|
33559
|
+
}, treeOpts);
|
|
33560
|
+
var scrollYLoad = updateScrollYStatus(fullData);
|
|
33561
|
+
internalData.tableFullData = scrollYLoad ? fullData : treeFullData;
|
|
33562
|
+
|
|
33563
|
+
if (scrollYLoad || oldScrollYLoad !== scrollYLoad) {
|
|
33564
|
+
return tablePrivateMethods.handleTableData(true).then(function () {
|
|
33565
|
+
return tableMethods.recalculate();
|
|
33566
|
+
});
|
|
33567
|
+
}
|
|
33568
|
+
|
|
33569
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
33570
|
+
};
|
|
33571
|
+
/**
|
|
33572
|
+
* 展开与收起树节点
|
|
33573
|
+
* @param rows
|
|
33574
|
+
* @param expanded
|
|
33575
|
+
* @returns
|
|
33576
|
+
*/
|
|
33577
|
+
|
|
33578
|
+
|
|
33579
|
+
var handleBaseTreeExpand = function handleBaseTreeExpand(rows, expanded) {
|
|
33580
|
+
var treeExpandeds = reactData.treeExpandeds,
|
|
33581
|
+
treeLazyLoadeds = reactData.treeLazyLoadeds,
|
|
33582
|
+
treeNodeColumn = reactData.treeNodeColumn;
|
|
33583
|
+
var fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
33584
|
+
tableFullData = internalData.tableFullData;
|
|
33585
|
+
var treeOpts = computeTreeOpts.value;
|
|
33586
|
+
var reserve = treeOpts.reserve,
|
|
33587
|
+
lazy = treeOpts.lazy,
|
|
33588
|
+
hasChild = treeOpts.hasChild,
|
|
33589
|
+
children = treeOpts.children,
|
|
33590
|
+
accordion = treeOpts.accordion,
|
|
33591
|
+
toggleMethod = treeOpts.toggleMethod;
|
|
33592
|
+
var result = [];
|
|
33593
|
+
var columnIndex = tableMethods.getColumnIndex(treeNodeColumn);
|
|
33594
|
+
var $columnIndex = tableMethods.getVMColumnIndex(treeNodeColumn);
|
|
33595
|
+
var validRows = toggleMethod ? rows.filter(function (row) {
|
|
33596
|
+
return toggleMethod({
|
|
33597
|
+
$table: $xetable,
|
|
33598
|
+
expanded: expanded,
|
|
33599
|
+
column: treeNodeColumn,
|
|
33600
|
+
columnIndex: columnIndex,
|
|
33601
|
+
$columnIndex: $columnIndex,
|
|
33602
|
+
row: row
|
|
33603
|
+
});
|
|
33604
|
+
}) : rows;
|
|
33605
|
+
|
|
33606
|
+
if (accordion) {
|
|
33607
|
+
validRows = validRows.length ? [validRows[validRows.length - 1]] : []; // 同一级只能展开一个
|
|
33608
|
+
|
|
33609
|
+
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
|
|
33610
|
+
return item === validRows[0];
|
|
33611
|
+
}, treeOpts);
|
|
33612
|
+
|
|
33613
|
+
if (matchObj) {
|
|
33614
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (item) {
|
|
33615
|
+
return matchObj.items.indexOf(item) > -1;
|
|
33616
|
+
});
|
|
33617
|
+
}
|
|
33618
|
+
}
|
|
33619
|
+
|
|
33620
|
+
if (expanded) {
|
|
33621
|
+
validRows.forEach(function (row) {
|
|
33622
|
+
if ($xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
33623
|
+
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
33624
|
+
|
|
33625
|
+
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1; // 是否使用懒加载
|
|
33626
|
+
|
|
33627
|
+
if (isLoad) {
|
|
33628
|
+
result.push(handleAsyncTreeExpandChilds(row));
|
|
33629
|
+
} else {
|
|
33630
|
+
if (row[children] && row[children].length) {
|
|
33631
|
+
treeExpandeds.push(row);
|
|
33632
|
+
}
|
|
33633
|
+
}
|
|
33634
|
+
}
|
|
33635
|
+
});
|
|
33636
|
+
} else {
|
|
33637
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (row) {
|
|
33638
|
+
return $xetable.findRowIndexOf(validRows, row) > -1;
|
|
33639
|
+
});
|
|
33640
|
+
}
|
|
33641
|
+
|
|
33642
|
+
if (reserve) {
|
|
33643
|
+
validRows.forEach(function (row) {
|
|
33644
|
+
return handleTreeExpandReserve(row, expanded);
|
|
33645
|
+
});
|
|
33646
|
+
}
|
|
33647
|
+
|
|
33648
|
+
return Promise.all(result).then(function () {
|
|
33649
|
+
return tableMethods.recalculate();
|
|
33650
|
+
});
|
|
33651
|
+
};
|
|
33652
|
+
/**
|
|
33653
|
+
* 虚拟树的展开与收起
|
|
33654
|
+
* @param rows
|
|
33655
|
+
* @param expanded
|
|
33656
|
+
* @returns
|
|
33657
|
+
*/
|
|
33658
|
+
|
|
33659
|
+
|
|
33660
|
+
var handleVirtualTreeExpand = function handleVirtualTreeExpand(rows, expanded) {
|
|
33661
|
+
return handleBaseTreeExpand(rows, expanded).then(function () {
|
|
33662
|
+
return updateVirtualTreeData();
|
|
33663
|
+
}).then(function () {
|
|
33664
|
+
return tableMethods.recalculate();
|
|
33665
|
+
});
|
|
33666
|
+
};
|
|
33383
33667
|
/**
|
|
33384
33668
|
* 纵向 Y 可视渲染处理
|
|
33385
33669
|
*/
|
|
@@ -33526,7 +33810,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33526
33810
|
tableSourceData[rowIndex] = record;
|
|
33527
33811
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clear(row, undefined);
|
|
33528
33812
|
Object.assign(row, tablePrivateMethods.defineField(Object.assign({}, record)));
|
|
33529
|
-
tablePrivateMethods.
|
|
33813
|
+
tablePrivateMethods.cacheRowMap(true);
|
|
33530
33814
|
} else {
|
|
33531
33815
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.destructuring(oRow, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clone(row, true));
|
|
33532
33816
|
}
|
|
@@ -33546,15 +33830,18 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33546
33830
|
/**
|
|
33547
33831
|
* 用于树结构,给行数据加载子节点
|
|
33548
33832
|
*/
|
|
33549
|
-
|
|
33550
|
-
|
|
33551
|
-
|
|
33552
|
-
|
|
33553
|
-
|
|
33554
|
-
|
|
33555
|
-
|
|
33556
|
-
var children = treeOpts.children;
|
|
33833
|
+
loadTreeChildren: function loadTreeChildren(row, childRecords) {
|
|
33834
|
+
var keepSource = props.keepSource;
|
|
33835
|
+
var tableSourceData = internalData.tableSourceData,
|
|
33836
|
+
fullDataRowIdData = internalData.fullDataRowIdData,
|
|
33837
|
+
fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
33838
|
+
var treeOpts = computeTreeOpts.value;
|
|
33839
|
+
var children = treeOpts.children;
|
|
33557
33840
|
|
|
33841
|
+
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
33842
|
+
|
|
33843
|
+
var parentLevel = rest ? rest.level : 0;
|
|
33844
|
+
return tableMethods.createData(childRecords).then(function (rows) {
|
|
33558
33845
|
if (keepSource) {
|
|
33559
33846
|
var rowid = util_getRowid($xetable, row);
|
|
33560
33847
|
|
|
@@ -33567,7 +33854,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33567
33854
|
}
|
|
33568
33855
|
}
|
|
33569
33856
|
|
|
33570
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent) {
|
|
33857
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
|
|
33571
33858
|
var rowid = util_getRowid($xetable, childRow);
|
|
33572
33859
|
|
|
33573
33860
|
var rest = {
|
|
@@ -33577,7 +33864,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33577
33864
|
_index: -1,
|
|
33578
33865
|
$index: -1,
|
|
33579
33866
|
items: items,
|
|
33580
|
-
parent: parent
|
|
33867
|
+
parent: parent,
|
|
33868
|
+
level: parentLevel + nodes.length
|
|
33581
33869
|
};
|
|
33582
33870
|
fullDataRowIdData[rowid] = rest;
|
|
33583
33871
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -34922,10 +35210,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
34922
35210
|
},
|
|
34923
35211
|
|
|
34924
35212
|
/**
|
|
34925
|
-
*
|
|
35213
|
+
* 重新懒加载展开行,并展开内容
|
|
34926
35214
|
* @param {Row} row 行对象
|
|
34927
35215
|
*/
|
|
34928
|
-
|
|
35216
|
+
reloadRowExpand: function reloadRowExpand(row) {
|
|
34929
35217
|
var expandLazyLoadeds = reactData.expandLazyLoadeds;
|
|
34930
35218
|
var expandOpts = computeExpandOpts.value;
|
|
34931
35219
|
var lazy = expandOpts.lazy;
|
|
@@ -34938,6 +35226,14 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
34938
35226
|
|
|
34939
35227
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
34940
35228
|
},
|
|
35229
|
+
reloadExpandContent: function reloadExpandContent(row) {
|
|
35230
|
+
if (true) {
|
|
35231
|
+
warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
|
|
35232
|
+
} // 即将废弃
|
|
35233
|
+
|
|
35234
|
+
|
|
35235
|
+
return tableMethods.reloadRowExpand(row);
|
|
35236
|
+
},
|
|
34941
35237
|
|
|
34942
35238
|
/**
|
|
34943
35239
|
* 切换展开行
|
|
@@ -35106,23 +35402,38 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35106
35402
|
},
|
|
35107
35403
|
|
|
35108
35404
|
/**
|
|
35109
|
-
*
|
|
35405
|
+
* 重新懒加载树节点,并展开该节点
|
|
35110
35406
|
* @param {Row} row 行对象
|
|
35111
35407
|
*/
|
|
35112
|
-
|
|
35408
|
+
reloadTreeExpand: function reloadTreeExpand(row) {
|
|
35113
35409
|
var treeLazyLoadeds = reactData.treeLazyLoadeds;
|
|
35114
35410
|
var treeOpts = computeTreeOpts.value;
|
|
35115
|
-
var
|
|
35411
|
+
var transform = treeOpts.transform,
|
|
35412
|
+
lazy = treeOpts.lazy,
|
|
35116
35413
|
hasChild = treeOpts.hasChild;
|
|
35117
35414
|
|
|
35118
35415
|
if (lazy && row[hasChild] && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1) {
|
|
35119
35416
|
tableMethods.clearTreeExpandLoaded(row).then(function () {
|
|
35120
35417
|
return handleAsyncTreeExpandChilds(row);
|
|
35418
|
+
}).then(function () {
|
|
35419
|
+
if (transform) {
|
|
35420
|
+
return updateVirtualTreeData();
|
|
35421
|
+
}
|
|
35422
|
+
}).then(function () {
|
|
35423
|
+
return tableMethods.recalculate();
|
|
35121
35424
|
});
|
|
35122
35425
|
}
|
|
35123
35426
|
|
|
35124
35427
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
35125
35428
|
},
|
|
35429
|
+
reloadTreeChilds: function reloadTreeChilds(row) {
|
|
35430
|
+
if (true) {
|
|
35431
|
+
warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
|
|
35432
|
+
} // 即将废弃
|
|
35433
|
+
|
|
35434
|
+
|
|
35435
|
+
return tableMethods.reloadTreeExpand(row);
|
|
35436
|
+
},
|
|
35126
35437
|
|
|
35127
35438
|
/**
|
|
35128
35439
|
* 切换/展开树节点
|
|
@@ -35159,21 +35470,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35159
35470
|
* @param {Boolean} expanded 是否展开
|
|
35160
35471
|
*/
|
|
35161
35472
|
setTreeExpand: function setTreeExpand(rows, expanded) {
|
|
35162
|
-
var treeExpandeds = reactData.treeExpandeds,
|
|
35163
|
-
treeLazyLoadeds = reactData.treeLazyLoadeds,
|
|
35164
|
-
treeNodeColumn = reactData.treeNodeColumn;
|
|
35165
|
-
var fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
35166
|
-
tableFullData = internalData.tableFullData;
|
|
35167
35473
|
var treeOpts = computeTreeOpts.value;
|
|
35168
|
-
var
|
|
35169
|
-
lazy = treeOpts.lazy,
|
|
35170
|
-
hasChild = treeOpts.hasChild,
|
|
35171
|
-
children = treeOpts.children,
|
|
35172
|
-
accordion = treeOpts.accordion,
|
|
35173
|
-
toggleMethod = treeOpts.toggleMethod;
|
|
35174
|
-
var result = [];
|
|
35175
|
-
var columnIndex = tableMethods.getColumnIndex(treeNodeColumn);
|
|
35176
|
-
var $columnIndex = tableMethods.getVMColumnIndex(treeNodeColumn);
|
|
35474
|
+
var transform = treeOpts.transform;
|
|
35177
35475
|
|
|
35178
35476
|
if (rows) {
|
|
35179
35477
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(rows)) {
|
|
@@ -35181,62 +35479,12 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35181
35479
|
}
|
|
35182
35480
|
|
|
35183
35481
|
if (rows.length) {
|
|
35184
|
-
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
expanded: expanded,
|
|
35188
|
-
column: treeNodeColumn,
|
|
35189
|
-
columnIndex: columnIndex,
|
|
35190
|
-
$columnIndex: $columnIndex,
|
|
35191
|
-
row: row
|
|
35192
|
-
});
|
|
35193
|
-
}) : rows;
|
|
35194
|
-
|
|
35195
|
-
if (accordion) {
|
|
35196
|
-
validRows = validRows.length ? [validRows[validRows.length - 1]] : []; // 同一级只能展开一个
|
|
35197
|
-
|
|
35198
|
-
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
|
|
35199
|
-
return item === validRows[0];
|
|
35200
|
-
}, treeOpts);
|
|
35201
|
-
|
|
35202
|
-
if (matchObj) {
|
|
35203
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (item) {
|
|
35204
|
-
return matchObj.items.indexOf(item) > -1;
|
|
35205
|
-
});
|
|
35206
|
-
}
|
|
35207
|
-
}
|
|
35208
|
-
|
|
35209
|
-
if (expanded) {
|
|
35210
|
-
validRows.forEach(function (row) {
|
|
35211
|
-
if ($xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
35212
|
-
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
35213
|
-
|
|
35214
|
-
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1; // 是否使用懒加载
|
|
35215
|
-
|
|
35216
|
-
if (isLoad) {
|
|
35217
|
-
result.push(handleAsyncTreeExpandChilds(row));
|
|
35218
|
-
} else {
|
|
35219
|
-
if (row[children] && row[children].length) {
|
|
35220
|
-
treeExpandeds.push(row);
|
|
35221
|
-
}
|
|
35222
|
-
}
|
|
35223
|
-
}
|
|
35224
|
-
});
|
|
35482
|
+
// 如果为虚拟树
|
|
35483
|
+
if (transform) {
|
|
35484
|
+
return handleVirtualTreeExpand(rows, expanded);
|
|
35225
35485
|
} else {
|
|
35226
|
-
|
|
35227
|
-
return $xetable.findRowIndexOf(validRows, row) > -1;
|
|
35228
|
-
});
|
|
35486
|
+
return handleBaseTreeExpand(rows, expanded);
|
|
35229
35487
|
}
|
|
35230
|
-
|
|
35231
|
-
if (reserve) {
|
|
35232
|
-
validRows.forEach(function (row) {
|
|
35233
|
-
return handleTreeExpandReserve(row, expanded);
|
|
35234
|
-
});
|
|
35235
|
-
}
|
|
35236
|
-
|
|
35237
|
-
return Promise.all(result).then(function () {
|
|
35238
|
-
return tableMethods.recalculate();
|
|
35239
|
-
});
|
|
35240
35488
|
}
|
|
35241
35489
|
}
|
|
35242
35490
|
|
|
@@ -35257,19 +35505,19 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35257
35505
|
*/
|
|
35258
35506
|
clearTreeExpand: function clearTreeExpand() {
|
|
35259
35507
|
var treeExpandeds = reactData.treeExpandeds;
|
|
35260
|
-
var
|
|
35508
|
+
var treeFullData = internalData.treeFullData;
|
|
35261
35509
|
var treeOpts = computeTreeOpts.value;
|
|
35262
35510
|
var reserve = treeOpts.reserve;
|
|
35263
35511
|
var isExists = treeExpandeds.length;
|
|
35264
35512
|
reactData.treeExpandeds = [];
|
|
35265
35513
|
|
|
35266
35514
|
if (reserve) {
|
|
35267
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(
|
|
35515
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row) {
|
|
35268
35516
|
return handleTreeExpandReserve(row, false);
|
|
35269
35517
|
}, treeOpts);
|
|
35270
35518
|
}
|
|
35271
35519
|
|
|
35272
|
-
return
|
|
35520
|
+
return updateVirtualTreeData().then(function () {
|
|
35273
35521
|
if (isExists) {
|
|
35274
35522
|
tableMethods.recalculate();
|
|
35275
35523
|
}
|
|
@@ -36258,16 +36506,17 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36258
36506
|
* 更新数据行的 Map
|
|
36259
36507
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
36260
36508
|
*/
|
|
36261
|
-
|
|
36509
|
+
cacheRowMap: function cacheRowMap(isSource) {
|
|
36262
36510
|
var treeConfig = props.treeConfig;
|
|
36263
36511
|
var treeOpts = computeTreeOpts.value;
|
|
36264
36512
|
var fullDataRowIdData = internalData.fullDataRowIdData,
|
|
36265
36513
|
fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
36266
|
-
tableFullData = internalData.tableFullData
|
|
36514
|
+
tableFullData = internalData.tableFullData,
|
|
36515
|
+
treeFullData = internalData.treeFullData;
|
|
36267
36516
|
var rowkey = getRowkey($xetable);
|
|
36268
36517
|
var isLazy = treeConfig && treeOpts.lazy;
|
|
36269
36518
|
|
|
36270
|
-
var handleCache = function handleCache(row, index, items, path, parent) {
|
|
36519
|
+
var handleCache = function handleCache(row, index, items, path, parent, nodes) {
|
|
36271
36520
|
var rowid = util_getRowid($xetable, row);
|
|
36272
36521
|
|
|
36273
36522
|
if (eqEmptyValue(rowid)) {
|
|
@@ -36286,7 +36535,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36286
36535
|
_index: -1,
|
|
36287
36536
|
$index: -1,
|
|
36288
36537
|
items: items,
|
|
36289
|
-
parent: parent
|
|
36538
|
+
parent: parent,
|
|
36539
|
+
level: nodes ? nodes.length - 1 : 0
|
|
36290
36540
|
};
|
|
36291
36541
|
|
|
36292
36542
|
if (isSource) {
|
|
@@ -36303,7 +36553,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36303
36553
|
fullAllDataRowIdData = internalData.fullAllDataRowIdData = {};
|
|
36304
36554
|
|
|
36305
36555
|
if (treeConfig) {
|
|
36306
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(
|
|
36556
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, handleCache, treeOpts);
|
|
36307
36557
|
} else {
|
|
36308
36558
|
tableFullData.forEach(handleCache);
|
|
36309
36559
|
}
|
|
@@ -36699,10 +36949,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36699
36949
|
var column = params.column;
|
|
36700
36950
|
var titleHelp = column.titleHelp;
|
|
36701
36951
|
|
|
36702
|
-
if (titleHelp.message) {
|
|
36952
|
+
if (titleHelp.content || titleHelp.message) {
|
|
36703
36953
|
var tooltipStore = internalData.tooltipStore;
|
|
36704
36954
|
var $tooltip = refTooltip.value;
|
|
36705
|
-
var content = getFuncText(titleHelp.message);
|
|
36955
|
+
var content = getFuncText(titleHelp.content || titleHelp.message);
|
|
36706
36956
|
handleTargetEnterEvent();
|
|
36707
36957
|
tooltipStore.visible = true;
|
|
36708
36958
|
|
|
@@ -37450,6 +37700,20 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37450
37700
|
return false;
|
|
37451
37701
|
}
|
|
37452
37702
|
};
|
|
37703
|
+
|
|
37704
|
+
if (true) {
|
|
37705
|
+
'openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').forEach(function (name) {
|
|
37706
|
+
$xetable[name] = function () {
|
|
37707
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
37708
|
+
};
|
|
37709
|
+
});
|
|
37710
|
+
'clearValidate,fullValidate,validate'.split(',').forEach(function (name) {
|
|
37711
|
+
$xetable[name] = function () {
|
|
37712
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
37713
|
+
};
|
|
37714
|
+
});
|
|
37715
|
+
}
|
|
37716
|
+
|
|
37453
37717
|
Object.assign($xetable, tableMethods, tablePrivateMethods);
|
|
37454
37718
|
/**
|
|
37455
37719
|
* 渲染浮固定列
|
|
@@ -37711,6 +37975,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37711
37975
|
if (true) {
|
|
37712
37976
|
var customOpts = computeCustomOpts.value;
|
|
37713
37977
|
var mouseOpts = computeMouseOpts.value;
|
|
37978
|
+
var rowOpts = computeRowOpts.value;
|
|
37714
37979
|
|
|
37715
37980
|
if (!props.id && props.customConfig && (customOpts.storage === true || customOpts.storage && customOpts.storage.resizable || customOpts.storage && customOpts.storage.visible)) {
|
|
37716
37981
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -37720,6 +37985,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37720
37985
|
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
37721
37986
|
}
|
|
37722
37987
|
|
|
37988
|
+
if (rowOpts.height && !props.showOverflow) {
|
|
37989
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
37990
|
+
}
|
|
37991
|
+
|
|
37723
37992
|
if (!$xetable.handleUpdateCellAreas) {
|
|
37724
37993
|
if (props.clipConfig) {
|
|
37725
37994
|
warnLog('vxe.error.notProp', ['clip-config']);
|