vxe-table 4.1.0 → 4.1.3
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/cell.js +70 -54
- package/es/table/src/props.js +4 -1
- package/es/table/src/table.js +208 -97
- package/es/v-x-e-table/src/conf.js +2 -3
- package/es/validator/src/hook.js +12 -5
- package/helper/vetur/attributes.json +16 -8
- package/helper/vetur/tags.json +2 -0
- 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 +536 -220
- 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/cell.js +92 -35
- package/lib/table/src/cell.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 +265 -133
- package/lib/table/src/table.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +2 -3
- 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 +2 -2
- 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/cell.ts +77 -44
- package/packages/table/src/props.ts +4 -1
- package/packages/table/src/table.ts +211 -96
- package/packages/v-x-e-table/src/conf.ts +2 -3
- 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 +49 -14
- 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,8 +8021,8 @@ var GlobalConfig = {
|
|
|
8022
8021
|
showIcon: true
|
|
8023
8022
|
},
|
|
8024
8023
|
treeConfig: {
|
|
8025
|
-
|
|
8026
|
-
|
|
8024
|
+
rowField: 'id',
|
|
8025
|
+
parentField: 'parentId',
|
|
8027
8026
|
children: 'children',
|
|
8028
8027
|
hasChild: 'hasChild',
|
|
8029
8028
|
indent: 20,
|
|
@@ -11764,7 +11763,7 @@ var editHook = {
|
|
|
11764
11763
|
|
|
11765
11764
|
reactData.scrollYLoad = !treeConfig && sYOpts.gt > -1 && sYOpts.gt < tableFullData.length;
|
|
11766
11765
|
$xetable.updateFooter();
|
|
11767
|
-
$xetable.
|
|
11766
|
+
$xetable.cacheRowMap();
|
|
11768
11767
|
$xetable.handleTableData();
|
|
11769
11768
|
$xetable.updateAfterDataIndex();
|
|
11770
11769
|
$xetable.checkSelectionStatus();
|
|
@@ -11878,7 +11877,7 @@ var editHook = {
|
|
|
11878
11877
|
});
|
|
11879
11878
|
reactData.scrollYLoad = !treeConfig && sYOpts.gt > -1 && sYOpts.gt < tableFullData.length;
|
|
11880
11879
|
$xetable.updateFooter();
|
|
11881
|
-
$xetable.
|
|
11880
|
+
$xetable.cacheRowMap();
|
|
11882
11881
|
$xetable.handleTableData();
|
|
11883
11882
|
$xetable.updateAfterDataIndex();
|
|
11884
11883
|
$xetable.checkSelectionStatus();
|
|
@@ -16933,7 +16932,7 @@ function getOptUniqueId() {
|
|
|
16933
16932
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
16934
16933
|
};
|
|
16935
16934
|
|
|
16936
|
-
var
|
|
16935
|
+
var cacheItemMap = function cacheItemMap() {
|
|
16937
16936
|
var fullOptionList = reactData.fullOptionList,
|
|
16938
16937
|
fullGroupList = reactData.fullGroupList;
|
|
16939
16938
|
var groupOptionsField = computeGroupOptionsField.value;
|
|
@@ -17544,21 +17543,21 @@ function getOptUniqueId() {
|
|
|
17544
17543
|
reactData.fullOptionList = value || [];
|
|
17545
17544
|
}
|
|
17546
17545
|
|
|
17547
|
-
|
|
17546
|
+
cacheItemMap();
|
|
17548
17547
|
});
|
|
17549
17548
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
17550
17549
|
return props.options;
|
|
17551
17550
|
}, function (value) {
|
|
17552
17551
|
reactData.fullGroupList = [];
|
|
17553
17552
|
reactData.fullOptionList = value || [];
|
|
17554
|
-
|
|
17553
|
+
cacheItemMap();
|
|
17555
17554
|
});
|
|
17556
17555
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
17557
17556
|
return props.optionGroups;
|
|
17558
17557
|
}, function (value) {
|
|
17559
17558
|
reactData.fullOptionList = [];
|
|
17560
17559
|
reactData.fullGroupList = value || [];
|
|
17561
|
-
|
|
17560
|
+
cacheItemMap();
|
|
17562
17561
|
});
|
|
17563
17562
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
17564
17563
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
@@ -17571,7 +17570,7 @@ function getOptUniqueId() {
|
|
|
17571
17570
|
reactData.fullOptionList = options;
|
|
17572
17571
|
}
|
|
17573
17572
|
|
|
17574
|
-
|
|
17573
|
+
cacheItemMap();
|
|
17575
17574
|
});
|
|
17576
17575
|
GlobalEvent.on($xeselect, 'mousewheel', handleGlobalMousewheelEvent);
|
|
17577
17576
|
GlobalEvent.on($xeselect, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -18479,6 +18478,13 @@ var util_readLocalFile = function readLocalFile(options) {
|
|
|
18479
18478
|
});
|
|
18480
18479
|
} else {
|
|
18481
18480
|
if (opts.message !== false) {
|
|
18481
|
+
// 检测弹窗模块
|
|
18482
|
+
if (true) {
|
|
18483
|
+
if (!VXETable.modal) {
|
|
18484
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
18485
|
+
}
|
|
18486
|
+
}
|
|
18487
|
+
|
|
18482
18488
|
VXETable.modal.message({
|
|
18483
18489
|
content: conf.i18n('vxe.error.notType', [errType]),
|
|
18484
18490
|
status: 'error'
|
|
@@ -18577,13 +18583,20 @@ var util_saveLocalFile = function saveLocalFile(options) {
|
|
|
18577
18583
|
if (navigator.msSaveBlob) {
|
|
18578
18584
|
navigator.msSaveBlob(blob, name);
|
|
18579
18585
|
} else {
|
|
18586
|
+
var url = URL.createObjectURL(blob);
|
|
18580
18587
|
var linkElem = document.createElement('a');
|
|
18581
18588
|
linkElem.target = '_blank';
|
|
18582
18589
|
linkElem.download = name;
|
|
18583
|
-
linkElem.href =
|
|
18590
|
+
linkElem.href = url;
|
|
18584
18591
|
document.body.appendChild(linkElem);
|
|
18585
18592
|
linkElem.click();
|
|
18586
|
-
|
|
18593
|
+
requestAnimationFrame(function () {
|
|
18594
|
+
if (linkElem.parentNode) {
|
|
18595
|
+
linkElem.parentNode.removeChild(linkElem);
|
|
18596
|
+
}
|
|
18597
|
+
|
|
18598
|
+
URL.revokeObjectURL(url);
|
|
18599
|
+
});
|
|
18587
18600
|
}
|
|
18588
18601
|
|
|
18589
18602
|
return Promise.resolve();
|
|
@@ -19534,6 +19547,13 @@ var tableExportHook = {
|
|
|
19534
19547
|
content: content
|
|
19535
19548
|
}).then(function () {
|
|
19536
19549
|
if (opts.message !== false) {
|
|
19550
|
+
// 检测弹窗模块
|
|
19551
|
+
if (true) {
|
|
19552
|
+
if (!VXETable.modal) {
|
|
19553
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19554
|
+
}
|
|
19555
|
+
}
|
|
19556
|
+
|
|
19537
19557
|
VXETable.modal.message({
|
|
19538
19558
|
content: conf.i18n('vxe.table.expSuccess'),
|
|
19539
19559
|
status: 'success'
|
|
@@ -19648,6 +19668,13 @@ var tableExportHook = {
|
|
|
19648
19668
|
}
|
|
19649
19669
|
|
|
19650
19670
|
if (opts.message !== false) {
|
|
19671
|
+
// 检测弹窗模块
|
|
19672
|
+
if (true) {
|
|
19673
|
+
if (!VXETable.modal) {
|
|
19674
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19675
|
+
}
|
|
19676
|
+
}
|
|
19677
|
+
|
|
19651
19678
|
VXETable.modal.message({
|
|
19652
19679
|
content: conf.i18n('vxe.table.impSuccess', [rows.length]),
|
|
19653
19680
|
status: 'success'
|
|
@@ -19663,6 +19690,13 @@ var tableExportHook = {
|
|
|
19663
19690
|
});
|
|
19664
19691
|
});
|
|
19665
19692
|
} else if (opts.message !== false) {
|
|
19693
|
+
// 检测弹窗模块
|
|
19694
|
+
if (true) {
|
|
19695
|
+
if (!VXETable.modal) {
|
|
19696
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19697
|
+
}
|
|
19698
|
+
}
|
|
19699
|
+
|
|
19666
19700
|
VXETable.modal.message({
|
|
19667
19701
|
content: conf.i18n('vxe.error.impFields'),
|
|
19668
19702
|
status: 'error'
|
|
@@ -19687,6 +19721,13 @@ var tableExportHook = {
|
|
|
19687
19721
|
|
|
19688
19722
|
if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.includes(VXETable.config.importTypes, type)) {
|
|
19689
19723
|
if (opts.message !== false) {
|
|
19724
|
+
// 检测弹窗模块
|
|
19725
|
+
if (true) {
|
|
19726
|
+
if (!VXETable.modal) {
|
|
19727
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
19728
|
+
}
|
|
19729
|
+
}
|
|
19730
|
+
|
|
19690
19731
|
VXETable.modal.message({
|
|
19691
19732
|
content: conf.i18n('vxe.error.notType', [type]),
|
|
19692
19733
|
status: 'error'
|
|
@@ -20881,9 +20922,14 @@ var hook_Rule = /*#__PURE__*/function () {
|
|
|
20881
20922
|
|
|
20882
20923
|
|
|
20883
20924
|
_createClass(Rule, [{
|
|
20925
|
+
key: "content",
|
|
20926
|
+
get: function get() {
|
|
20927
|
+
return getFuncText(this.$options.content || this.$options.message);
|
|
20928
|
+
}
|
|
20929
|
+
}, {
|
|
20884
20930
|
key: "message",
|
|
20885
20931
|
get: function get() {
|
|
20886
|
-
return
|
|
20932
|
+
return this.content;
|
|
20887
20933
|
}
|
|
20888
20934
|
}]);
|
|
20889
20935
|
|
|
@@ -21192,7 +21238,7 @@ var validatorHook = {
|
|
|
21192
21238
|
errorRules.push(new hook_Rule({
|
|
21193
21239
|
type: 'custom',
|
|
21194
21240
|
trigger: trigger,
|
|
21195
|
-
|
|
21241
|
+
content: customValid.message,
|
|
21196
21242
|
rule: new hook_Rule(rule)
|
|
21197
21243
|
}));
|
|
21198
21244
|
} else if (customValid.catch) {
|
|
@@ -21202,7 +21248,7 @@ var validatorHook = {
|
|
|
21202
21248
|
errorRules.push(new hook_Rule({
|
|
21203
21249
|
type: 'custom',
|
|
21204
21250
|
trigger: trigger,
|
|
21205
|
-
|
|
21251
|
+
content: e && e.message ? e.message : rule.content || rule.message,
|
|
21206
21252
|
rule: new hook_Rule(rule)
|
|
21207
21253
|
}));
|
|
21208
21254
|
}));
|
|
@@ -21306,7 +21352,7 @@ var validatorHook = {
|
|
|
21306
21352
|
column = params.column,
|
|
21307
21353
|
cell = params.cell;
|
|
21308
21354
|
var validTip = refValidTooltip.value;
|
|
21309
|
-
var content = rule.
|
|
21355
|
+
var content = rule.content;
|
|
21310
21356
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])().then(function () {
|
|
21311
21357
|
Object.assign(validStore, {
|
|
21312
21358
|
row: row,
|
|
@@ -21452,6 +21498,9 @@ var renderType = 'header';
|
|
|
21452
21498
|
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
21453
21499
|
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
21454
21500
|
|
|
21501
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
21502
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
21503
|
+
|
|
21455
21504
|
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
21456
21505
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
21457
21506
|
var refHeaderTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
@@ -21597,14 +21646,15 @@ var renderType = 'header';
|
|
|
21597
21646
|
mouseConfig = tableProps.mouseConfig;
|
|
21598
21647
|
var isGroup = tableReactData.isGroup,
|
|
21599
21648
|
currentColumn = tableReactData.currentColumn,
|
|
21600
|
-
|
|
21649
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
21601
21650
|
overflowX = tableReactData.overflowX,
|
|
21602
21651
|
scrollbarWidth = tableReactData.scrollbarWidth;
|
|
21652
|
+
var columnOpts = computeColumnOpts.value;
|
|
21603
21653
|
var headerGroups = headerColumn.value; // 如果是使用优化模式
|
|
21604
21654
|
|
|
21605
21655
|
if (!isGroup) {
|
|
21606
21656
|
if (fixedType) {
|
|
21607
|
-
if (
|
|
21657
|
+
if (scrollYLoad || allColumnHeaderOverflow) {
|
|
21608
21658
|
tableColumn = fixedColumn;
|
|
21609
21659
|
}
|
|
21610
21660
|
}
|
|
@@ -21701,9 +21751,9 @@ var renderType = 'header';
|
|
|
21701
21751
|
onDblclick: function onDblclick(evnt) {
|
|
21702
21752
|
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
21703
21753
|
}
|
|
21704
|
-
}; //
|
|
21754
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
21705
21755
|
|
|
21706
|
-
if (
|
|
21756
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
21707
21757
|
showEllipsis = hasEllipsis = true;
|
|
21708
21758
|
} // 按下事件处理
|
|
21709
21759
|
|
|
@@ -21732,7 +21782,7 @@ var renderType = 'header';
|
|
|
21732
21782
|
/**
|
|
21733
21783
|
* 列宽拖动
|
|
21734
21784
|
*/
|
|
21735
|
-
!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', {
|
|
21785
|
+
!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', {
|
|
21736
21786
|
class: ['vxe-resizable', {
|
|
21737
21787
|
'is--line': !border || border === 'none'
|
|
21738
21788
|
}],
|
|
@@ -21926,7 +21976,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
21926
21976
|
columnKey = tableProps.columnKey,
|
|
21927
21977
|
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
21928
21978
|
var visibleColumn = tableInternalData.visibleColumn;
|
|
21929
|
-
var
|
|
21979
|
+
var scrollYLoad = tableReactData.scrollYLoad,
|
|
21930
21980
|
overflowX = tableReactData.overflowX,
|
|
21931
21981
|
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
21932
21982
|
currentColumn = tableReactData.currentColumn,
|
|
@@ -21934,7 +21984,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
21934
21984
|
var tooltipOpts = computeTooltipOpts.value; // 如果是使用优化模式
|
|
21935
21985
|
|
|
21936
21986
|
if (fixedType) {
|
|
21937
|
-
if (
|
|
21987
|
+
if (scrollYLoad || allColumnFooterOverflow) {
|
|
21938
21988
|
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
21939
21989
|
tableColumn = fixedColumn;
|
|
21940
21990
|
} else {
|
|
@@ -22035,9 +22085,9 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
22035
22085
|
fixed: fixedType,
|
|
22036
22086
|
type: footer_renderType,
|
|
22037
22087
|
data: footerTableData
|
|
22038
|
-
}; //
|
|
22088
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
22039
22089
|
|
|
22040
|
-
if (
|
|
22090
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
22041
22091
|
showEllipsis = hasEllipsis = true;
|
|
22042
22092
|
}
|
|
22043
22093
|
|
|
@@ -22536,18 +22586,22 @@ var Cell = {
|
|
|
22536
22586
|
var radioOpts = computeRadioOpts.value;
|
|
22537
22587
|
var slots = column.slots;
|
|
22538
22588
|
var labelField = radioOpts.labelField,
|
|
22539
|
-
checkMethod = radioOpts.checkMethod
|
|
22589
|
+
checkMethod = radioOpts.checkMethod,
|
|
22590
|
+
visibleMethod = radioOpts.visibleMethod;
|
|
22540
22591
|
var row = params.row;
|
|
22541
22592
|
var defaultSlot = slots ? slots.default : null;
|
|
22542
22593
|
var radioSlot = slots ? slots.radio : null;
|
|
22543
22594
|
var isChecked = row === selectRow;
|
|
22595
|
+
var isVisible = !visibleMethod || visibleMethod({
|
|
22596
|
+
row: row
|
|
22597
|
+
});
|
|
22544
22598
|
var isDisabled = !!checkMethod;
|
|
22545
22599
|
var ons;
|
|
22546
22600
|
|
|
22547
22601
|
if (!isHidden) {
|
|
22548
22602
|
ons = {
|
|
22549
22603
|
onClick: function onClick(evnt) {
|
|
22550
|
-
if (!isDisabled) {
|
|
22604
|
+
if (!isDisabled && isVisible) {
|
|
22551
22605
|
$table.triggerRadioRowEvent(evnt, params);
|
|
22552
22606
|
}
|
|
22553
22607
|
}
|
|
@@ -22562,21 +22616,36 @@ var Cell = {
|
|
|
22562
22616
|
|
|
22563
22617
|
var radioParams = _objectSpread2(_objectSpread2({}, params), {}, {
|
|
22564
22618
|
checked: isChecked,
|
|
22565
|
-
disabled: isDisabled
|
|
22619
|
+
disabled: isDisabled,
|
|
22620
|
+
visible: isVisible
|
|
22566
22621
|
});
|
|
22567
22622
|
|
|
22568
|
-
|
|
22623
|
+
if (radioSlot) {
|
|
22624
|
+
return $table.callSlot(radioSlot, radioParams);
|
|
22625
|
+
}
|
|
22626
|
+
|
|
22627
|
+
var radioVNs = [];
|
|
22628
|
+
|
|
22629
|
+
if (isVisible) {
|
|
22630
|
+
radioVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22631
|
+
class: 'vxe-radio--icon vxe-radio--checked-icon'
|
|
22632
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22633
|
+
class: 'vxe-radio--icon vxe-radio--unchecked-icon'
|
|
22634
|
+
}));
|
|
22635
|
+
}
|
|
22636
|
+
|
|
22637
|
+
if (defaultSlot || labelField) {
|
|
22638
|
+
radioVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22639
|
+
class: 'vxe-radio--label'
|
|
22640
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, radioParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField)));
|
|
22641
|
+
}
|
|
22642
|
+
|
|
22643
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', _objectSpread2({
|
|
22569
22644
|
class: ['vxe-cell--radio', {
|
|
22570
22645
|
'is--checked': isChecked,
|
|
22571
22646
|
'is--disabled': isDisabled
|
|
22572
22647
|
}]
|
|
22573
|
-
}, ons),
|
|
22574
|
-
class: 'vxe-radio--icon vxe-radio--checked-icon'
|
|
22575
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22576
|
-
class: 'vxe-radio--icon vxe-radio--unchecked-icon'
|
|
22577
|
-
})].concat(defaultSlot || labelField ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22578
|
-
class: 'vxe-radio--label'
|
|
22579
|
-
}, defaultSlot ? $table.callSlot(defaultSlot, radioParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField))] : []))];
|
|
22648
|
+
}, ons), radioVNs)];
|
|
22580
22649
|
},
|
|
22581
22650
|
renderTreeRadioCell: function renderTreeRadioCell(params) {
|
|
22582
22651
|
return Cell.renderTreeIcon(params, Cell.renderRadioCell(params));
|
|
@@ -22666,12 +22735,16 @@ var Cell = {
|
|
|
22666
22735
|
|
|
22667
22736
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
22668
22737
|
var labelField = checkboxOpts.labelField,
|
|
22669
|
-
checkMethod = checkboxOpts.checkMethod
|
|
22738
|
+
checkMethod = checkboxOpts.checkMethod,
|
|
22739
|
+
visibleMethod = checkboxOpts.visibleMethod;
|
|
22670
22740
|
var slots = column.slots;
|
|
22671
22741
|
var defaultSlot = slots ? slots.default : null;
|
|
22672
22742
|
var checkboxSlot = slots ? slots.checkbox : null;
|
|
22673
22743
|
var indeterminate = false;
|
|
22674
22744
|
var isChecked = false;
|
|
22745
|
+
var isVisible = !visibleMethod || visibleMethod({
|
|
22746
|
+
row: row
|
|
22747
|
+
});
|
|
22675
22748
|
var isDisabled = !!checkMethod;
|
|
22676
22749
|
var ons;
|
|
22677
22750
|
|
|
@@ -22679,7 +22752,7 @@ var Cell = {
|
|
|
22679
22752
|
isChecked = $table.findRowIndexOf(selection, row) > -1;
|
|
22680
22753
|
ons = {
|
|
22681
22754
|
onClick: function onClick(evnt) {
|
|
22682
|
-
if (!isDisabled) {
|
|
22755
|
+
if (!isDisabled && isVisible) {
|
|
22683
22756
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
22684
22757
|
}
|
|
22685
22758
|
}
|
|
@@ -22699,24 +22772,39 @@ var Cell = {
|
|
|
22699
22772
|
var checkboxParams = _objectSpread2(_objectSpread2({}, params), {}, {
|
|
22700
22773
|
checked: isChecked,
|
|
22701
22774
|
disabled: isDisabled,
|
|
22775
|
+
visible: isVisible,
|
|
22702
22776
|
indeterminate: indeterminate
|
|
22703
22777
|
});
|
|
22704
22778
|
|
|
22705
|
-
|
|
22779
|
+
if (checkboxSlot) {
|
|
22780
|
+
return $table.callSlot(checkboxSlot, checkboxParams);
|
|
22781
|
+
}
|
|
22782
|
+
|
|
22783
|
+
var checkVNs = [];
|
|
22784
|
+
|
|
22785
|
+
if (isVisible) {
|
|
22786
|
+
checkVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22787
|
+
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
|
22788
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22789
|
+
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
|
22790
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22791
|
+
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
|
22792
|
+
}));
|
|
22793
|
+
}
|
|
22794
|
+
|
|
22795
|
+
if (defaultSlot || labelField) {
|
|
22796
|
+
checkVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22797
|
+
class: 'vxe-checkbox--label'
|
|
22798
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField)));
|
|
22799
|
+
}
|
|
22800
|
+
|
|
22801
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', _objectSpread2({
|
|
22706
22802
|
class: ['vxe-cell--checkbox', {
|
|
22707
22803
|
'is--checked': isChecked,
|
|
22708
22804
|
'is--disabled': isDisabled,
|
|
22709
22805
|
'is--indeterminate': indeterminate
|
|
22710
22806
|
}]
|
|
22711
|
-
}, ons),
|
|
22712
|
-
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
|
22713
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22714
|
-
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
|
22715
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22716
|
-
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
|
22717
|
-
})].concat(defaultSlot || labelField ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22718
|
-
class: 'vxe-checkbox--label'
|
|
22719
|
-
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField))] : []))];
|
|
22807
|
+
}, ons), checkVNs)];
|
|
22720
22808
|
},
|
|
22721
22809
|
renderTreeSelectionCell: function renderTreeSelectionCell(params) {
|
|
22722
22810
|
return Cell.renderTreeIcon(params, Cell.renderSelectionCell(params));
|
|
@@ -22738,12 +22826,16 @@ var Cell = {
|
|
|
22738
22826
|
var labelField = checkboxOpts.labelField,
|
|
22739
22827
|
property = checkboxOpts.checkField,
|
|
22740
22828
|
halfField = checkboxOpts.halfField,
|
|
22741
|
-
checkMethod = checkboxOpts.checkMethod
|
|
22829
|
+
checkMethod = checkboxOpts.checkMethod,
|
|
22830
|
+
visibleMethod = checkboxOpts.visibleMethod;
|
|
22742
22831
|
var slots = column.slots;
|
|
22743
22832
|
var defaultSlot = slots ? slots.default : null;
|
|
22744
22833
|
var checkboxSlot = slots ? slots.checkbox : null;
|
|
22745
22834
|
var indeterminate = false;
|
|
22746
22835
|
var isChecked = false;
|
|
22836
|
+
var isVisible = !visibleMethod || visibleMethod({
|
|
22837
|
+
row: row
|
|
22838
|
+
});
|
|
22747
22839
|
var isDisabled = !!checkMethod;
|
|
22748
22840
|
var ons;
|
|
22749
22841
|
|
|
@@ -22751,7 +22843,7 @@ var Cell = {
|
|
|
22751
22843
|
isChecked = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, property);
|
|
22752
22844
|
ons = {
|
|
22753
22845
|
onClick: function onClick(evnt) {
|
|
22754
|
-
if (!isDisabled) {
|
|
22846
|
+
if (!isDisabled && isVisible) {
|
|
22755
22847
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
22756
22848
|
}
|
|
22757
22849
|
}
|
|
@@ -22771,24 +22863,39 @@ var Cell = {
|
|
|
22771
22863
|
var checkboxParams = _objectSpread2(_objectSpread2({}, params), {}, {
|
|
22772
22864
|
checked: isChecked,
|
|
22773
22865
|
disabled: isDisabled,
|
|
22866
|
+
visible: isVisible,
|
|
22774
22867
|
indeterminate: indeterminate
|
|
22775
22868
|
});
|
|
22776
22869
|
|
|
22777
|
-
|
|
22870
|
+
if (checkboxSlot) {
|
|
22871
|
+
return $table.callSlot(checkboxSlot, checkboxParams);
|
|
22872
|
+
}
|
|
22873
|
+
|
|
22874
|
+
var checkVNs = [];
|
|
22875
|
+
|
|
22876
|
+
if (isVisible) {
|
|
22877
|
+
checkVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22878
|
+
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
|
22879
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22880
|
+
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
|
22881
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22882
|
+
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
|
22883
|
+
}));
|
|
22884
|
+
|
|
22885
|
+
if (defaultSlot || labelField) {
|
|
22886
|
+
checkVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22887
|
+
class: 'vxe-checkbox--label'
|
|
22888
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField)));
|
|
22889
|
+
}
|
|
22890
|
+
}
|
|
22891
|
+
|
|
22892
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', _objectSpread2({
|
|
22778
22893
|
class: ['vxe-cell--checkbox', {
|
|
22779
22894
|
'is--checked': isChecked,
|
|
22780
22895
|
'is--disabled': isDisabled,
|
|
22781
22896
|
'is--indeterminate': halfField && !isChecked ? row[halfField] : indeterminate
|
|
22782
22897
|
}]
|
|
22783
|
-
}, ons),
|
|
22784
|
-
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
|
22785
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22786
|
-
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
|
22787
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22788
|
-
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
|
22789
|
-
})].concat(defaultSlot || labelField ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
22790
|
-
class: 'vxe-checkbox--label'
|
|
22791
|
-
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, labelField))] : []))];
|
|
22898
|
+
}, ons), checkVNs)];
|
|
22792
22899
|
},
|
|
22793
22900
|
renderTreeSelectionCellByProp: function renderTreeSelectionCellByProp(params) {
|
|
22794
22901
|
return Cell.renderTreeIcon(params, Cell.renderSelectionCellByProp(params));
|
|
@@ -23477,8 +23584,11 @@ var es_array_sort = __webpack_require__("4e82");
|
|
|
23477
23584
|
},
|
|
23478
23585
|
// 是否自动根据状态属性去更新响应式表格宽高
|
|
23479
23586
|
syncResize: [Boolean, String, Number],
|
|
23480
|
-
//
|
|
23587
|
+
// 列配置信息
|
|
23481
23588
|
columnConfig: Object,
|
|
23589
|
+
// 行配置信息
|
|
23590
|
+
rowConfig: Object,
|
|
23591
|
+
// 列调整配置项
|
|
23482
23592
|
resizableConfig: Object,
|
|
23483
23593
|
// 序号配置项
|
|
23484
23594
|
seqConfig: Object,
|
|
@@ -23570,7 +23680,7 @@ var es_array_sort = __webpack_require__("4e82");
|
|
|
23570
23680
|
|
|
23571
23681
|
|
|
23572
23682
|
var tableComponentPropKeys = Object.keys(src_props);
|
|
23573
|
-
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', '
|
|
23683
|
+
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'];
|
|
23574
23684
|
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']);
|
|
23575
23685
|
/* harmony default export */ var grid = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
23576
23686
|
name: 'VxeGrid',
|
|
@@ -23826,6 +23936,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
23826
23936
|
gridExtendTableMethods.clearCheckboxRow();
|
|
23827
23937
|
} else {
|
|
23828
23938
|
if (isMsg) {
|
|
23939
|
+
// 检测弹窗模块
|
|
23940
|
+
if (true) {
|
|
23941
|
+
if (!VXETable.modal) {
|
|
23942
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23943
|
+
}
|
|
23944
|
+
}
|
|
23945
|
+
|
|
23829
23946
|
VXETable.modal.message({
|
|
23830
23947
|
id: code,
|
|
23831
23948
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -23864,6 +23981,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
23864
23981
|
}
|
|
23865
23982
|
});
|
|
23866
23983
|
} else {
|
|
23984
|
+
// 检测弹窗模块
|
|
23985
|
+
if (true) {
|
|
23986
|
+
if (!VXETable.modal) {
|
|
23987
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23988
|
+
}
|
|
23989
|
+
}
|
|
23990
|
+
|
|
23867
23991
|
VXETable.modal.message({
|
|
23868
23992
|
id: "msg_".concat(code),
|
|
23869
23993
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -24529,6 +24653,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24529
24653
|
});
|
|
24530
24654
|
|
|
24531
24655
|
if (isMsg) {
|
|
24656
|
+
// 检测弹窗模块
|
|
24657
|
+
if (true) {
|
|
24658
|
+
if (!VXETable.modal) {
|
|
24659
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24660
|
+
}
|
|
24661
|
+
}
|
|
24662
|
+
|
|
24532
24663
|
VXETable.modal.message({
|
|
24533
24664
|
content: getRespMsg(rest, 'vxe.grid.delSuccess'),
|
|
24534
24665
|
status: 'success'
|
|
@@ -24544,6 +24675,12 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24544
24675
|
reactData.tableLoading = false;
|
|
24545
24676
|
|
|
24546
24677
|
if (isMsg) {
|
|
24678
|
+
if (true) {
|
|
24679
|
+
if (!VXETable.modal.message) {
|
|
24680
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24681
|
+
}
|
|
24682
|
+
}
|
|
24683
|
+
|
|
24547
24684
|
VXETable.modal.message({
|
|
24548
24685
|
id: code,
|
|
24549
24686
|
content: getRespMsg(rest, 'vxe.grid.operError'),
|
|
@@ -24554,6 +24691,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24554
24691
|
});
|
|
24555
24692
|
} else {
|
|
24556
24693
|
if (isMsg) {
|
|
24694
|
+
// 检测弹窗模块
|
|
24695
|
+
if (true) {
|
|
24696
|
+
if (!VXETable.modal) {
|
|
24697
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24698
|
+
}
|
|
24699
|
+
}
|
|
24700
|
+
|
|
24557
24701
|
VXETable.modal.message({
|
|
24558
24702
|
id: code,
|
|
24559
24703
|
content: conf.i18n('vxe.grid.selectOneRecord'),
|
|
@@ -24615,6 +24759,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24615
24759
|
reactData.pendingRecords = [];
|
|
24616
24760
|
|
|
24617
24761
|
if (isMsg) {
|
|
24762
|
+
// 检测弹窗模块
|
|
24763
|
+
if (true) {
|
|
24764
|
+
if (!VXETable.modal) {
|
|
24765
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24766
|
+
}
|
|
24767
|
+
}
|
|
24768
|
+
|
|
24618
24769
|
VXETable.modal.message({
|
|
24619
24770
|
content: getRespMsg(rest, 'vxe.grid.saveSuccess'),
|
|
24620
24771
|
status: 'success'
|
|
@@ -24630,6 +24781,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24630
24781
|
reactData.tableLoading = false;
|
|
24631
24782
|
|
|
24632
24783
|
if (isMsg) {
|
|
24784
|
+
// 检测弹窗模块
|
|
24785
|
+
if (true) {
|
|
24786
|
+
if (!VXETable.modal) {
|
|
24787
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24788
|
+
}
|
|
24789
|
+
}
|
|
24790
|
+
|
|
24633
24791
|
VXETable.modal.message({
|
|
24634
24792
|
id: code,
|
|
24635
24793
|
content: getRespMsg(rest, 'vxe.grid.operError'),
|
|
@@ -24639,6 +24797,13 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
|
|
|
24639
24797
|
});
|
|
24640
24798
|
} else {
|
|
24641
24799
|
if (isMsg) {
|
|
24800
|
+
// 检测弹窗模块
|
|
24801
|
+
if (true) {
|
|
24802
|
+
if (!VXETable.modal) {
|
|
24803
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24804
|
+
}
|
|
24805
|
+
}
|
|
24806
|
+
|
|
24642
24807
|
VXETable.modal.message({
|
|
24643
24808
|
id: code,
|
|
24644
24809
|
content: conf.i18n('vxe.grid.dataUnchanged'),
|
|
@@ -27489,8 +27654,8 @@ function renderTitle($xeform, item) {
|
|
|
27489
27654
|
var titVNs = [];
|
|
27490
27655
|
|
|
27491
27656
|
if (titlePrefix) {
|
|
27492
|
-
titVNs.push(titlePrefix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27493
|
-
content: getFuncText(titlePrefix.message),
|
|
27657
|
+
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'), {
|
|
27658
|
+
content: getFuncText(titlePrefix.content || titlePrefix.message),
|
|
27494
27659
|
enterable: titlePrefix.enterable,
|
|
27495
27660
|
theme: titlePrefix.theme
|
|
27496
27661
|
}, {
|
|
@@ -27509,8 +27674,8 @@ function renderTitle($xeform, item) {
|
|
|
27509
27674
|
var fixVNs = [];
|
|
27510
27675
|
|
|
27511
27676
|
if (titleSuffix) {
|
|
27512
|
-
fixVNs.push(titleSuffix.message ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])('vxe-tooltip'), {
|
|
27513
|
-
content: getFuncText(titleSuffix.message),
|
|
27677
|
+
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'), {
|
|
27678
|
+
content: getFuncText(titleSuffix.content || titleSuffix.message),
|
|
27514
27679
|
enterable: titleSuffix.enterable,
|
|
27515
27680
|
theme: titleSuffix.theme
|
|
27516
27681
|
}, {
|
|
@@ -27575,9 +27740,14 @@ var form_Rule = /*#__PURE__*/function () {
|
|
|
27575
27740
|
}
|
|
27576
27741
|
|
|
27577
27742
|
_createClass(Rule, [{
|
|
27743
|
+
key: "content",
|
|
27744
|
+
get: function get() {
|
|
27745
|
+
return getFuncText(this.$options.content || this.$options.message);
|
|
27746
|
+
}
|
|
27747
|
+
}, {
|
|
27578
27748
|
key: "message",
|
|
27579
27749
|
get: function get() {
|
|
27580
|
-
return
|
|
27750
|
+
return this.content;
|
|
27581
27751
|
}
|
|
27582
27752
|
}]);
|
|
27583
27753
|
|
|
@@ -27637,7 +27807,12 @@ function getResetValue(value, resetValue) {
|
|
|
27637
27807
|
return conf.form.size || conf.size;
|
|
27638
27808
|
}
|
|
27639
27809
|
},
|
|
27640
|
-
span:
|
|
27810
|
+
span: {
|
|
27811
|
+
type: [String, Number],
|
|
27812
|
+
default: function _default() {
|
|
27813
|
+
return conf.form.span;
|
|
27814
|
+
}
|
|
27815
|
+
},
|
|
27641
27816
|
align: {
|
|
27642
27817
|
type: String,
|
|
27643
27818
|
default: function _default() {
|
|
@@ -27650,7 +27825,12 @@ function getResetValue(value, resetValue) {
|
|
|
27650
27825
|
return conf.form.titleAlign;
|
|
27651
27826
|
}
|
|
27652
27827
|
},
|
|
27653
|
-
titleWidth:
|
|
27828
|
+
titleWidth: {
|
|
27829
|
+
type: [String, Number],
|
|
27830
|
+
default: function _default() {
|
|
27831
|
+
return conf.form.titleWidth;
|
|
27832
|
+
}
|
|
27833
|
+
},
|
|
27654
27834
|
titleColon: {
|
|
27655
27835
|
type: Boolean,
|
|
27656
27836
|
default: function _default() {
|
|
@@ -27971,7 +28151,7 @@ function getResetValue(value, resetValue) {
|
|
|
27971
28151
|
errorRules.push(new form_Rule({
|
|
27972
28152
|
type: 'custom',
|
|
27973
28153
|
trigger: trigger,
|
|
27974
|
-
|
|
28154
|
+
content: customValid.message,
|
|
27975
28155
|
rule: new form_Rule(rule)
|
|
27976
28156
|
}));
|
|
27977
28157
|
} else if (customValid.catch) {
|
|
@@ -27980,7 +28160,7 @@ function getResetValue(value, resetValue) {
|
|
|
27980
28160
|
errorRules.push(new form_Rule({
|
|
27981
28161
|
type: 'custom',
|
|
27982
28162
|
trigger: trigger,
|
|
27983
|
-
|
|
28163
|
+
content: e ? e.message : rule.content || rule.message,
|
|
27984
28164
|
rule: new form_Rule(rule)
|
|
27985
28165
|
}));
|
|
27986
28166
|
}));
|
|
@@ -28297,7 +28477,7 @@ function getResetValue(value, resetValue) {
|
|
|
28297
28477
|
style: errRule.maxWidth ? {
|
|
28298
28478
|
width: "".concat(errRule.maxWidth, "px")
|
|
28299
28479
|
} : null
|
|
28300
|
-
}, errRule.
|
|
28480
|
+
}, errRule.content));
|
|
28301
28481
|
}
|
|
28302
28482
|
|
|
28303
28483
|
var ons = showTooltip ? {
|
|
@@ -29999,7 +30179,8 @@ var lineOffsetSizes = {
|
|
|
29999
30179
|
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
30000
30180
|
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
30001
30181
|
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
30002
|
-
computeValidOpts = _$xetable$getComputeM.computeValidOpts
|
|
30182
|
+
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
30183
|
+
computeRowOpts = _$xetable$getComputeM.computeRowOpts;
|
|
30003
30184
|
|
|
30004
30185
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30005
30186
|
var refBodyTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
@@ -30100,7 +30281,6 @@ var lineOffsetSizes = {
|
|
|
30100
30281
|
tooltipConfig = tableProps.tooltipConfig;
|
|
30101
30282
|
var tableData = tableReactData.tableData,
|
|
30102
30283
|
overflowX = tableReactData.overflowX,
|
|
30103
|
-
scrollXLoad = tableReactData.scrollXLoad,
|
|
30104
30284
|
scrollYLoad = tableReactData.scrollYLoad,
|
|
30105
30285
|
currentColumn = tableReactData.currentColumn,
|
|
30106
30286
|
mergeList = tableReactData.mergeList,
|
|
@@ -30112,6 +30292,7 @@ var lineOffsetSizes = {
|
|
|
30112
30292
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
30113
30293
|
var editOpts = computeEditOpts.value;
|
|
30114
30294
|
var tooltipOpts = computeTooltipOpts.value;
|
|
30295
|
+
var rowOpts = computeRowOpts.value;
|
|
30115
30296
|
var sYOpts = computeSYOpts.value;
|
|
30116
30297
|
var type = column.type,
|
|
30117
30298
|
cellRender = column.cellRender,
|
|
@@ -30121,7 +30302,8 @@ var lineOffsetSizes = {
|
|
|
30121
30302
|
className = column.className,
|
|
30122
30303
|
treeNode = column.treeNode;
|
|
30123
30304
|
var actived = editStore.actived;
|
|
30124
|
-
var
|
|
30305
|
+
var scrollYRHeight = sYOpts.rHeight;
|
|
30306
|
+
var rowHeight = rowOpts.height;
|
|
30125
30307
|
var showAllTip = tooltipOpts.showAll;
|
|
30126
30308
|
var columnIndex = $xetable.getColumnIndex(column);
|
|
30127
30309
|
|
|
@@ -30164,7 +30346,7 @@ var lineOffsetSizes = {
|
|
|
30164
30346
|
items: items
|
|
30165
30347
|
}; // 虚拟滚动不支持动态高度
|
|
30166
30348
|
|
|
30167
|
-
if (
|
|
30349
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
30168
30350
|
showEllipsis = hasEllipsis = true;
|
|
30169
30351
|
} // hover 进入事件
|
|
30170
30352
|
|
|
@@ -30285,7 +30467,7 @@ var lineOffsetSizes = {
|
|
|
30285
30467
|
'c--ellipsis': showEllipsis
|
|
30286
30468
|
}],
|
|
30287
30469
|
style: {
|
|
30288
|
-
maxHeight: hasEllipsis &&
|
|
30470
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30289
30471
|
}
|
|
30290
30472
|
}));
|
|
30291
30473
|
} else {
|
|
@@ -30297,7 +30479,7 @@ var lineOffsetSizes = {
|
|
|
30297
30479
|
'c--ellipsis': showEllipsis
|
|
30298
30480
|
}],
|
|
30299
30481
|
style: {
|
|
30300
|
-
maxHeight: hasEllipsis &&
|
|
30482
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30301
30483
|
},
|
|
30302
30484
|
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
30303
30485
|
}, column.renderCell(params))]));
|
|
@@ -30319,12 +30501,12 @@ var lineOffsetSizes = {
|
|
|
30319
30501
|
key: columnKey ? column.id : $columnIndex
|
|
30320
30502
|
}, attrs), {}, {
|
|
30321
30503
|
style: Object.assign({
|
|
30322
|
-
height: hasEllipsis &&
|
|
30504
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
30323
30505
|
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
30324
30506
|
}, tdOns), tdVNs);
|
|
30325
30507
|
};
|
|
30326
30508
|
|
|
30327
|
-
var renderRows = function renderRows($seq,
|
|
30509
|
+
var renderRows = function renderRows($seq, fixedType, tableData, tableColumn) {
|
|
30328
30510
|
var stripe = tableProps.stripe,
|
|
30329
30511
|
rowKey = tableProps.rowKey,
|
|
30330
30512
|
highlightHoverRow = tableProps.highlightHoverRow,
|
|
@@ -30340,7 +30522,8 @@ var lineOffsetSizes = {
|
|
|
30340
30522
|
rowExpandeds = tableReactData.rowExpandeds,
|
|
30341
30523
|
expandColumn = tableReactData.expandColumn,
|
|
30342
30524
|
selectRow = tableReactData.selectRow;
|
|
30343
|
-
var
|
|
30525
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData,
|
|
30526
|
+
scrollYStore = tableInternalData.scrollYStore;
|
|
30344
30527
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
30345
30528
|
var radioOpts = computeRadioOpts.value;
|
|
30346
30529
|
var treeOpts = computeTreeOpts.value;
|
|
@@ -30382,6 +30565,8 @@ var lineOffsetSizes = {
|
|
|
30382
30565
|
}
|
|
30383
30566
|
|
|
30384
30567
|
var rowid = util_getRowid($xetable, row);
|
|
30568
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
30569
|
+
var rowLevel = rest ? rest.level : 0;
|
|
30385
30570
|
var params = {
|
|
30386
30571
|
$table: $xetable,
|
|
30387
30572
|
$seq: $seq,
|
|
@@ -30457,11 +30642,11 @@ var lineOffsetSizes = {
|
|
|
30457
30642
|
} // 如果是树形表格
|
|
30458
30643
|
|
|
30459
30644
|
|
|
30460
|
-
if (treeConfig && treeExpandeds.length) {
|
|
30645
|
+
if (treeConfig && !scrollYLoad && treeExpandeds.length) {
|
|
30461
30646
|
var rowChildren = row[treeOpts.children];
|
|
30462
30647
|
|
|
30463
30648
|
if (rowChildren && rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1) {
|
|
30464
|
-
rows.push.apply(rows, _toConsumableArray(renderRows($seq ? "".concat($seq, ".").concat(seq) : "".concat(seq),
|
|
30649
|
+
rows.push.apply(rows, _toConsumableArray(renderRows($seq ? "".concat($seq, ".").concat(seq) : "".concat(seq), fixedType, rowChildren, tableColumn)));
|
|
30465
30650
|
}
|
|
30466
30651
|
}
|
|
30467
30652
|
});
|
|
@@ -30734,7 +30919,6 @@ var lineOffsetSizes = {
|
|
|
30734
30919
|
mouseConfig = tableProps.mouseConfig;
|
|
30735
30920
|
var tableData = tableReactData.tableData,
|
|
30736
30921
|
mergeList = tableReactData.mergeList,
|
|
30737
|
-
scrollXLoad = tableReactData.scrollXLoad,
|
|
30738
30922
|
scrollYLoad = tableReactData.scrollYLoad,
|
|
30739
30923
|
isAllOverflow = tableReactData.isAllOverflow;
|
|
30740
30924
|
var visibleColumn = tableInternalData.visibleColumn;
|
|
@@ -30747,7 +30931,7 @@ var lineOffsetSizes = {
|
|
|
30747
30931
|
// 如果是使用优化模式
|
|
30748
30932
|
|
|
30749
30933
|
if (fixedType) {
|
|
30750
|
-
if (
|
|
30934
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
30751
30935
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
30752
30936
|
tableColumn = fixedColumn;
|
|
30753
30937
|
} else {
|
|
@@ -30820,7 +31004,7 @@ var lineOffsetSizes = {
|
|
|
30820
31004
|
*/
|
|
30821
31005
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tbody', {
|
|
30822
31006
|
ref: refBodyTBody
|
|
30823
|
-
}, renderRows('',
|
|
31007
|
+
}, renderRows('', fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30824
31008
|
class: 'vxe-table--checkbox-range'
|
|
30825
31009
|
}), mouseConfig && mouseOpts.area ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30826
31010
|
class: 'vxe-table--cell-area'
|
|
@@ -31133,6 +31317,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31133
31317
|
treeExpandedReserveRowMap: {},
|
|
31134
31318
|
// 完整数据、条件处理后
|
|
31135
31319
|
tableFullData: [],
|
|
31320
|
+
treeFullData: [],
|
|
31136
31321
|
afterFullData: [],
|
|
31137
31322
|
tableSynchData: [],
|
|
31138
31323
|
tableSourceData: [],
|
|
@@ -31194,7 +31379,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31194
31379
|
};
|
|
31195
31380
|
});
|
|
31196
31381
|
var computeColumnOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31197
|
-
return Object.assign({}, props.columnConfig);
|
|
31382
|
+
return Object.assign({}, conf.table.columnConfig, props.columnConfig);
|
|
31383
|
+
});
|
|
31384
|
+
var computeRowOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31385
|
+
return Object.assign({}, conf.table.rowConfig, props.rowConfig);
|
|
31198
31386
|
});
|
|
31199
31387
|
var computeResizableOpts = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
31200
31388
|
return Object.assign({}, conf.table.resizableConfig, props.resizableConfig);
|
|
@@ -31391,6 +31579,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
31391
31579
|
computeValidOpts: computeValidOpts,
|
|
31392
31580
|
computeSXOpts: computeSXOpts,
|
|
31393
31581
|
computeSYOpts: computeSYOpts,
|
|
31582
|
+
computeColumnOpts: computeColumnOpts,
|
|
31583
|
+
computeRowOpts: computeRowOpts,
|
|
31394
31584
|
computeResizableOpts: computeResizableOpts,
|
|
31395
31585
|
computeSeqOpts: computeSeqOpts,
|
|
31396
31586
|
computeRadioOpts: computeRadioOpts,
|
|
@@ -32138,7 +32328,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32138
32328
|
$index: -1,
|
|
32139
32329
|
_index: _index,
|
|
32140
32330
|
items: [],
|
|
32141
|
-
parent: null
|
|
32331
|
+
parent: null,
|
|
32332
|
+
level: 0
|
|
32142
32333
|
};
|
|
32143
32334
|
}
|
|
32144
32335
|
});
|
|
@@ -32450,7 +32641,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32450
32641
|
var _tWidth = tableWidth; // 如果是使用优化模式
|
|
32451
32642
|
|
|
32452
32643
|
if (fixedType) {
|
|
32453
|
-
if (
|
|
32644
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
32454
32645
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
32455
32646
|
tableColumn = fixedColumn;
|
|
32456
32647
|
} else {
|
|
@@ -32551,16 +32742,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32551
32742
|
var showTitle = cellOverflow === 'title';
|
|
32552
32743
|
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
32553
32744
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
32554
|
-
var _listElem = elemStore["".concat(name, "-").concat(layout, "-list")]; //
|
|
32745
|
+
var _listElem = elemStore["".concat(name, "-").concat(layout, "-list")]; // 纵向虚拟滚动不支持动态行高
|
|
32555
32746
|
|
|
32556
|
-
if (
|
|
32557
|
-
|
|
32558
|
-
hasEllipsis = true;
|
|
32559
|
-
}
|
|
32560
|
-
} else {
|
|
32561
|
-
if ((scrollXLoad || scrollYLoad) && !hasEllipsis) {
|
|
32562
|
-
hasEllipsis = true;
|
|
32563
|
-
}
|
|
32747
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
32748
|
+
hasEllipsis = true;
|
|
32564
32749
|
}
|
|
32565
32750
|
|
|
32566
32751
|
if (_listElem) {
|
|
@@ -32885,7 +33070,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
32885
33070
|
}
|
|
32886
33071
|
|
|
32887
33072
|
if (childRecords) {
|
|
32888
|
-
tableMethods.
|
|
33073
|
+
tableMethods.loadTreeChildren(row, childRecords).then(function (childRows) {
|
|
32889
33074
|
if (childRows.length && $xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
32890
33075
|
treeExpandeds.push(row);
|
|
32891
33076
|
} // 如果当前节点已选中,则展开后子节点也被选中
|
|
@@ -33048,50 +33233,67 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33048
33233
|
scrollXStore = internalData.scrollXStore,
|
|
33049
33234
|
lastScrollLeft = internalData.lastScrollLeft,
|
|
33050
33235
|
lastScrollTop = internalData.lastScrollTop;
|
|
33051
|
-
var sYOpts = computeSYOpts.value;
|
|
33052
33236
|
var treeOpts = computeTreeOpts.value;
|
|
33237
|
+
var transform = treeOpts.transform;
|
|
33238
|
+
var treeData = [];
|
|
33239
|
+
var fullData = datas ? datas.slice(0) : [];
|
|
33053
33240
|
|
|
33054
|
-
if (treeConfig
|
|
33055
|
-
if (
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33241
|
+
if (treeConfig) {
|
|
33242
|
+
if (transform) {
|
|
33243
|
+
// 树结构自动转换
|
|
33244
|
+
if (true) {
|
|
33245
|
+
if (!treeOpts.rowField) {
|
|
33246
|
+
errLog('vxe.error.reqProp', ['tree-config.rowField']);
|
|
33247
|
+
}
|
|
33248
|
+
|
|
33249
|
+
if (!treeOpts.parentField) {
|
|
33250
|
+
errLog('vxe.error.reqProp', ['tree-config.parentField']);
|
|
33251
|
+
}
|
|
33252
|
+
|
|
33253
|
+
if (!treeOpts.children) {
|
|
33254
|
+
errLog('vxe.error.reqProp', ['tree-config.children']);
|
|
33255
|
+
}
|
|
33059
33256
|
|
|
33060
|
-
|
|
33061
|
-
|
|
33257
|
+
fullData.forEach(function (row) {
|
|
33258
|
+
if (row[treeOpts.children] && row[treeOpts.children].length) {
|
|
33259
|
+
warnLog('vxe.error.errConflicts', ['tree-config.transform', "row.".concat(treeOpts.children)]);
|
|
33260
|
+
}
|
|
33261
|
+
});
|
|
33062
33262
|
}
|
|
33063
|
-
}
|
|
33064
33263
|
|
|
33065
|
-
|
|
33066
|
-
|
|
33067
|
-
|
|
33068
|
-
|
|
33069
|
-
|
|
33264
|
+
treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toArrayTree(fullData, {
|
|
33265
|
+
key: treeOpts.rowField,
|
|
33266
|
+
parentKey: treeOpts.parentField,
|
|
33267
|
+
children: treeOpts.children
|
|
33268
|
+
});
|
|
33269
|
+
fullData = treeData.slice(0);
|
|
33270
|
+
} else {
|
|
33271
|
+
treeData = fullData.slice(0);
|
|
33272
|
+
}
|
|
33070
33273
|
}
|
|
33071
33274
|
|
|
33072
|
-
var tableFullData = datas ? datas.slice(0) : [];
|
|
33073
|
-
var scrollYLoad = !treeConfig && !!sYOpts.enabled && sYOpts.gt > -1 && sYOpts.gt < tableFullData.length;
|
|
33074
33275
|
scrollYStore.startIndex = 0;
|
|
33075
33276
|
scrollYStore.endIndex = 1;
|
|
33076
33277
|
scrollXStore.startIndex = 0;
|
|
33077
33278
|
scrollXStore.endIndex = 1;
|
|
33078
33279
|
editStore.insertList = [];
|
|
33079
|
-
editStore.removeList = [];
|
|
33280
|
+
editStore.removeList = [];
|
|
33281
|
+
var sYLoad = updateScrollYStatus(fullData);
|
|
33282
|
+
reactData.scrollYLoad = sYLoad; // 全量数据
|
|
33080
33283
|
|
|
33081
|
-
internalData.tableFullData =
|
|
33284
|
+
internalData.tableFullData = fullData;
|
|
33285
|
+
internalData.treeFullData = treeData; // 缓存数据
|
|
33082
33286
|
|
|
33083
|
-
tablePrivateMethods.
|
|
33287
|
+
tablePrivateMethods.cacheRowMap(true); // 原始数据
|
|
33084
33288
|
|
|
33085
|
-
internalData.tableSynchData = datas;
|
|
33289
|
+
internalData.tableSynchData = datas; // 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
33086
33290
|
|
|
33087
33291
|
if (keepSource) {
|
|
33088
|
-
internalData.tableSourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clone(
|
|
33292
|
+
internalData.tableSourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clone(fullData, true);
|
|
33089
33293
|
}
|
|
33090
33294
|
|
|
33091
|
-
reactData.scrollYLoad = scrollYLoad;
|
|
33092
|
-
|
|
33093
33295
|
if (true) {
|
|
33094
|
-
if (
|
|
33296
|
+
if (sYLoad) {
|
|
33095
33297
|
if (!(props.height || props.maxHeight)) {
|
|
33096
33298
|
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
33097
33299
|
}
|
|
@@ -33121,8 +33323,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33121
33323
|
}).then(function () {
|
|
33122
33324
|
computeScrollLoad();
|
|
33123
33325
|
}).then(function () {
|
|
33124
|
-
//
|
|
33125
|
-
if (
|
|
33326
|
+
// 是否启用了虚拟滚动
|
|
33327
|
+
if (sYLoad) {
|
|
33126
33328
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
33127
33329
|
}
|
|
33128
33330
|
|
|
@@ -33133,7 +33335,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33133
33335
|
return tableMethods.recalculate();
|
|
33134
33336
|
}).then(function () {
|
|
33135
33337
|
// 是否变更虚拟滚动
|
|
33136
|
-
if (oldScrollYLoad ===
|
|
33338
|
+
if (oldScrollYLoad === sYLoad) {
|
|
33137
33339
|
restoreScrollLocation($xetable, lastScrollLeft, lastScrollTop).then(resolve);
|
|
33138
33340
|
} else {
|
|
33139
33341
|
setTimeout(function () {
|
|
@@ -33402,6 +33604,135 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33402
33604
|
return tableMethods.recalculate();
|
|
33403
33605
|
});
|
|
33404
33606
|
};
|
|
33607
|
+
|
|
33608
|
+
var updateScrollYStatus = function updateScrollYStatus(fullData) {
|
|
33609
|
+
var treeConfig = props.treeConfig;
|
|
33610
|
+
var sYOpts = computeSYOpts.value;
|
|
33611
|
+
var treeOpts = computeTreeOpts.value;
|
|
33612
|
+
var transform = treeOpts.transform;
|
|
33613
|
+
var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && sYOpts.gt < fullData.length;
|
|
33614
|
+
reactData.scrollYLoad = scrollYLoad;
|
|
33615
|
+
return scrollYLoad;
|
|
33616
|
+
};
|
|
33617
|
+
|
|
33618
|
+
var updateVirtualTreeData = function updateVirtualTreeData() {
|
|
33619
|
+
var oldScrollYLoad = reactData.scrollYLoad,
|
|
33620
|
+
treeExpandeds = reactData.treeExpandeds;
|
|
33621
|
+
var treeFullData = internalData.treeFullData;
|
|
33622
|
+
var treeOpts = computeTreeOpts.value;
|
|
33623
|
+
var fullData = [];
|
|
33624
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row, index, items, path, parent) {
|
|
33625
|
+
if (!parent || $xetable.findRowIndexOf(treeExpandeds, parent) > -1) {
|
|
33626
|
+
fullData.push(row);
|
|
33627
|
+
}
|
|
33628
|
+
}, treeOpts);
|
|
33629
|
+
var scrollYLoad = updateScrollYStatus(fullData);
|
|
33630
|
+
internalData.tableFullData = scrollYLoad ? fullData : treeFullData;
|
|
33631
|
+
|
|
33632
|
+
if (scrollYLoad || oldScrollYLoad !== scrollYLoad) {
|
|
33633
|
+
return tablePrivateMethods.handleTableData(true).then(function () {
|
|
33634
|
+
return tableMethods.recalculate();
|
|
33635
|
+
});
|
|
33636
|
+
}
|
|
33637
|
+
|
|
33638
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
33639
|
+
};
|
|
33640
|
+
/**
|
|
33641
|
+
* 展开与收起树节点
|
|
33642
|
+
* @param rows
|
|
33643
|
+
* @param expanded
|
|
33644
|
+
* @returns
|
|
33645
|
+
*/
|
|
33646
|
+
|
|
33647
|
+
|
|
33648
|
+
var handleBaseTreeExpand = function handleBaseTreeExpand(rows, expanded) {
|
|
33649
|
+
var treeExpandeds = reactData.treeExpandeds,
|
|
33650
|
+
treeLazyLoadeds = reactData.treeLazyLoadeds,
|
|
33651
|
+
treeNodeColumn = reactData.treeNodeColumn;
|
|
33652
|
+
var fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
33653
|
+
tableFullData = internalData.tableFullData;
|
|
33654
|
+
var treeOpts = computeTreeOpts.value;
|
|
33655
|
+
var reserve = treeOpts.reserve,
|
|
33656
|
+
lazy = treeOpts.lazy,
|
|
33657
|
+
hasChild = treeOpts.hasChild,
|
|
33658
|
+
children = treeOpts.children,
|
|
33659
|
+
accordion = treeOpts.accordion,
|
|
33660
|
+
toggleMethod = treeOpts.toggleMethod;
|
|
33661
|
+
var result = [];
|
|
33662
|
+
var columnIndex = tableMethods.getColumnIndex(treeNodeColumn);
|
|
33663
|
+
var $columnIndex = tableMethods.getVMColumnIndex(treeNodeColumn);
|
|
33664
|
+
var validRows = toggleMethod ? rows.filter(function (row) {
|
|
33665
|
+
return toggleMethod({
|
|
33666
|
+
$table: $xetable,
|
|
33667
|
+
expanded: expanded,
|
|
33668
|
+
column: treeNodeColumn,
|
|
33669
|
+
columnIndex: columnIndex,
|
|
33670
|
+
$columnIndex: $columnIndex,
|
|
33671
|
+
row: row
|
|
33672
|
+
});
|
|
33673
|
+
}) : rows;
|
|
33674
|
+
|
|
33675
|
+
if (accordion) {
|
|
33676
|
+
validRows = validRows.length ? [validRows[validRows.length - 1]] : []; // 同一级只能展开一个
|
|
33677
|
+
|
|
33678
|
+
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
|
|
33679
|
+
return item === validRows[0];
|
|
33680
|
+
}, treeOpts);
|
|
33681
|
+
|
|
33682
|
+
if (matchObj) {
|
|
33683
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (item) {
|
|
33684
|
+
return matchObj.items.indexOf(item) > -1;
|
|
33685
|
+
});
|
|
33686
|
+
}
|
|
33687
|
+
}
|
|
33688
|
+
|
|
33689
|
+
if (expanded) {
|
|
33690
|
+
validRows.forEach(function (row) {
|
|
33691
|
+
if ($xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
33692
|
+
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
33693
|
+
|
|
33694
|
+
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1; // 是否使用懒加载
|
|
33695
|
+
|
|
33696
|
+
if (isLoad) {
|
|
33697
|
+
result.push(handleAsyncTreeExpandChilds(row));
|
|
33698
|
+
} else {
|
|
33699
|
+
if (row[children] && row[children].length) {
|
|
33700
|
+
treeExpandeds.push(row);
|
|
33701
|
+
}
|
|
33702
|
+
}
|
|
33703
|
+
}
|
|
33704
|
+
});
|
|
33705
|
+
} else {
|
|
33706
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (row) {
|
|
33707
|
+
return $xetable.findRowIndexOf(validRows, row) > -1;
|
|
33708
|
+
});
|
|
33709
|
+
}
|
|
33710
|
+
|
|
33711
|
+
if (reserve) {
|
|
33712
|
+
validRows.forEach(function (row) {
|
|
33713
|
+
return handleTreeExpandReserve(row, expanded);
|
|
33714
|
+
});
|
|
33715
|
+
}
|
|
33716
|
+
|
|
33717
|
+
return Promise.all(result).then(function () {
|
|
33718
|
+
return tableMethods.recalculate();
|
|
33719
|
+
});
|
|
33720
|
+
};
|
|
33721
|
+
/**
|
|
33722
|
+
* 虚拟树的展开与收起
|
|
33723
|
+
* @param rows
|
|
33724
|
+
* @param expanded
|
|
33725
|
+
* @returns
|
|
33726
|
+
*/
|
|
33727
|
+
|
|
33728
|
+
|
|
33729
|
+
var handleVirtualTreeExpand = function handleVirtualTreeExpand(rows, expanded) {
|
|
33730
|
+
return handleBaseTreeExpand(rows, expanded).then(function () {
|
|
33731
|
+
return updateVirtualTreeData();
|
|
33732
|
+
}).then(function () {
|
|
33733
|
+
return tableMethods.recalculate();
|
|
33734
|
+
});
|
|
33735
|
+
};
|
|
33405
33736
|
/**
|
|
33406
33737
|
* 纵向 Y 可视渲染处理
|
|
33407
33738
|
*/
|
|
@@ -33548,7 +33879,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33548
33879
|
tableSourceData[rowIndex] = record;
|
|
33549
33880
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.clear(row, undefined);
|
|
33550
33881
|
Object.assign(row, tablePrivateMethods.defineField(Object.assign({}, record)));
|
|
33551
|
-
tablePrivateMethods.
|
|
33882
|
+
tablePrivateMethods.cacheRowMap(true);
|
|
33552
33883
|
} else {
|
|
33553
33884
|
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));
|
|
33554
33885
|
}
|
|
@@ -33568,15 +33899,18 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33568
33899
|
/**
|
|
33569
33900
|
* 用于树结构,给行数据加载子节点
|
|
33570
33901
|
*/
|
|
33571
|
-
|
|
33572
|
-
|
|
33573
|
-
|
|
33574
|
-
|
|
33575
|
-
|
|
33576
|
-
|
|
33577
|
-
|
|
33578
|
-
|
|
33902
|
+
loadTreeChildren: function loadTreeChildren(row, childRecords) {
|
|
33903
|
+
var keepSource = props.keepSource;
|
|
33904
|
+
var tableSourceData = internalData.tableSourceData,
|
|
33905
|
+
fullDataRowIdData = internalData.fullDataRowIdData,
|
|
33906
|
+
fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
33907
|
+
var treeOpts = computeTreeOpts.value;
|
|
33908
|
+
var children = treeOpts.children;
|
|
33909
|
+
|
|
33910
|
+
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
33579
33911
|
|
|
33912
|
+
var parentLevel = rest ? rest.level : 0;
|
|
33913
|
+
return tableMethods.createData(childRecords).then(function (rows) {
|
|
33580
33914
|
if (keepSource) {
|
|
33581
33915
|
var rowid = util_getRowid($xetable, row);
|
|
33582
33916
|
|
|
@@ -33589,7 +33923,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33589
33923
|
}
|
|
33590
33924
|
}
|
|
33591
33925
|
|
|
33592
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent) {
|
|
33926
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
|
|
33593
33927
|
var rowid = util_getRowid($xetable, childRow);
|
|
33594
33928
|
|
|
33595
33929
|
var rest = {
|
|
@@ -33599,7 +33933,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
33599
33933
|
_index: -1,
|
|
33600
33934
|
$index: -1,
|
|
33601
33935
|
items: items,
|
|
33602
|
-
parent: parent
|
|
33936
|
+
parent: parent,
|
|
33937
|
+
level: parentLevel + nodes.length
|
|
33603
33938
|
};
|
|
33604
33939
|
fullDataRowIdData[rowid] = rest;
|
|
33605
33940
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -34944,10 +35279,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
34944
35279
|
},
|
|
34945
35280
|
|
|
34946
35281
|
/**
|
|
34947
|
-
*
|
|
35282
|
+
* 重新懒加载展开行,并展开内容
|
|
34948
35283
|
* @param {Row} row 行对象
|
|
34949
35284
|
*/
|
|
34950
|
-
|
|
35285
|
+
reloadRowExpand: function reloadRowExpand(row) {
|
|
34951
35286
|
var expandLazyLoadeds = reactData.expandLazyLoadeds;
|
|
34952
35287
|
var expandOpts = computeExpandOpts.value;
|
|
34953
35288
|
var lazy = expandOpts.lazy;
|
|
@@ -34960,6 +35295,14 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
34960
35295
|
|
|
34961
35296
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
34962
35297
|
},
|
|
35298
|
+
reloadExpandContent: function reloadExpandContent(row) {
|
|
35299
|
+
if (true) {
|
|
35300
|
+
warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
|
|
35301
|
+
} // 即将废弃
|
|
35302
|
+
|
|
35303
|
+
|
|
35304
|
+
return tableMethods.reloadRowExpand(row);
|
|
35305
|
+
},
|
|
34963
35306
|
|
|
34964
35307
|
/**
|
|
34965
35308
|
* 切换展开行
|
|
@@ -35128,23 +35471,38 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35128
35471
|
},
|
|
35129
35472
|
|
|
35130
35473
|
/**
|
|
35131
|
-
*
|
|
35474
|
+
* 重新懒加载树节点,并展开该节点
|
|
35132
35475
|
* @param {Row} row 行对象
|
|
35133
35476
|
*/
|
|
35134
|
-
|
|
35477
|
+
reloadTreeExpand: function reloadTreeExpand(row) {
|
|
35135
35478
|
var treeLazyLoadeds = reactData.treeLazyLoadeds;
|
|
35136
35479
|
var treeOpts = computeTreeOpts.value;
|
|
35137
|
-
var
|
|
35480
|
+
var transform = treeOpts.transform,
|
|
35481
|
+
lazy = treeOpts.lazy,
|
|
35138
35482
|
hasChild = treeOpts.hasChild;
|
|
35139
35483
|
|
|
35140
35484
|
if (lazy && row[hasChild] && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1) {
|
|
35141
35485
|
tableMethods.clearTreeExpandLoaded(row).then(function () {
|
|
35142
35486
|
return handleAsyncTreeExpandChilds(row);
|
|
35487
|
+
}).then(function () {
|
|
35488
|
+
if (transform) {
|
|
35489
|
+
return updateVirtualTreeData();
|
|
35490
|
+
}
|
|
35491
|
+
}).then(function () {
|
|
35492
|
+
return tableMethods.recalculate();
|
|
35143
35493
|
});
|
|
35144
35494
|
}
|
|
35145
35495
|
|
|
35146
35496
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
35147
35497
|
},
|
|
35498
|
+
reloadTreeChilds: function reloadTreeChilds(row) {
|
|
35499
|
+
if (true) {
|
|
35500
|
+
warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
|
|
35501
|
+
} // 即将废弃
|
|
35502
|
+
|
|
35503
|
+
|
|
35504
|
+
return tableMethods.reloadTreeExpand(row);
|
|
35505
|
+
},
|
|
35148
35506
|
|
|
35149
35507
|
/**
|
|
35150
35508
|
* 切换/展开树节点
|
|
@@ -35181,21 +35539,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35181
35539
|
* @param {Boolean} expanded 是否展开
|
|
35182
35540
|
*/
|
|
35183
35541
|
setTreeExpand: function setTreeExpand(rows, expanded) {
|
|
35184
|
-
var treeExpandeds = reactData.treeExpandeds,
|
|
35185
|
-
treeLazyLoadeds = reactData.treeLazyLoadeds,
|
|
35186
|
-
treeNodeColumn = reactData.treeNodeColumn;
|
|
35187
|
-
var fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
35188
|
-
tableFullData = internalData.tableFullData;
|
|
35189
35542
|
var treeOpts = computeTreeOpts.value;
|
|
35190
|
-
var
|
|
35191
|
-
lazy = treeOpts.lazy,
|
|
35192
|
-
hasChild = treeOpts.hasChild,
|
|
35193
|
-
children = treeOpts.children,
|
|
35194
|
-
accordion = treeOpts.accordion,
|
|
35195
|
-
toggleMethod = treeOpts.toggleMethod;
|
|
35196
|
-
var result = [];
|
|
35197
|
-
var columnIndex = tableMethods.getColumnIndex(treeNodeColumn);
|
|
35198
|
-
var $columnIndex = tableMethods.getVMColumnIndex(treeNodeColumn);
|
|
35543
|
+
var transform = treeOpts.transform;
|
|
35199
35544
|
|
|
35200
35545
|
if (rows) {
|
|
35201
35546
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(rows)) {
|
|
@@ -35203,62 +35548,12 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35203
35548
|
}
|
|
35204
35549
|
|
|
35205
35550
|
if (rows.length) {
|
|
35206
|
-
|
|
35207
|
-
|
|
35208
|
-
|
|
35209
|
-
expanded: expanded,
|
|
35210
|
-
column: treeNodeColumn,
|
|
35211
|
-
columnIndex: columnIndex,
|
|
35212
|
-
$columnIndex: $columnIndex,
|
|
35213
|
-
row: row
|
|
35214
|
-
});
|
|
35215
|
-
}) : rows;
|
|
35216
|
-
|
|
35217
|
-
if (accordion) {
|
|
35218
|
-
validRows = validRows.length ? [validRows[validRows.length - 1]] : []; // 同一级只能展开一个
|
|
35219
|
-
|
|
35220
|
-
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
|
|
35221
|
-
return item === validRows[0];
|
|
35222
|
-
}, treeOpts);
|
|
35223
|
-
|
|
35224
|
-
if (matchObj) {
|
|
35225
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(treeExpandeds, function (item) {
|
|
35226
|
-
return matchObj.items.indexOf(item) > -1;
|
|
35227
|
-
});
|
|
35228
|
-
}
|
|
35229
|
-
}
|
|
35230
|
-
|
|
35231
|
-
if (expanded) {
|
|
35232
|
-
validRows.forEach(function (row) {
|
|
35233
|
-
if ($xetable.findRowIndexOf(treeExpandeds, row) === -1) {
|
|
35234
|
-
var rest = fullAllDataRowIdData[util_getRowid($xetable, row)];
|
|
35235
|
-
|
|
35236
|
-
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && $xetable.findRowIndexOf(treeLazyLoadeds, row) === -1; // 是否使用懒加载
|
|
35237
|
-
|
|
35238
|
-
if (isLoad) {
|
|
35239
|
-
result.push(handleAsyncTreeExpandChilds(row));
|
|
35240
|
-
} else {
|
|
35241
|
-
if (row[children] && row[children].length) {
|
|
35242
|
-
treeExpandeds.push(row);
|
|
35243
|
-
}
|
|
35244
|
-
}
|
|
35245
|
-
}
|
|
35246
|
-
});
|
|
35551
|
+
// 如果为虚拟树
|
|
35552
|
+
if (transform) {
|
|
35553
|
+
return handleVirtualTreeExpand(rows, expanded);
|
|
35247
35554
|
} else {
|
|
35248
|
-
|
|
35249
|
-
return $xetable.findRowIndexOf(validRows, row) > -1;
|
|
35250
|
-
});
|
|
35555
|
+
return handleBaseTreeExpand(rows, expanded);
|
|
35251
35556
|
}
|
|
35252
|
-
|
|
35253
|
-
if (reserve) {
|
|
35254
|
-
validRows.forEach(function (row) {
|
|
35255
|
-
return handleTreeExpandReserve(row, expanded);
|
|
35256
|
-
});
|
|
35257
|
-
}
|
|
35258
|
-
|
|
35259
|
-
return Promise.all(result).then(function () {
|
|
35260
|
-
return tableMethods.recalculate();
|
|
35261
|
-
});
|
|
35262
35557
|
}
|
|
35263
35558
|
}
|
|
35264
35559
|
|
|
@@ -35279,19 +35574,19 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
35279
35574
|
*/
|
|
35280
35575
|
clearTreeExpand: function clearTreeExpand() {
|
|
35281
35576
|
var treeExpandeds = reactData.treeExpandeds;
|
|
35282
|
-
var
|
|
35577
|
+
var treeFullData = internalData.treeFullData;
|
|
35283
35578
|
var treeOpts = computeTreeOpts.value;
|
|
35284
35579
|
var reserve = treeOpts.reserve;
|
|
35285
35580
|
var isExists = treeExpandeds.length;
|
|
35286
35581
|
reactData.treeExpandeds = [];
|
|
35287
35582
|
|
|
35288
35583
|
if (reserve) {
|
|
35289
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(
|
|
35584
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row) {
|
|
35290
35585
|
return handleTreeExpandReserve(row, false);
|
|
35291
35586
|
}, treeOpts);
|
|
35292
35587
|
}
|
|
35293
35588
|
|
|
35294
|
-
return
|
|
35589
|
+
return updateVirtualTreeData().then(function () {
|
|
35295
35590
|
if (isExists) {
|
|
35296
35591
|
tableMethods.recalculate();
|
|
35297
35592
|
}
|
|
@@ -36280,16 +36575,17 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36280
36575
|
* 更新数据行的 Map
|
|
36281
36576
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
36282
36577
|
*/
|
|
36283
|
-
|
|
36578
|
+
cacheRowMap: function cacheRowMap(isSource) {
|
|
36284
36579
|
var treeConfig = props.treeConfig;
|
|
36285
36580
|
var treeOpts = computeTreeOpts.value;
|
|
36286
36581
|
var fullDataRowIdData = internalData.fullDataRowIdData,
|
|
36287
36582
|
fullAllDataRowIdData = internalData.fullAllDataRowIdData,
|
|
36288
|
-
tableFullData = internalData.tableFullData
|
|
36583
|
+
tableFullData = internalData.tableFullData,
|
|
36584
|
+
treeFullData = internalData.treeFullData;
|
|
36289
36585
|
var rowkey = getRowkey($xetable);
|
|
36290
36586
|
var isLazy = treeConfig && treeOpts.lazy;
|
|
36291
36587
|
|
|
36292
|
-
var handleCache = function handleCache(row, index, items, path, parent) {
|
|
36588
|
+
var handleCache = function handleCache(row, index, items, path, parent, nodes) {
|
|
36293
36589
|
var rowid = util_getRowid($xetable, row);
|
|
36294
36590
|
|
|
36295
36591
|
if (eqEmptyValue(rowid)) {
|
|
@@ -36308,7 +36604,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36308
36604
|
_index: -1,
|
|
36309
36605
|
$index: -1,
|
|
36310
36606
|
items: items,
|
|
36311
|
-
parent: parent
|
|
36607
|
+
parent: parent,
|
|
36608
|
+
level: nodes ? nodes.length - 1 : 0
|
|
36312
36609
|
};
|
|
36313
36610
|
|
|
36314
36611
|
if (isSource) {
|
|
@@ -36325,7 +36622,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36325
36622
|
fullAllDataRowIdData = internalData.fullAllDataRowIdData = {};
|
|
36326
36623
|
|
|
36327
36624
|
if (treeConfig) {
|
|
36328
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(
|
|
36625
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, handleCache, treeOpts);
|
|
36329
36626
|
} else {
|
|
36330
36627
|
tableFullData.forEach(handleCache);
|
|
36331
36628
|
}
|
|
@@ -36721,10 +37018,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
36721
37018
|
var column = params.column;
|
|
36722
37019
|
var titleHelp = column.titleHelp;
|
|
36723
37020
|
|
|
36724
|
-
if (titleHelp.message) {
|
|
37021
|
+
if (titleHelp.content || titleHelp.message) {
|
|
36725
37022
|
var tooltipStore = internalData.tooltipStore;
|
|
36726
37023
|
var $tooltip = refTooltip.value;
|
|
36727
|
-
var content = getFuncText(titleHelp.message);
|
|
37024
|
+
var content = getFuncText(titleHelp.content || titleHelp.message);
|
|
36728
37025
|
handleTargetEnterEvent();
|
|
36729
37026
|
tooltipStore.visible = true;
|
|
36730
37027
|
|
|
@@ -37472,6 +37769,20 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37472
37769
|
return false;
|
|
37473
37770
|
}
|
|
37474
37771
|
};
|
|
37772
|
+
|
|
37773
|
+
if (true) {
|
|
37774
|
+
'openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').forEach(function (name) {
|
|
37775
|
+
$xetable[name] = function () {
|
|
37776
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
37777
|
+
};
|
|
37778
|
+
});
|
|
37779
|
+
'clearValidate,fullValidate,validate'.split(',').forEach(function (name) {
|
|
37780
|
+
$xetable[name] = function () {
|
|
37781
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
37782
|
+
};
|
|
37783
|
+
});
|
|
37784
|
+
}
|
|
37785
|
+
|
|
37475
37786
|
Object.assign($xetable, tableMethods, tablePrivateMethods);
|
|
37476
37787
|
/**
|
|
37477
37788
|
* 渲染浮固定列
|
|
@@ -37733,6 +38044,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37733
38044
|
if (true) {
|
|
37734
38045
|
var customOpts = computeCustomOpts.value;
|
|
37735
38046
|
var mouseOpts = computeMouseOpts.value;
|
|
38047
|
+
var rowOpts = computeRowOpts.value;
|
|
37736
38048
|
|
|
37737
38049
|
if (!props.id && props.customConfig && (customOpts.storage === true || customOpts.storage && customOpts.storage.resizable || customOpts.storage && customOpts.storage.visible)) {
|
|
37738
38050
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -37742,6 +38054,10 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
37742
38054
|
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
37743
38055
|
}
|
|
37744
38056
|
|
|
38057
|
+
if (rowOpts.height && !props.showOverflow) {
|
|
38058
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
38059
|
+
}
|
|
38060
|
+
|
|
37745
38061
|
if (!$xetable.handleUpdateCellAreas) {
|
|
37746
38062
|
if (props.clipConfig) {
|
|
37747
38063
|
warnLog('vxe.error.notProp', ['clip-config']);
|