vxe-table 4.2.4-beta.2 → 4.2.4-beta.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/es/all.js +0 -2
- package/es/edit/src/hook.js +35 -4
- package/es/table/src/table.js +3 -2
- package/es/tools/log.js +1 -1
- package/es/v-x-e-table/index.js +1 -1
- package/lib/all.js +15 -15
- package/lib/all.min.js +1 -1
- package/lib/edit/src/hook.js +35 -4
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/index.umd.js +1720 -1689
- package/lib/index.umd.min.js +1 -1
- package/lib/table/src/table.js +4 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/package.json +1 -1
- package/packages/all.ts +0 -2
- package/packages/edit/src/hook.ts +35 -4
- package/packages/table/src/table.ts +3 -2
- package/types/all.d.ts +0 -1
- package/types/edit.d.ts +38 -5
package/lib/index.umd.js
CHANGED
|
@@ -8802,7 +8802,7 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
8802
8802
|
|
|
8803
8803
|
|
|
8804
8804
|
function getLog(message, params) {
|
|
8805
|
-
return "[vxe-table v".concat("4.2.4-beta.
|
|
8805
|
+
return "[vxe-table v".concat("4.2.4-beta.3", "] ").concat(conf.i18n(message, params));
|
|
8806
8806
|
}
|
|
8807
8807
|
|
|
8808
8808
|
function outLog(type) {
|
|
@@ -10807,7 +10807,7 @@ var v_x_e_table_config = new v_x_e_table_VXETableConfig();
|
|
|
10807
10807
|
var v = 'v4';
|
|
10808
10808
|
var VXETable = {
|
|
10809
10809
|
v: v,
|
|
10810
|
-
version: "4.2.4-beta.
|
|
10810
|
+
version: "4.2.4-beta.3",
|
|
10811
10811
|
setup: setup_setup,
|
|
10812
10812
|
interceptor: interceptor,
|
|
10813
10813
|
renderer: renderer,
|
|
@@ -12768,6 +12768,9 @@ var editHook = {
|
|
|
12768
12768
|
return [];
|
|
12769
12769
|
},
|
|
12770
12770
|
getActiveRecord: function getActiveRecord() {
|
|
12771
|
+
return this.getEditRecord();
|
|
12772
|
+
},
|
|
12773
|
+
getEditRecord: function getEditRecord() {
|
|
12771
12774
|
var editStore = reactData.editStore;
|
|
12772
12775
|
var afterFullData = internalData.afterFullData;
|
|
12773
12776
|
var el = refElem.value;
|
|
@@ -12797,11 +12800,18 @@ var editHook = {
|
|
|
12797
12800
|
|
|
12798
12801
|
return null;
|
|
12799
12802
|
},
|
|
12803
|
+
clearActived: function clearActived(evnt) {
|
|
12804
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12805
|
+
// warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
12806
|
+
// }
|
|
12807
|
+
// 即将废弃
|
|
12808
|
+
return this.clearEdit(evnt);
|
|
12809
|
+
},
|
|
12800
12810
|
|
|
12801
12811
|
/**
|
|
12802
12812
|
* 清除激活的编辑
|
|
12803
12813
|
*/
|
|
12804
|
-
|
|
12814
|
+
clearEdit: function clearEdit(evnt) {
|
|
12805
12815
|
var editStore = reactData.editStore;
|
|
12806
12816
|
var actived = editStore.actived;
|
|
12807
12817
|
var row = actived.row,
|
|
@@ -12837,30 +12847,51 @@ var editHook = {
|
|
|
12837
12847
|
removeCellSelectedClass();
|
|
12838
12848
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
|
|
12839
12849
|
},
|
|
12850
|
+
isActiveByRow: function isActiveByRow(row) {
|
|
12851
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12852
|
+
// warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
12853
|
+
// }
|
|
12854
|
+
// 即将废弃
|
|
12855
|
+
return this.isEditByRow(row);
|
|
12856
|
+
},
|
|
12840
12857
|
|
|
12841
12858
|
/**
|
|
12842
12859
|
* 判断行是否为激活编辑状态
|
|
12843
12860
|
* @param {Row} row 行对象
|
|
12844
12861
|
*/
|
|
12845
|
-
|
|
12862
|
+
isEditByRow: function isEditByRow(row) {
|
|
12846
12863
|
var editStore = reactData.editStore;
|
|
12847
12864
|
return editStore.actived.row === row;
|
|
12848
12865
|
},
|
|
12866
|
+
setActiveRow: function setActiveRow(row) {
|
|
12867
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12868
|
+
// warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
12869
|
+
// }
|
|
12870
|
+
// 即将废弃
|
|
12871
|
+
return editMethods.setEditRow(row);
|
|
12872
|
+
},
|
|
12849
12873
|
|
|
12850
12874
|
/**
|
|
12851
12875
|
* 激活行编辑
|
|
12852
12876
|
*/
|
|
12853
|
-
|
|
12877
|
+
setEditRow: function setEditRow(row) {
|
|
12854
12878
|
var visibleColumn = internalData.visibleColumn;
|
|
12855
12879
|
return $xetable.setActiveCell(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.find(visibleColumn, function (column) {
|
|
12856
12880
|
return isEnableConf(column.editRender);
|
|
12857
12881
|
}));
|
|
12858
12882
|
},
|
|
12883
|
+
setActiveCell: function setActiveCell(row, fieldOrColumn) {
|
|
12884
|
+
// if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
12885
|
+
// warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
12886
|
+
// }
|
|
12887
|
+
// 即将废弃
|
|
12888
|
+
return editMethods.setEditCell(row, fieldOrColumn);
|
|
12889
|
+
},
|
|
12859
12890
|
|
|
12860
12891
|
/**
|
|
12861
12892
|
* 激活单元格编辑
|
|
12862
12893
|
*/
|
|
12863
|
-
|
|
12894
|
+
setEditCell: function setEditCell(row, fieldOrColumn) {
|
|
12864
12895
|
var editConfig = props.editConfig;
|
|
12865
12896
|
var column = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
12866
12897
|
|
|
@@ -22451,100 +22482,66 @@ var Validator = {
|
|
|
22451
22482
|
}
|
|
22452
22483
|
};
|
|
22453
22484
|
/* harmony default export */ var validator = (Validator);
|
|
22454
|
-
// CONCATENATED MODULE: ./packages/
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
|
|
22458
|
-
var util_getAllColumns = function getAllColumns(columns, parentColumn) {
|
|
22459
|
-
var result = [];
|
|
22460
|
-
columns.forEach(function (column) {
|
|
22461
|
-
column.parentId = parentColumn ? parentColumn.id : null;
|
|
22462
|
-
|
|
22463
|
-
if (column.visible) {
|
|
22464
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22465
|
-
return column.visible;
|
|
22466
|
-
})) {
|
|
22467
|
-
result.push(column);
|
|
22468
|
-
result.push.apply(result, _toConsumableArray(getAllColumns(column.children, column)));
|
|
22469
|
-
} else {
|
|
22470
|
-
result.push(column);
|
|
22471
|
-
}
|
|
22472
|
-
}
|
|
22473
|
-
});
|
|
22474
|
-
return result;
|
|
22475
|
-
};
|
|
22476
|
-
|
|
22477
|
-
var util_convertToRows = function convertToRows(originColumns) {
|
|
22478
|
-
var maxLevel = 1;
|
|
22479
|
-
|
|
22480
|
-
var traverse = function traverse(column, parent) {
|
|
22481
|
-
if (parent) {
|
|
22482
|
-
column.level = parent.level + 1;
|
|
22483
|
-
|
|
22484
|
-
if (maxLevel < column.level) {
|
|
22485
|
-
maxLevel = column.level;
|
|
22486
|
-
}
|
|
22487
|
-
}
|
|
22488
|
-
|
|
22489
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22490
|
-
return column.visible;
|
|
22491
|
-
})) {
|
|
22492
|
-
var colSpan = 0;
|
|
22493
|
-
column.children.forEach(function (subColumn) {
|
|
22494
|
-
if (subColumn.visible) {
|
|
22495
|
-
traverse(subColumn, column);
|
|
22496
|
-
colSpan += subColumn.colSpan;
|
|
22497
|
-
}
|
|
22498
|
-
});
|
|
22499
|
-
column.colSpan = colSpan;
|
|
22500
|
-
} else {
|
|
22501
|
-
column.colSpan = 1;
|
|
22502
|
-
}
|
|
22503
|
-
};
|
|
22485
|
+
// CONCATENATED MODULE: ./packages/footer/src/footer.ts
|
|
22504
22486
|
|
|
22505
|
-
originColumns.forEach(function (column) {
|
|
22506
|
-
column.level = 1;
|
|
22507
|
-
traverse(column);
|
|
22508
|
-
});
|
|
22509
|
-
var rows = [];
|
|
22510
22487
|
|
|
22511
|
-
for (var i = 0; i < maxLevel; i++) {
|
|
22512
|
-
rows.push([]);
|
|
22513
|
-
}
|
|
22514
22488
|
|
|
22515
|
-
var allColumns = util_getAllColumns(originColumns);
|
|
22516
|
-
allColumns.forEach(function (column) {
|
|
22517
|
-
if (column.children && column.children.length && column.children.some(function (column) {
|
|
22518
|
-
return column.visible;
|
|
22519
|
-
})) {
|
|
22520
|
-
column.rowSpan = 1;
|
|
22521
|
-
} else {
|
|
22522
|
-
column.rowSpan = maxLevel - column.level + 1;
|
|
22523
|
-
}
|
|
22524
22489
|
|
|
22525
|
-
rows[column.level - 1].push(column);
|
|
22526
|
-
});
|
|
22527
|
-
return rows;
|
|
22528
|
-
};
|
|
22529
|
-
// CONCATENATED MODULE: ./packages/header/src/header.ts
|
|
22530
22490
|
|
|
22531
22491
|
|
|
22532
22492
|
|
|
22533
22493
|
|
|
22534
22494
|
|
|
22535
22495
|
|
|
22496
|
+
var renderType = 'footer';
|
|
22536
22497
|
|
|
22498
|
+
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
22499
|
+
for (var mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
22500
|
+
var _mergeFooterList$mInd = mergeFooterList[mIndex],
|
|
22501
|
+
mergeRowIndex = _mergeFooterList$mInd.row,
|
|
22502
|
+
mergeColIndex = _mergeFooterList$mInd.col,
|
|
22503
|
+
mergeRowspan = _mergeFooterList$mInd.rowspan,
|
|
22504
|
+
mergeColspan = _mergeFooterList$mInd.colspan;
|
|
22537
22505
|
|
|
22506
|
+
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
22507
|
+
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
22508
|
+
return {
|
|
22509
|
+
rowspan: mergeRowspan,
|
|
22510
|
+
colspan: mergeColspan
|
|
22511
|
+
};
|
|
22512
|
+
}
|
|
22538
22513
|
|
|
22514
|
+
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
22515
|
+
return {
|
|
22516
|
+
rowspan: 0,
|
|
22517
|
+
colspan: 0
|
|
22518
|
+
};
|
|
22519
|
+
}
|
|
22520
|
+
}
|
|
22521
|
+
}
|
|
22522
|
+
}
|
|
22539
22523
|
|
|
22540
|
-
var
|
|
22541
|
-
|
|
22542
|
-
name: 'VxeTableHeader',
|
|
22524
|
+
/* harmony default export */ var footer = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
22525
|
+
name: 'VxeTableFooter',
|
|
22543
22526
|
props: {
|
|
22544
|
-
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
|
|
22527
|
+
footerTableData: {
|
|
22528
|
+
type: Array,
|
|
22529
|
+
default: function _default() {
|
|
22530
|
+
return [];
|
|
22531
|
+
}
|
|
22532
|
+
},
|
|
22533
|
+
tableColumn: {
|
|
22534
|
+
type: Array,
|
|
22535
|
+
default: function _default() {
|
|
22536
|
+
return [];
|
|
22537
|
+
}
|
|
22538
|
+
},
|
|
22539
|
+
fixedColumn: {
|
|
22540
|
+
type: Array,
|
|
22541
|
+
default: function _default() {
|
|
22542
|
+
return [];
|
|
22543
|
+
}
|
|
22544
|
+
},
|
|
22548
22545
|
fixedType: {
|
|
22549
22546
|
type: String,
|
|
22550
22547
|
default: null
|
|
@@ -22558,200 +22555,135 @@ var renderType = 'header';
|
|
|
22558
22555
|
tableInternalData = $xetable.internalData;
|
|
22559
22556
|
|
|
22560
22557
|
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
22561
|
-
|
|
22558
|
+
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
22562
22559
|
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
22563
|
-
|
|
22564
|
-
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
22565
|
-
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
22560
|
+
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
22566
22561
|
|
|
22567
22562
|
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
22563
|
+
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
22568
22564
|
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
22569
22565
|
|
|
22570
|
-
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
22571
22566
|
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22572
|
-
var
|
|
22573
|
-
var
|
|
22574
|
-
var
|
|
22575
|
-
var
|
|
22576
|
-
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
};
|
|
22567
|
+
var refFooterTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22568
|
+
var refFooterColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22569
|
+
var refFooterTFoot = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22570
|
+
var refFooterXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22571
|
+
/**
|
|
22572
|
+
* 滚动处理
|
|
22573
|
+
* 如果存在列固定左侧,同步更新滚动状态
|
|
22574
|
+
* 如果存在列固定右侧,同步更新滚动状态
|
|
22575
|
+
*/
|
|
22582
22576
|
|
|
22583
|
-
var
|
|
22584
|
-
var column = params.column;
|
|
22577
|
+
var scrollEvent = function scrollEvent(evnt) {
|
|
22585
22578
|
var fixedType = props.fixedType;
|
|
22579
|
+
var scrollXLoad = tableReactData.scrollXLoad;
|
|
22580
|
+
var lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
22581
|
+
var validTip = refValidTooltip.value;
|
|
22582
|
+
var tableHeader = refTableHeader.value;
|
|
22586
22583
|
var tableBody = refTableBody.value;
|
|
22587
|
-
var
|
|
22588
|
-
var
|
|
22589
|
-
var
|
|
22590
|
-
var
|
|
22591
|
-
var
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
var dragLeft = 0;
|
|
22595
|
-
var tableBodyElem = tableBody.$el;
|
|
22596
|
-
var pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
22597
|
-
var dragBtnWidth = dragBtnElem.clientWidth;
|
|
22598
|
-
var dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
22599
|
-
var minInterval = getColMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
22600
|
-
|
|
22601
|
-
var dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
|
|
22602
|
-
var dragPosLeft = pos.left + dragBtnOffsetWidth;
|
|
22603
|
-
var domMousemove = document.onmousemove;
|
|
22604
|
-
var domMouseup = document.onmouseup;
|
|
22605
|
-
var isLeftFixed = fixedType === 'left';
|
|
22606
|
-
var isRightFixed = fixedType === 'right';
|
|
22607
|
-
var tableEl = tableRefElem.value; // 计算左右侧固定列偏移量
|
|
22584
|
+
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
22585
|
+
var footerElem = refElem.value;
|
|
22586
|
+
var bodyElem = tableBody.$el;
|
|
22587
|
+
var scrollLeft = footerElem.scrollLeft;
|
|
22588
|
+
var isX = scrollLeft !== lastScrollLeft;
|
|
22589
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
22590
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
22608
22591
|
|
|
22609
|
-
|
|
22592
|
+
if (headerElem) {
|
|
22593
|
+
headerElem.scrollLeft = scrollLeft;
|
|
22594
|
+
}
|
|
22610
22595
|
|
|
22611
|
-
if (
|
|
22612
|
-
|
|
22613
|
-
|
|
22596
|
+
if (bodyElem) {
|
|
22597
|
+
bodyElem.scrollLeft = scrollLeft;
|
|
22598
|
+
}
|
|
22614
22599
|
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
} else if (!hasClass(tempCellElem, 'col--group')) {
|
|
22619
|
-
fixedOffsetWidth += tempCellElem.offsetWidth;
|
|
22620
|
-
}
|
|
22600
|
+
if (scrollXLoad && isX) {
|
|
22601
|
+
$xetable.triggerScrollXEvent(evnt);
|
|
22602
|
+
}
|
|
22621
22603
|
|
|
22622
|
-
|
|
22623
|
-
|
|
22604
|
+
if (isX && validTip && validTip.reactData.visible) {
|
|
22605
|
+
validTip.updatePlacement();
|
|
22606
|
+
}
|
|
22624
22607
|
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
|
|
22628
|
-
|
|
22608
|
+
$xetable.dispatchEvent('scroll', {
|
|
22609
|
+
type: renderType,
|
|
22610
|
+
fixed: fixedType,
|
|
22611
|
+
scrollTop: bodyElem.scrollTop,
|
|
22612
|
+
scrollLeft: scrollLeft,
|
|
22613
|
+
isX: isX,
|
|
22614
|
+
isY: false
|
|
22615
|
+
}, evnt);
|
|
22616
|
+
};
|
|
22629
22617
|
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
|
|
22633
|
-
|
|
22634
|
-
var
|
|
22635
|
-
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
|
|
22641
|
-
|
|
22642
|
-
|
|
22643
|
-
|
|
22644
|
-
|
|
22645
|
-
|
|
22646
|
-
|
|
22647
|
-
|
|
22648
|
-
|
|
22649
|
-
|
|
22650
|
-
|
|
22651
|
-
|
|
22652
|
-
|
|
22653
|
-
tableInternalData._isResize = true;
|
|
22654
|
-
addClass(tableEl, 'drag--resize');
|
|
22655
|
-
resizeBarElem.style.display = 'block';
|
|
22656
|
-
document.onmousemove = updateEvent;
|
|
22657
|
-
|
|
22658
|
-
document.onmouseup = function (evnt) {
|
|
22659
|
-
document.onmousemove = domMousemove;
|
|
22660
|
-
document.onmouseup = domMouseup;
|
|
22661
|
-
column.resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
22662
|
-
resizeBarElem.style.display = 'none';
|
|
22663
|
-
tableInternalData._isResize = false;
|
|
22664
|
-
tableInternalData._lastResizeTime = Date.now();
|
|
22665
|
-
$xetable.analyColumnWidth();
|
|
22666
|
-
$xetable.recalculate(true).then(function () {
|
|
22667
|
-
$xetable.saveCustomResizable();
|
|
22668
|
-
$xetable.updateCellAreas();
|
|
22669
|
-
$xetable.dispatchEvent('resizable-change', params, evnt);
|
|
22670
|
-
});
|
|
22671
|
-
removeClass(tableEl, 'drag--resize');
|
|
22672
|
-
};
|
|
22673
|
-
|
|
22674
|
-
updateEvent(evnt);
|
|
22675
|
-
|
|
22676
|
-
if ($xetable.closeMenu) {
|
|
22677
|
-
$xetable.closeMenu();
|
|
22678
|
-
}
|
|
22679
|
-
};
|
|
22680
|
-
|
|
22681
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
22682
|
-
return props.tableColumn;
|
|
22683
|
-
}, uploadColumn);
|
|
22684
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
22685
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
22686
|
-
var fixedType = props.fixedType;
|
|
22687
|
-
var internalData = $xetable.internalData;
|
|
22688
|
-
var elemStore = internalData.elemStore;
|
|
22689
|
-
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
22690
|
-
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
22691
|
-
elemStore["".concat(prefix, "table")] = refHeaderTable;
|
|
22692
|
-
elemStore["".concat(prefix, "colgroup")] = refHeaderColgroup;
|
|
22693
|
-
elemStore["".concat(prefix, "list")] = refHeaderTHead;
|
|
22694
|
-
elemStore["".concat(prefix, "xSpace")] = refHeaderXSpace;
|
|
22695
|
-
elemStore["".concat(prefix, "repair")] = refHeaderBorderRepair;
|
|
22696
|
-
uploadColumn();
|
|
22697
|
-
});
|
|
22698
|
-
});
|
|
22699
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
22700
|
-
var fixedType = props.fixedType;
|
|
22701
|
-
var internalData = $xetable.internalData;
|
|
22702
|
-
var elemStore = internalData.elemStore;
|
|
22703
|
-
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
22704
|
-
elemStore["".concat(prefix, "wrapper")] = null;
|
|
22705
|
-
elemStore["".concat(prefix, "table")] = null;
|
|
22706
|
-
elemStore["".concat(prefix, "colgroup")] = null;
|
|
22707
|
-
elemStore["".concat(prefix, "list")] = null;
|
|
22708
|
-
elemStore["".concat(prefix, "xSpace")] = null;
|
|
22709
|
-
elemStore["".concat(prefix, "repair")] = null;
|
|
22710
|
-
});
|
|
22618
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
22619
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
22620
|
+
var fixedType = props.fixedType;
|
|
22621
|
+
var elemStore = tableInternalData.elemStore;
|
|
22622
|
+
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
22623
|
+
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
22624
|
+
elemStore["".concat(prefix, "table")] = refFooterTable;
|
|
22625
|
+
elemStore["".concat(prefix, "colgroup")] = refFooterColgroup;
|
|
22626
|
+
elemStore["".concat(prefix, "list")] = refFooterTFoot;
|
|
22627
|
+
elemStore["".concat(prefix, "xSpace")] = refFooterXSpace;
|
|
22628
|
+
});
|
|
22629
|
+
});
|
|
22630
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
22631
|
+
var fixedType = props.fixedType;
|
|
22632
|
+
var elemStore = tableInternalData.elemStore;
|
|
22633
|
+
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
22634
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
22635
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
22636
|
+
elemStore["".concat(prefix, "colgroup")] = null;
|
|
22637
|
+
elemStore["".concat(prefix, "list")] = null;
|
|
22638
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
22639
|
+
});
|
|
22711
22640
|
|
|
22712
22641
|
var renderVN = function renderVN() {
|
|
22713
22642
|
var fixedType = props.fixedType,
|
|
22714
22643
|
fixedColumn = props.fixedColumn,
|
|
22715
|
-
tableColumn = props.tableColumn
|
|
22716
|
-
|
|
22717
|
-
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
|
|
22721
|
-
|
|
22722
|
-
|
|
22723
|
-
allColumnHeaderOverflow = tableProps.showHeaderOverflow,
|
|
22724
|
-
allHeaderAlign = tableProps.headerAlign,
|
|
22644
|
+
tableColumn = props.tableColumn,
|
|
22645
|
+
footerTableData = props.footerTableData;
|
|
22646
|
+
var footerRowClassName = tableProps.footerRowClassName,
|
|
22647
|
+
footerCellClassName = tableProps.footerCellClassName,
|
|
22648
|
+
footerRowStyle = tableProps.footerRowStyle,
|
|
22649
|
+
footerCellStyle = tableProps.footerCellStyle,
|
|
22650
|
+
allFooterAlign = tableProps.footerAlign,
|
|
22651
|
+
footerSpanMethod = tableProps.footerSpanMethod,
|
|
22725
22652
|
allAlign = tableProps.align,
|
|
22726
|
-
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22653
|
+
columnKey = tableProps.columnKey,
|
|
22654
|
+
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
22655
|
+
var visibleColumn = tableInternalData.visibleColumn;
|
|
22656
|
+
var scrollYLoad = tableReactData.scrollYLoad,
|
|
22730
22657
|
overflowX = tableReactData.overflowX,
|
|
22731
|
-
scrollbarWidth = tableReactData.scrollbarWidth
|
|
22732
|
-
|
|
22733
|
-
|
|
22658
|
+
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
22659
|
+
currentColumn = tableReactData.currentColumn,
|
|
22660
|
+
mergeFooterList = tableReactData.mergeFooterList;
|
|
22661
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
22662
|
+
var columnOpts = computeColumnOpts.value; // 如果是使用优化模式
|
|
22734
22663
|
|
|
22735
|
-
if (
|
|
22736
|
-
if (
|
|
22737
|
-
if (
|
|
22664
|
+
if (fixedType) {
|
|
22665
|
+
if (scrollYLoad || allColumnFooterOverflow) {
|
|
22666
|
+
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
22738
22667
|
tableColumn = fixedColumn;
|
|
22668
|
+
} else {
|
|
22669
|
+
tableColumn = visibleColumn;
|
|
22739
22670
|
}
|
|
22671
|
+
} else {
|
|
22672
|
+
tableColumn = visibleColumn;
|
|
22740
22673
|
}
|
|
22741
|
-
|
|
22742
|
-
headerGroups = [tableColumn];
|
|
22743
22674
|
}
|
|
22744
22675
|
|
|
22745
22676
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22746
22677
|
ref: refElem,
|
|
22747
|
-
class: ['vxe-table--
|
|
22748
|
-
xid: xID
|
|
22678
|
+
class: ['vxe-table--footer-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
22679
|
+
xid: xID,
|
|
22680
|
+
onScroll: scrollEvent
|
|
22749
22681
|
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22750
|
-
ref:
|
|
22682
|
+
ref: refFooterXSpace,
|
|
22751
22683
|
class: 'vxe-body--x-space'
|
|
22752
22684
|
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
22753
|
-
ref:
|
|
22754
|
-
class: 'vxe-table--
|
|
22685
|
+
ref: refFooterTable,
|
|
22686
|
+
class: 'vxe-table--footer',
|
|
22755
22687
|
xid: xID,
|
|
22756
22688
|
cellspacing: 0,
|
|
22757
22689
|
cellpadding: 0,
|
|
@@ -22761,7 +22693,7 @@ var renderType = 'header';
|
|
|
22761
22693
|
* 列宽
|
|
22762
22694
|
*/
|
|
22763
22695
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
22764
|
-
ref:
|
|
22696
|
+
ref: refFooterColgroup
|
|
22765
22697
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
22766
22698
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
22767
22699
|
name: column.id,
|
|
@@ -22771,136 +22703,178 @@ var renderType = 'header';
|
|
|
22771
22703
|
name: 'col_gutter'
|
|
22772
22704
|
})] : [])),
|
|
22773
22705
|
/**
|
|
22774
|
-
*
|
|
22706
|
+
* 底部
|
|
22775
22707
|
*/
|
|
22776
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('
|
|
22777
|
-
ref:
|
|
22778
|
-
},
|
|
22708
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tfoot', {
|
|
22709
|
+
ref: refFooterTFoot
|
|
22710
|
+
}, footerTableData.map(function (list, _rowIndex) {
|
|
22711
|
+
var $rowIndex = _rowIndex;
|
|
22779
22712
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
22780
|
-
class: ['vxe-
|
|
22713
|
+
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowClassName) ? footerRowClassName({
|
|
22781
22714
|
$table: $xetable,
|
|
22715
|
+
_rowIndex: _rowIndex,
|
|
22782
22716
|
$rowIndex: $rowIndex,
|
|
22783
22717
|
fixed: fixedType,
|
|
22784
22718
|
type: renderType
|
|
22785
|
-
}) :
|
|
22786
|
-
style:
|
|
22719
|
+
}) : footerRowClassName : ''],
|
|
22720
|
+
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowStyle) ? footerRowStyle({
|
|
22787
22721
|
$table: $xetable,
|
|
22722
|
+
_rowIndex: _rowIndex,
|
|
22788
22723
|
$rowIndex: $rowIndex,
|
|
22789
22724
|
fixed: fixedType,
|
|
22790
22725
|
type: renderType
|
|
22791
|
-
}) :
|
|
22792
|
-
},
|
|
22793
|
-
var
|
|
22726
|
+
}) : footerRowStyle : null
|
|
22727
|
+
}, tableColumn.map(function (column, $columnIndex) {
|
|
22728
|
+
var _ref2;
|
|
22794
22729
|
|
|
22795
22730
|
var type = column.type,
|
|
22796
|
-
|
|
22797
|
-
|
|
22731
|
+
showFooterOverflow = column.showFooterOverflow,
|
|
22732
|
+
footerAlign = column.footerAlign,
|
|
22798
22733
|
align = column.align,
|
|
22799
|
-
|
|
22734
|
+
footerClassName = column.footerClassName;
|
|
22735
|
+
var showAllTip = tooltipOpts.showAll;
|
|
22800
22736
|
var isColGroup = column.children && column.children.length;
|
|
22801
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup :
|
|
22802
|
-
var
|
|
22803
|
-
var
|
|
22804
|
-
var showEllipsis =
|
|
22805
|
-
var showTitle =
|
|
22806
|
-
var showTooltip =
|
|
22737
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
22738
|
+
var footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
22739
|
+
var footAlign = footerAlign || align || allFooterAlign || allAlign;
|
|
22740
|
+
var showEllipsis = footOverflow === 'ellipsis';
|
|
22741
|
+
var showTitle = footOverflow === 'title';
|
|
22742
|
+
var showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
22807
22743
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
22808
|
-
var
|
|
22809
|
-
|
|
22810
|
-
}
|
|
22744
|
+
var attrs = {
|
|
22745
|
+
colid: column.id
|
|
22746
|
+
};
|
|
22747
|
+
var tfOns = {};
|
|
22811
22748
|
var columnIndex = $xetable.getColumnIndex(column);
|
|
22812
22749
|
|
|
22813
22750
|
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
22814
22751
|
|
|
22752
|
+
var itemIndex = _columnIndex;
|
|
22815
22753
|
var params = {
|
|
22816
22754
|
$table: $xetable,
|
|
22755
|
+
_rowIndex: _rowIndex,
|
|
22817
22756
|
$rowIndex: $rowIndex,
|
|
22818
22757
|
column: column,
|
|
22819
22758
|
columnIndex: columnIndex,
|
|
22820
22759
|
$columnIndex: $columnIndex,
|
|
22821
22760
|
_columnIndex: _columnIndex,
|
|
22761
|
+
itemIndex: itemIndex,
|
|
22762
|
+
items: list,
|
|
22822
22763
|
fixed: fixedType,
|
|
22823
22764
|
type: renderType,
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
};
|
|
22827
|
-
var thOns = {
|
|
22828
|
-
onClick: function onClick(evnt) {
|
|
22829
|
-
return $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
22830
|
-
},
|
|
22831
|
-
onDblclick: function onDblclick(evnt) {
|
|
22832
|
-
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
22833
|
-
}
|
|
22834
|
-
}; // 横向虚拟滚动不支持动态行高
|
|
22765
|
+
data: footerTableData
|
|
22766
|
+
}; // 纵向虚拟滚动不支持动态行高
|
|
22835
22767
|
|
|
22836
|
-
if (
|
|
22768
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
22837
22769
|
showEllipsis = hasEllipsis = true;
|
|
22838
|
-
}
|
|
22770
|
+
}
|
|
22839
22771
|
|
|
22772
|
+
if (showTitle || showTooltip || showAllTip) {
|
|
22773
|
+
tfOns.onMouseenter = function (evnt) {
|
|
22774
|
+
if (showTitle) {
|
|
22775
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
22776
|
+
} else if (showTooltip || showAllTip) {
|
|
22777
|
+
$xetable.triggerFooterTooltipEvent(evnt, params);
|
|
22778
|
+
}
|
|
22779
|
+
};
|
|
22780
|
+
}
|
|
22840
22781
|
|
|
22841
|
-
if (
|
|
22842
|
-
|
|
22843
|
-
|
|
22782
|
+
if (showTooltip || showAllTip) {
|
|
22783
|
+
tfOns.onMouseleave = function (evnt) {
|
|
22784
|
+
if (showTooltip || showAllTip) {
|
|
22785
|
+
$xetable.handleTargetLeaveEvent(evnt);
|
|
22786
|
+
}
|
|
22844
22787
|
};
|
|
22845
22788
|
}
|
|
22846
22789
|
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
|
|
22880
|
-
|
|
22881
|
-
|
|
22882
|
-
|
|
22883
|
-
|
|
22790
|
+
tfOns.onClick = function (evnt) {
|
|
22791
|
+
$xetable.dispatchEvent('footer-cell-click', Object.assign({
|
|
22792
|
+
cell: evnt.currentTarget
|
|
22793
|
+
}, params), evnt);
|
|
22794
|
+
};
|
|
22795
|
+
|
|
22796
|
+
tfOns.onDblclick = function (evnt) {
|
|
22797
|
+
$xetable.dispatchEvent('footer-cell-dblclick', Object.assign({
|
|
22798
|
+
cell: evnt.currentTarget
|
|
22799
|
+
}, params), evnt);
|
|
22800
|
+
}; // 合并行或列
|
|
22801
|
+
|
|
22802
|
+
|
|
22803
|
+
if (mergeFooterList.length) {
|
|
22804
|
+
var spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
22805
|
+
|
|
22806
|
+
if (spanRest) {
|
|
22807
|
+
var rowspan = spanRest.rowspan,
|
|
22808
|
+
colspan = spanRest.colspan;
|
|
22809
|
+
|
|
22810
|
+
if (!rowspan || !colspan) {
|
|
22811
|
+
return null;
|
|
22812
|
+
}
|
|
22813
|
+
|
|
22814
|
+
if (rowspan > 1) {
|
|
22815
|
+
attrs.rowspan = rowspan;
|
|
22816
|
+
}
|
|
22817
|
+
|
|
22818
|
+
if (colspan > 1) {
|
|
22819
|
+
attrs.colspan = colspan;
|
|
22820
|
+
}
|
|
22821
|
+
}
|
|
22822
|
+
} else if (footerSpanMethod) {
|
|
22823
|
+
// 自定义合并方法
|
|
22824
|
+
var _ref = footerSpanMethod(params) || {},
|
|
22825
|
+
_ref$rowspan = _ref.rowspan,
|
|
22826
|
+
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
22827
|
+
_ref$colspan = _ref.colspan,
|
|
22828
|
+
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
22829
|
+
|
|
22830
|
+
if (!_rowspan || !_colspan) {
|
|
22831
|
+
return null;
|
|
22832
|
+
}
|
|
22833
|
+
|
|
22834
|
+
if (_rowspan > 1) {
|
|
22835
|
+
attrs.rowspan = _rowspan;
|
|
22836
|
+
}
|
|
22837
|
+
|
|
22838
|
+
if (_colspan > 1) {
|
|
22839
|
+
attrs.colspan = _colspan;
|
|
22840
|
+
}
|
|
22841
|
+
}
|
|
22842
|
+
|
|
22843
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2(_objectSpread2({
|
|
22844
|
+
class: ['vxe-footer--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(footAlign), footAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === tableColumn.length - 1), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)]
|
|
22845
|
+
}, attrs), {}, {
|
|
22846
|
+
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle : null
|
|
22847
|
+
}, tfOns), {}, {
|
|
22848
|
+
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
22849
|
+
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
22850
|
+
class: ['vxe-cell', {
|
|
22851
|
+
'c--title': showTitle,
|
|
22852
|
+
'c--tooltip': showTooltip,
|
|
22853
|
+
'c--ellipsis': showEllipsis
|
|
22854
|
+
}]
|
|
22855
|
+
}, column.renderFooter(params))]);
|
|
22856
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
22857
|
+
class: 'vxe-footer--gutter col--gutter'
|
|
22858
|
+
})] : []));
|
|
22859
|
+
}))])]);
|
|
22884
22860
|
};
|
|
22885
22861
|
|
|
22886
22862
|
return renderVN;
|
|
22887
22863
|
}
|
|
22888
22864
|
}));
|
|
22889
|
-
// CONCATENATED MODULE: ./packages/
|
|
22865
|
+
// CONCATENATED MODULE: ./packages/footer/index.ts
|
|
22890
22866
|
|
|
22891
22867
|
|
|
22892
22868
|
|
|
22893
22869
|
|
|
22894
|
-
var
|
|
22870
|
+
var Footer = Object.assign(footer, {
|
|
22895
22871
|
install: function install(app) {
|
|
22896
|
-
app.component(
|
|
22872
|
+
app.component(footer.name, footer);
|
|
22897
22873
|
}
|
|
22898
22874
|
});
|
|
22899
|
-
dynamicApp.component(
|
|
22900
|
-
/* harmony default export */ var
|
|
22901
|
-
// CONCATENATED MODULE: ./packages/
|
|
22902
|
-
|
|
22903
|
-
|
|
22875
|
+
dynamicApp.component(footer.name, footer);
|
|
22876
|
+
/* harmony default export */ var packages_footer = (Footer);
|
|
22877
|
+
// CONCATENATED MODULE: ./packages/table/src/cell.ts
|
|
22904
22878
|
|
|
22905
22879
|
|
|
22906
22880
|
|
|
@@ -22909,459 +22883,69 @@ dynamicApp.component(header.name, header);
|
|
|
22909
22883
|
|
|
22910
22884
|
|
|
22911
22885
|
|
|
22912
|
-
var footer_renderType = 'footer';
|
|
22913
22886
|
|
|
22914
|
-
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
22915
|
-
for (var mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
22916
|
-
var _mergeFooterList$mInd = mergeFooterList[mIndex],
|
|
22917
|
-
mergeRowIndex = _mergeFooterList$mInd.row,
|
|
22918
|
-
mergeColIndex = _mergeFooterList$mInd.col,
|
|
22919
|
-
mergeRowspan = _mergeFooterList$mInd.rowspan,
|
|
22920
|
-
mergeColspan = _mergeFooterList$mInd.colspan;
|
|
22921
22887
|
|
|
22922
|
-
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
22923
|
-
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
22924
|
-
return {
|
|
22925
|
-
rowspan: mergeRowspan,
|
|
22926
|
-
colspan: mergeColspan
|
|
22927
|
-
};
|
|
22928
|
-
}
|
|
22929
22888
|
|
|
22930
|
-
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
22931
|
-
return {
|
|
22932
|
-
rowspan: 0,
|
|
22933
|
-
colspan: 0
|
|
22934
|
-
};
|
|
22935
|
-
}
|
|
22936
|
-
}
|
|
22937
|
-
}
|
|
22938
|
-
}
|
|
22939
22889
|
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
|
|
22948
|
-
},
|
|
22949
|
-
tableColumn: {
|
|
22950
|
-
type: Array,
|
|
22951
|
-
default: function _default() {
|
|
22952
|
-
return [];
|
|
22953
|
-
}
|
|
22954
|
-
},
|
|
22955
|
-
fixedColumn: {
|
|
22956
|
-
type: Array,
|
|
22957
|
-
default: function _default() {
|
|
22958
|
-
return [];
|
|
22959
|
-
}
|
|
22890
|
+
function renderHelpIcon(params) {
|
|
22891
|
+
var $table = params.$table,
|
|
22892
|
+
column = params.column;
|
|
22893
|
+
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
22894
|
+
return titlePrefix ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
22895
|
+
class: ['vxe-cell-help-icon', titlePrefix.icon || conf.icon.TABLE_HELP],
|
|
22896
|
+
onMouseenter: function onMouseenter(evnt) {
|
|
22897
|
+
$table.triggerHeaderHelpEvent(evnt, params);
|
|
22960
22898
|
},
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
default: null
|
|
22899
|
+
onMouseleave: function onMouseleave(evnt) {
|
|
22900
|
+
$table.handleTargetLeaveEvent(evnt);
|
|
22964
22901
|
}
|
|
22965
|
-
}
|
|
22966
|
-
|
|
22967
|
-
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
22968
|
-
var xID = $xetable.xID,
|
|
22969
|
-
tableProps = $xetable.props,
|
|
22970
|
-
tableReactData = $xetable.reactData,
|
|
22971
|
-
tableInternalData = $xetable.internalData;
|
|
22972
|
-
|
|
22973
|
-
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
22974
|
-
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
22975
|
-
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
22976
|
-
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
22902
|
+
})] : [];
|
|
22903
|
+
}
|
|
22977
22904
|
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
|
|
22905
|
+
function renderTitleContent(params, content) {
|
|
22906
|
+
var $table = params.$table,
|
|
22907
|
+
column = params.column;
|
|
22908
|
+
var props = $table.props,
|
|
22909
|
+
internalData = $table.internalData;
|
|
22981
22910
|
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
var refFooterColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22985
|
-
var refFooterTFoot = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22986
|
-
var refFooterXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
22987
|
-
/**
|
|
22988
|
-
* 滚动处理
|
|
22989
|
-
* 如果存在列固定左侧,同步更新滚动状态
|
|
22990
|
-
* 如果存在列固定右侧,同步更新滚动状态
|
|
22991
|
-
*/
|
|
22911
|
+
var _$table$getComputeMap = $table.getComputeMaps(),
|
|
22912
|
+
computeTooltipOpts = _$table$getComputeMap.computeTooltipOpts;
|
|
22992
22913
|
|
|
22993
|
-
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
var bodyElem = tableBody.$el;
|
|
23003
|
-
var scrollLeft = footerElem.scrollLeft;
|
|
23004
|
-
var isX = scrollLeft !== lastScrollLeft;
|
|
23005
|
-
tableInternalData.lastScrollLeft = scrollLeft;
|
|
23006
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
22914
|
+
var allColumnHeaderOverflow = props.showHeaderOverflow;
|
|
22915
|
+
var type = column.type,
|
|
22916
|
+
showHeaderOverflow = column.showHeaderOverflow;
|
|
22917
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
22918
|
+
var showAllTip = tooltipOpts.showAll;
|
|
22919
|
+
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
22920
|
+
var showTitle = headOverflow === 'title';
|
|
22921
|
+
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
22922
|
+
var ons = {};
|
|
23007
22923
|
|
|
23008
|
-
|
|
23009
|
-
|
|
22924
|
+
if (showTitle || showTooltip || showAllTip) {
|
|
22925
|
+
ons.onMouseenter = function (evnt) {
|
|
22926
|
+
if (internalData._isResize) {
|
|
22927
|
+
return;
|
|
23010
22928
|
}
|
|
23011
22929
|
|
|
23012
|
-
if (
|
|
23013
|
-
|
|
22930
|
+
if (showTitle) {
|
|
22931
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
22932
|
+
} else if (showTooltip || showAllTip) {
|
|
22933
|
+
$table.triggerHeaderTooltipEvent(evnt, params);
|
|
23014
22934
|
}
|
|
22935
|
+
};
|
|
22936
|
+
}
|
|
23015
22937
|
|
|
23016
|
-
|
|
23017
|
-
|
|
22938
|
+
if (showTooltip || showAllTip) {
|
|
22939
|
+
ons.onMouseleave = function (evnt) {
|
|
22940
|
+
if (internalData._isResize) {
|
|
22941
|
+
return;
|
|
23018
22942
|
}
|
|
23019
22943
|
|
|
23020
|
-
if (
|
|
23021
|
-
|
|
22944
|
+
if (showTooltip || showAllTip) {
|
|
22945
|
+
$table.handleTargetLeaveEvent(evnt);
|
|
23022
22946
|
}
|
|
23023
|
-
|
|
23024
|
-
$xetable.dispatchEvent('scroll', {
|
|
23025
|
-
type: footer_renderType,
|
|
23026
|
-
fixed: fixedType,
|
|
23027
|
-
scrollTop: bodyElem.scrollTop,
|
|
23028
|
-
scrollLeft: scrollLeft,
|
|
23029
|
-
isX: isX,
|
|
23030
|
-
isY: false
|
|
23031
|
-
}, evnt);
|
|
23032
22947
|
};
|
|
23033
|
-
|
|
23034
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
23035
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
23036
|
-
var fixedType = props.fixedType;
|
|
23037
|
-
var elemStore = tableInternalData.elemStore;
|
|
23038
|
-
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
23039
|
-
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
23040
|
-
elemStore["".concat(prefix, "table")] = refFooterTable;
|
|
23041
|
-
elemStore["".concat(prefix, "colgroup")] = refFooterColgroup;
|
|
23042
|
-
elemStore["".concat(prefix, "list")] = refFooterTFoot;
|
|
23043
|
-
elemStore["".concat(prefix, "xSpace")] = refFooterXSpace;
|
|
23044
|
-
});
|
|
23045
|
-
});
|
|
23046
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
23047
|
-
var fixedType = props.fixedType;
|
|
23048
|
-
var elemStore = tableInternalData.elemStore;
|
|
23049
|
-
var prefix = "".concat(fixedType || 'main', "-footer-");
|
|
23050
|
-
elemStore["".concat(prefix, "wrapper")] = null;
|
|
23051
|
-
elemStore["".concat(prefix, "table")] = null;
|
|
23052
|
-
elemStore["".concat(prefix, "colgroup")] = null;
|
|
23053
|
-
elemStore["".concat(prefix, "list")] = null;
|
|
23054
|
-
elemStore["".concat(prefix, "xSpace")] = null;
|
|
23055
|
-
});
|
|
23056
|
-
|
|
23057
|
-
var renderVN = function renderVN() {
|
|
23058
|
-
var fixedType = props.fixedType,
|
|
23059
|
-
fixedColumn = props.fixedColumn,
|
|
23060
|
-
tableColumn = props.tableColumn,
|
|
23061
|
-
footerTableData = props.footerTableData;
|
|
23062
|
-
var footerRowClassName = tableProps.footerRowClassName,
|
|
23063
|
-
footerCellClassName = tableProps.footerCellClassName,
|
|
23064
|
-
footerRowStyle = tableProps.footerRowStyle,
|
|
23065
|
-
footerCellStyle = tableProps.footerCellStyle,
|
|
23066
|
-
allFooterAlign = tableProps.footerAlign,
|
|
23067
|
-
footerSpanMethod = tableProps.footerSpanMethod,
|
|
23068
|
-
allAlign = tableProps.align,
|
|
23069
|
-
columnKey = tableProps.columnKey,
|
|
23070
|
-
allColumnFooterOverflow = tableProps.showFooterOverflow;
|
|
23071
|
-
var visibleColumn = tableInternalData.visibleColumn;
|
|
23072
|
-
var scrollYLoad = tableReactData.scrollYLoad,
|
|
23073
|
-
overflowX = tableReactData.overflowX,
|
|
23074
|
-
scrollbarWidth = tableReactData.scrollbarWidth,
|
|
23075
|
-
currentColumn = tableReactData.currentColumn,
|
|
23076
|
-
mergeFooterList = tableReactData.mergeFooterList;
|
|
23077
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
23078
|
-
var columnOpts = computeColumnOpts.value; // 如果是使用优化模式
|
|
23079
|
-
|
|
23080
|
-
if (fixedType) {
|
|
23081
|
-
if (scrollYLoad || allColumnFooterOverflow) {
|
|
23082
|
-
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
23083
|
-
tableColumn = fixedColumn;
|
|
23084
|
-
} else {
|
|
23085
|
-
tableColumn = visibleColumn;
|
|
23086
|
-
}
|
|
23087
|
-
} else {
|
|
23088
|
-
tableColumn = visibleColumn;
|
|
23089
|
-
}
|
|
23090
|
-
}
|
|
23091
|
-
|
|
23092
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23093
|
-
ref: refElem,
|
|
23094
|
-
class: ['vxe-table--footer-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
23095
|
-
xid: xID,
|
|
23096
|
-
onScroll: scrollEvent
|
|
23097
|
-
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23098
|
-
ref: refFooterXSpace,
|
|
23099
|
-
class: 'vxe-body--x-space'
|
|
23100
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
23101
|
-
ref: refFooterTable,
|
|
23102
|
-
class: 'vxe-table--footer',
|
|
23103
|
-
xid: xID,
|
|
23104
|
-
cellspacing: 0,
|
|
23105
|
-
cellpadding: 0,
|
|
23106
|
-
border: 0
|
|
23107
|
-
}, [
|
|
23108
|
-
/**
|
|
23109
|
-
* 列宽
|
|
23110
|
-
*/
|
|
23111
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
23112
|
-
ref: refFooterColgroup
|
|
23113
|
-
}, tableColumn.map(function (column, $columnIndex) {
|
|
23114
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
23115
|
-
name: column.id,
|
|
23116
|
-
key: $columnIndex
|
|
23117
|
-
});
|
|
23118
|
-
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
23119
|
-
name: 'col_gutter'
|
|
23120
|
-
})] : [])),
|
|
23121
|
-
/**
|
|
23122
|
-
* 底部
|
|
23123
|
-
*/
|
|
23124
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tfoot', {
|
|
23125
|
-
ref: refFooterTFoot
|
|
23126
|
-
}, footerTableData.map(function (list, _rowIndex) {
|
|
23127
|
-
var $rowIndex = _rowIndex;
|
|
23128
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
23129
|
-
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowClassName) ? footerRowClassName({
|
|
23130
|
-
$table: $xetable,
|
|
23131
|
-
_rowIndex: _rowIndex,
|
|
23132
|
-
$rowIndex: $rowIndex,
|
|
23133
|
-
fixed: fixedType,
|
|
23134
|
-
type: footer_renderType
|
|
23135
|
-
}) : footerRowClassName : ''],
|
|
23136
|
-
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerRowStyle) ? footerRowStyle({
|
|
23137
|
-
$table: $xetable,
|
|
23138
|
-
_rowIndex: _rowIndex,
|
|
23139
|
-
$rowIndex: $rowIndex,
|
|
23140
|
-
fixed: fixedType,
|
|
23141
|
-
type: footer_renderType
|
|
23142
|
-
}) : footerRowStyle : null
|
|
23143
|
-
}, tableColumn.map(function (column, $columnIndex) {
|
|
23144
|
-
var _ref2;
|
|
23145
|
-
|
|
23146
|
-
var type = column.type,
|
|
23147
|
-
showFooterOverflow = column.showFooterOverflow,
|
|
23148
|
-
footerAlign = column.footerAlign,
|
|
23149
|
-
align = column.align,
|
|
23150
|
-
footerClassName = column.footerClassName;
|
|
23151
|
-
var showAllTip = tooltipOpts.showAll;
|
|
23152
|
-
var isColGroup = column.children && column.children.length;
|
|
23153
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
23154
|
-
var footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
23155
|
-
var footAlign = footerAlign || align || allFooterAlign || allAlign;
|
|
23156
|
-
var showEllipsis = footOverflow === 'ellipsis';
|
|
23157
|
-
var showTitle = footOverflow === 'title';
|
|
23158
|
-
var showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
23159
|
-
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
23160
|
-
var attrs = {
|
|
23161
|
-
colid: column.id
|
|
23162
|
-
};
|
|
23163
|
-
var tfOns = {};
|
|
23164
|
-
var columnIndex = $xetable.getColumnIndex(column);
|
|
23165
|
-
|
|
23166
|
-
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
23167
|
-
|
|
23168
|
-
var itemIndex = _columnIndex;
|
|
23169
|
-
var params = {
|
|
23170
|
-
$table: $xetable,
|
|
23171
|
-
_rowIndex: _rowIndex,
|
|
23172
|
-
$rowIndex: $rowIndex,
|
|
23173
|
-
column: column,
|
|
23174
|
-
columnIndex: columnIndex,
|
|
23175
|
-
$columnIndex: $columnIndex,
|
|
23176
|
-
_columnIndex: _columnIndex,
|
|
23177
|
-
itemIndex: itemIndex,
|
|
23178
|
-
items: list,
|
|
23179
|
-
fixed: fixedType,
|
|
23180
|
-
type: footer_renderType,
|
|
23181
|
-
data: footerTableData
|
|
23182
|
-
}; // 纵向虚拟滚动不支持动态行高
|
|
23183
|
-
|
|
23184
|
-
if (scrollYLoad && !hasEllipsis) {
|
|
23185
|
-
showEllipsis = hasEllipsis = true;
|
|
23186
|
-
}
|
|
23187
|
-
|
|
23188
|
-
if (showTitle || showTooltip || showAllTip) {
|
|
23189
|
-
tfOns.onMouseenter = function (evnt) {
|
|
23190
|
-
if (showTitle) {
|
|
23191
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
23192
|
-
} else if (showTooltip || showAllTip) {
|
|
23193
|
-
$xetable.triggerFooterTooltipEvent(evnt, params);
|
|
23194
|
-
}
|
|
23195
|
-
};
|
|
23196
|
-
}
|
|
23197
|
-
|
|
23198
|
-
if (showTooltip || showAllTip) {
|
|
23199
|
-
tfOns.onMouseleave = function (evnt) {
|
|
23200
|
-
if (showTooltip || showAllTip) {
|
|
23201
|
-
$xetable.handleTargetLeaveEvent(evnt);
|
|
23202
|
-
}
|
|
23203
|
-
};
|
|
23204
|
-
}
|
|
23205
|
-
|
|
23206
|
-
tfOns.onClick = function (evnt) {
|
|
23207
|
-
$xetable.dispatchEvent('footer-cell-click', Object.assign({
|
|
23208
|
-
cell: evnt.currentTarget
|
|
23209
|
-
}, params), evnt);
|
|
23210
|
-
};
|
|
23211
|
-
|
|
23212
|
-
tfOns.onDblclick = function (evnt) {
|
|
23213
|
-
$xetable.dispatchEvent('footer-cell-dblclick', Object.assign({
|
|
23214
|
-
cell: evnt.currentTarget
|
|
23215
|
-
}, params), evnt);
|
|
23216
|
-
}; // 合并行或列
|
|
23217
|
-
|
|
23218
|
-
|
|
23219
|
-
if (mergeFooterList.length) {
|
|
23220
|
-
var spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex);
|
|
23221
|
-
|
|
23222
|
-
if (spanRest) {
|
|
23223
|
-
var rowspan = spanRest.rowspan,
|
|
23224
|
-
colspan = spanRest.colspan;
|
|
23225
|
-
|
|
23226
|
-
if (!rowspan || !colspan) {
|
|
23227
|
-
return null;
|
|
23228
|
-
}
|
|
23229
|
-
|
|
23230
|
-
if (rowspan > 1) {
|
|
23231
|
-
attrs.rowspan = rowspan;
|
|
23232
|
-
}
|
|
23233
|
-
|
|
23234
|
-
if (colspan > 1) {
|
|
23235
|
-
attrs.colspan = colspan;
|
|
23236
|
-
}
|
|
23237
|
-
}
|
|
23238
|
-
} else if (footerSpanMethod) {
|
|
23239
|
-
// 自定义合并方法
|
|
23240
|
-
var _ref = footerSpanMethod(params) || {},
|
|
23241
|
-
_ref$rowspan = _ref.rowspan,
|
|
23242
|
-
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
23243
|
-
_ref$colspan = _ref.colspan,
|
|
23244
|
-
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
23245
|
-
|
|
23246
|
-
if (!_rowspan || !_colspan) {
|
|
23247
|
-
return null;
|
|
23248
|
-
}
|
|
23249
|
-
|
|
23250
|
-
if (_rowspan > 1) {
|
|
23251
|
-
attrs.rowspan = _rowspan;
|
|
23252
|
-
}
|
|
23253
|
-
|
|
23254
|
-
if (_colspan > 1) {
|
|
23255
|
-
attrs.colspan = _colspan;
|
|
23256
|
-
}
|
|
23257
|
-
}
|
|
23258
|
-
|
|
23259
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2(_objectSpread2({
|
|
23260
|
-
class: ['vxe-footer--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(footAlign), footAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === tableColumn.length - 1), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(footerClassName, params), getPropClass(footerCellClassName, params)]
|
|
23261
|
-
}, attrs), {}, {
|
|
23262
|
-
style: footerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(footerCellStyle) ? footerCellStyle(params) : footerCellStyle : null
|
|
23263
|
-
}, tfOns), {}, {
|
|
23264
|
-
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
23265
|
-
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
23266
|
-
class: ['vxe-cell', {
|
|
23267
|
-
'c--title': showTitle,
|
|
23268
|
-
'c--tooltip': showTooltip,
|
|
23269
|
-
'c--ellipsis': showEllipsis
|
|
23270
|
-
}]
|
|
23271
|
-
}, column.renderFooter(params))]);
|
|
23272
|
-
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
23273
|
-
class: 'vxe-footer--gutter col--gutter'
|
|
23274
|
-
})] : []));
|
|
23275
|
-
}))])]);
|
|
23276
|
-
};
|
|
23277
|
-
|
|
23278
|
-
return renderVN;
|
|
23279
|
-
}
|
|
23280
|
-
}));
|
|
23281
|
-
// CONCATENATED MODULE: ./packages/footer/index.ts
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
var Footer = Object.assign(footer, {
|
|
23287
|
-
install: function install(app) {
|
|
23288
|
-
app.component(footer.name, footer);
|
|
23289
|
-
}
|
|
23290
|
-
});
|
|
23291
|
-
dynamicApp.component(footer.name, footer);
|
|
23292
|
-
/* harmony default export */ var packages_footer = (Footer);
|
|
23293
|
-
// CONCATENATED MODULE: ./packages/table/src/cell.ts
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
function renderHelpIcon(params) {
|
|
23307
|
-
var $table = params.$table,
|
|
23308
|
-
column = params.column;
|
|
23309
|
-
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
23310
|
-
return titlePrefix ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('i', {
|
|
23311
|
-
class: ['vxe-cell-help-icon', titlePrefix.icon || conf.icon.TABLE_HELP],
|
|
23312
|
-
onMouseenter: function onMouseenter(evnt) {
|
|
23313
|
-
$table.triggerHeaderHelpEvent(evnt, params);
|
|
23314
|
-
},
|
|
23315
|
-
onMouseleave: function onMouseleave(evnt) {
|
|
23316
|
-
$table.handleTargetLeaveEvent(evnt);
|
|
23317
|
-
}
|
|
23318
|
-
})] : [];
|
|
23319
|
-
}
|
|
23320
|
-
|
|
23321
|
-
function renderTitleContent(params, content) {
|
|
23322
|
-
var $table = params.$table,
|
|
23323
|
-
column = params.column;
|
|
23324
|
-
var props = $table.props,
|
|
23325
|
-
internalData = $table.internalData;
|
|
23326
|
-
|
|
23327
|
-
var _$table$getComputeMap = $table.getComputeMaps(),
|
|
23328
|
-
computeTooltipOpts = _$table$getComputeMap.computeTooltipOpts;
|
|
23329
|
-
|
|
23330
|
-
var allColumnHeaderOverflow = props.showHeaderOverflow;
|
|
23331
|
-
var type = column.type,
|
|
23332
|
-
showHeaderOverflow = column.showHeaderOverflow;
|
|
23333
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
23334
|
-
var showAllTip = tooltipOpts.showAll;
|
|
23335
|
-
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
23336
|
-
var showTitle = headOverflow === 'title';
|
|
23337
|
-
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
23338
|
-
var ons = {};
|
|
23339
|
-
|
|
23340
|
-
if (showTitle || showTooltip || showAllTip) {
|
|
23341
|
-
ons.onMouseenter = function (evnt) {
|
|
23342
|
-
if (internalData._isResize) {
|
|
23343
|
-
return;
|
|
23344
|
-
}
|
|
23345
|
-
|
|
23346
|
-
if (showTitle) {
|
|
23347
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
23348
|
-
} else if (showTooltip || showAllTip) {
|
|
23349
|
-
$table.triggerHeaderTooltipEvent(evnt, params);
|
|
23350
|
-
}
|
|
23351
|
-
};
|
|
23352
|
-
}
|
|
23353
|
-
|
|
23354
|
-
if (showTooltip || showAllTip) {
|
|
23355
|
-
ons.onMouseleave = function (evnt) {
|
|
23356
|
-
if (internalData._isResize) {
|
|
23357
|
-
return;
|
|
23358
|
-
}
|
|
23359
|
-
|
|
23360
|
-
if (showTooltip || showAllTip) {
|
|
23361
|
-
$table.handleTargetLeaveEvent(evnt);
|
|
23362
|
-
}
|
|
23363
|
-
};
|
|
23364
|
-
}
|
|
22948
|
+
}
|
|
23365
22949
|
|
|
23366
22950
|
return [type === 'html' && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(content) ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', _objectSpread2({
|
|
23367
22951
|
class: 'vxe-cell--title',
|
|
@@ -31198,1085 +30782,1441 @@ dynamicApp.component(src_list.name, src_list);
|
|
|
31198
30782
|
*/
|
|
31199
30783
|
|
|
31200
30784
|
|
|
31201
|
-
var togglePanel = function togglePanel() {
|
|
31202
|
-
if (reactData.visiblePanel) {
|
|
31203
|
-
return hidePanel();
|
|
30785
|
+
var togglePanel = function togglePanel() {
|
|
30786
|
+
if (reactData.visiblePanel) {
|
|
30787
|
+
return hidePanel();
|
|
30788
|
+
}
|
|
30789
|
+
|
|
30790
|
+
return showPanel();
|
|
30791
|
+
};
|
|
30792
|
+
|
|
30793
|
+
var handleGlobalMousewheelEvent = function handleGlobalMousewheelEvent(evnt) {
|
|
30794
|
+
var disabled = props.disabled;
|
|
30795
|
+
var visiblePanel = reactData.visiblePanel;
|
|
30796
|
+
var panelElem = refPulldowPnanel.value;
|
|
30797
|
+
|
|
30798
|
+
if (!disabled) {
|
|
30799
|
+
if (visiblePanel) {
|
|
30800
|
+
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
30801
|
+
updatePlacement();
|
|
30802
|
+
} else {
|
|
30803
|
+
hidePanel();
|
|
30804
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
30805
|
+
}
|
|
30806
|
+
}
|
|
30807
|
+
}
|
|
30808
|
+
};
|
|
30809
|
+
|
|
30810
|
+
var handleGlobalMousedownEvent = function handleGlobalMousedownEvent(evnt) {
|
|
30811
|
+
var disabled = props.disabled;
|
|
30812
|
+
var visiblePanel = reactData.visiblePanel;
|
|
30813
|
+
var el = refElem.value;
|
|
30814
|
+
var panelElem = refPulldowPnanel.value;
|
|
30815
|
+
|
|
30816
|
+
if (!disabled) {
|
|
30817
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
30818
|
+
|
|
30819
|
+
if (visiblePanel && !reactData.isActivated) {
|
|
30820
|
+
hidePanel();
|
|
30821
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
30822
|
+
}
|
|
30823
|
+
}
|
|
30824
|
+
};
|
|
30825
|
+
|
|
30826
|
+
var handleGlobalBlurEvent = function handleGlobalBlurEvent(evnt) {
|
|
30827
|
+
if (reactData.visiblePanel) {
|
|
30828
|
+
reactData.isActivated = false;
|
|
30829
|
+
hidePanel();
|
|
30830
|
+
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
30831
|
+
}
|
|
30832
|
+
};
|
|
30833
|
+
|
|
30834
|
+
pulldownMethods = {
|
|
30835
|
+
dispatchEvent: function dispatchEvent(type, params, evnt) {
|
|
30836
|
+
emit(type, Object.assign({
|
|
30837
|
+
$pulldown: $xepulldown,
|
|
30838
|
+
$event: evnt
|
|
30839
|
+
}, params));
|
|
30840
|
+
},
|
|
30841
|
+
isPanelVisible: isPanelVisible,
|
|
30842
|
+
togglePanel: togglePanel,
|
|
30843
|
+
showPanel: showPanel,
|
|
30844
|
+
hidePanel: hidePanel
|
|
30845
|
+
};
|
|
30846
|
+
Object.assign($xepulldown, pulldownMethods);
|
|
30847
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
30848
|
+
return props.modelValue;
|
|
30849
|
+
}, function (value) {
|
|
30850
|
+
if (value) {
|
|
30851
|
+
showPanel();
|
|
30852
|
+
} else {
|
|
30853
|
+
hidePanel();
|
|
30854
|
+
}
|
|
30855
|
+
});
|
|
30856
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
30857
|
+
GlobalEvent.on($xepulldown, 'mousewheel', handleGlobalMousewheelEvent);
|
|
30858
|
+
GlobalEvent.on($xepulldown, 'mousedown', handleGlobalMousedownEvent);
|
|
30859
|
+
GlobalEvent.on($xepulldown, 'blur', handleGlobalBlurEvent);
|
|
30860
|
+
});
|
|
30861
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
30862
|
+
GlobalEvent.off($xepulldown, 'mousewheel');
|
|
30863
|
+
GlobalEvent.off($xepulldown, 'mousedown');
|
|
30864
|
+
GlobalEvent.off($xepulldown, 'blur');
|
|
30865
|
+
});
|
|
30866
|
+
|
|
30867
|
+
var renderVN = function renderVN() {
|
|
30868
|
+
var _ref, _ref2;
|
|
30869
|
+
|
|
30870
|
+
var destroyOnClose = props.destroyOnClose,
|
|
30871
|
+
transfer = props.transfer,
|
|
30872
|
+
disabled = props.disabled;
|
|
30873
|
+
var inited = reactData.inited,
|
|
30874
|
+
isActivated = reactData.isActivated,
|
|
30875
|
+
animatVisible = reactData.animatVisible,
|
|
30876
|
+
visiblePanel = reactData.visiblePanel,
|
|
30877
|
+
panelStyle = reactData.panelStyle,
|
|
30878
|
+
panelPlacement = reactData.panelPlacement;
|
|
30879
|
+
var vSize = computeSize.value;
|
|
30880
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30881
|
+
ref: refElem,
|
|
30882
|
+
class: ['vxe-pulldown', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
|
|
30883
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30884
|
+
ref: refPulldowContent,
|
|
30885
|
+
class: 'vxe-pulldown--content'
|
|
30886
|
+
}, slots.default ? slots.default({
|
|
30887
|
+
$pulldown: $xepulldown
|
|
30888
|
+
}) : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
|
|
30889
|
+
to: 'body',
|
|
30890
|
+
disabled: transfer ? !inited : true
|
|
30891
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30892
|
+
ref: refPulldowPnanel,
|
|
30893
|
+
class: ['vxe-table--ignore-clear vxe-pulldown--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
|
|
30894
|
+
placement: panelPlacement,
|
|
30895
|
+
style: panelStyle
|
|
30896
|
+
}, slots.dropdown ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
30897
|
+
class: 'vxe-pulldown--wrapper'
|
|
30898
|
+
}, !inited || destroyOnClose && !visiblePanel && !animatVisible ? [] : slots.dropdown({
|
|
30899
|
+
$pulldown: $xepulldown
|
|
30900
|
+
}))] : [])])]);
|
|
30901
|
+
};
|
|
30902
|
+
|
|
30903
|
+
$xepulldown.renderVN = renderVN;
|
|
30904
|
+
return $xepulldown;
|
|
30905
|
+
},
|
|
30906
|
+
render: function render() {
|
|
30907
|
+
return this.renderVN();
|
|
30908
|
+
}
|
|
30909
|
+
}));
|
|
30910
|
+
// CONCATENATED MODULE: ./packages/pulldown/index.ts
|
|
30911
|
+
|
|
30912
|
+
|
|
30913
|
+
|
|
30914
|
+
|
|
30915
|
+
var Pulldown = Object.assign(pulldown, {
|
|
30916
|
+
install: function install(app) {
|
|
30917
|
+
app.component(pulldown.name, pulldown);
|
|
30918
|
+
}
|
|
30919
|
+
});
|
|
30920
|
+
dynamicApp.component(pulldown.name, pulldown);
|
|
30921
|
+
/* harmony default export */ var packages_pulldown = (Pulldown);
|
|
30922
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
|
|
30923
|
+
var es_promise_finally = __webpack_require__("a79d");
|
|
30924
|
+
|
|
30925
|
+
// CONCATENATED MODULE: ./packages/table/src/body.ts
|
|
30926
|
+
|
|
30927
|
+
|
|
30928
|
+
|
|
30929
|
+
|
|
30930
|
+
|
|
30931
|
+
|
|
30932
|
+
|
|
30933
|
+
|
|
30934
|
+
|
|
30935
|
+
|
|
30936
|
+
|
|
30937
|
+
|
|
30938
|
+
|
|
30939
|
+
|
|
30940
|
+
|
|
30941
|
+
|
|
30942
|
+
var body_renderType = 'body';
|
|
30943
|
+
var lineOffsetSizes = {
|
|
30944
|
+
mini: 3,
|
|
30945
|
+
small: 2,
|
|
30946
|
+
medium: 1
|
|
30947
|
+
};
|
|
30948
|
+
/* harmony default export */ var src_body = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
30949
|
+
name: 'VxeTableBody',
|
|
30950
|
+
props: {
|
|
30951
|
+
tableData: Array,
|
|
30952
|
+
tableColumn: Array,
|
|
30953
|
+
fixedColumn: Array,
|
|
30954
|
+
fixedType: {
|
|
30955
|
+
type: String,
|
|
30956
|
+
default: null
|
|
30957
|
+
}
|
|
30958
|
+
},
|
|
30959
|
+
setup: function setup(props) {
|
|
30960
|
+
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
30961
|
+
var xesize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xesize', null);
|
|
30962
|
+
var xID = $xetable.xID,
|
|
30963
|
+
tableProps = $xetable.props,
|
|
30964
|
+
tableContext = $xetable.context,
|
|
30965
|
+
tableReactData = $xetable.reactData,
|
|
30966
|
+
tableInternalData = $xetable.internalData;
|
|
30967
|
+
|
|
30968
|
+
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
30969
|
+
refTableHeader = _$xetable$getRefMaps.refTableHeader,
|
|
30970
|
+
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
30971
|
+
refTableFooter = _$xetable$getRefMaps.refTableFooter,
|
|
30972
|
+
refTableLeftBody = _$xetable$getRefMaps.refTableLeftBody,
|
|
30973
|
+
refTableRightBody = _$xetable$getRefMaps.refTableRightBody,
|
|
30974
|
+
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
30975
|
+
|
|
30976
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
30977
|
+
computeEditOpts = _$xetable$getComputeM.computeEditOpts,
|
|
30978
|
+
computeMouseOpts = _$xetable$getComputeM.computeMouseOpts,
|
|
30979
|
+
computeSYOpts = _$xetable$getComputeM.computeSYOpts,
|
|
30980
|
+
computeEmptyOpts = _$xetable$getComputeM.computeEmptyOpts,
|
|
30981
|
+
computeKeyboardOpts = _$xetable$getComputeM.computeKeyboardOpts,
|
|
30982
|
+
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
30983
|
+
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
30984
|
+
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
30985
|
+
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
30986
|
+
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
30987
|
+
computeRowOpts = _$xetable$getComputeM.computeRowOpts,
|
|
30988
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
30989
|
+
|
|
30990
|
+
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30991
|
+
var refBodyTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30992
|
+
var refBodyColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30993
|
+
var refBodyTBody = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30994
|
+
var refBodyXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30995
|
+
var refBodyYSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30996
|
+
var refBodyEmptyBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
30997
|
+
|
|
30998
|
+
var getOffsetSize = function getOffsetSize() {
|
|
30999
|
+
if (xesize) {
|
|
31000
|
+
var vSize = xesize.value;
|
|
31001
|
+
|
|
31002
|
+
if (vSize) {
|
|
31003
|
+
return lineOffsetSizes[vSize] || 0;
|
|
31004
|
+
}
|
|
31005
|
+
}
|
|
31006
|
+
|
|
31007
|
+
return 0;
|
|
31008
|
+
};
|
|
31009
|
+
|
|
31010
|
+
var countTreeExpand = function countTreeExpand(prevRow, params) {
|
|
31011
|
+
var count = 1;
|
|
31012
|
+
|
|
31013
|
+
if (!prevRow) {
|
|
31014
|
+
return count;
|
|
31015
|
+
}
|
|
31016
|
+
|
|
31017
|
+
var treeOpts = computeTreeOpts.value;
|
|
31018
|
+
var rowChildren = prevRow[treeOpts.children];
|
|
31019
|
+
|
|
31020
|
+
if ($xetable.isTreeExpandByRow(prevRow)) {
|
|
31021
|
+
for (var index = 0; index < rowChildren.length; index++) {
|
|
31022
|
+
count += countTreeExpand(rowChildren[index], params);
|
|
31023
|
+
}
|
|
31204
31024
|
}
|
|
31205
31025
|
|
|
31206
|
-
return
|
|
31026
|
+
return count;
|
|
31207
31027
|
};
|
|
31208
31028
|
|
|
31209
|
-
var
|
|
31210
|
-
var
|
|
31211
|
-
var visiblePanel = reactData.visiblePanel;
|
|
31212
|
-
var panelElem = refPulldowPnanel.value;
|
|
31029
|
+
var calcTreeLine = function calcTreeLine(params, items, rIndex) {
|
|
31030
|
+
var expandSize = 1;
|
|
31213
31031
|
|
|
31214
|
-
if (
|
|
31215
|
-
|
|
31216
|
-
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
31217
|
-
updatePlacement();
|
|
31218
|
-
} else {
|
|
31219
|
-
hidePanel();
|
|
31220
|
-
pulldownMethods.dispatchEvent('hide-panel', {}, evnt);
|
|
31221
|
-
}
|
|
31222
|
-
}
|
|
31032
|
+
if (rIndex) {
|
|
31033
|
+
expandSize = countTreeExpand(items[rIndex - 1], params);
|
|
31223
31034
|
}
|
|
31224
|
-
};
|
|
31225
31035
|
|
|
31226
|
-
|
|
31227
|
-
|
|
31228
|
-
var visiblePanel = reactData.visiblePanel;
|
|
31229
|
-
var el = refElem.value;
|
|
31230
|
-
var panelElem = refPulldowPnanel.value;
|
|
31036
|
+
return tableReactData.rowHeight * expandSize - (rIndex ? 1 : 12 - getOffsetSize());
|
|
31037
|
+
}; // 滚动、拖动过程中不需要触发
|
|
31231
31038
|
|
|
31232
|
-
if (!disabled) {
|
|
31233
|
-
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
31234
31039
|
|
|
31235
|
-
|
|
31236
|
-
|
|
31237
|
-
|
|
31238
|
-
|
|
31239
|
-
|
|
31040
|
+
var isOperateMouse = function isOperateMouse() {
|
|
31041
|
+
var delayHover = tableProps.delayHover;
|
|
31042
|
+
var lastScrollTime = tableInternalData.lastScrollTime,
|
|
31043
|
+
_isResize = tableInternalData._isResize;
|
|
31044
|
+
return _isResize || lastScrollTime && Date.now() < lastScrollTime + delayHover;
|
|
31240
31045
|
};
|
|
31241
31046
|
|
|
31242
|
-
var
|
|
31243
|
-
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31047
|
+
var renderLine = function renderLine(params) {
|
|
31048
|
+
var row = params.row,
|
|
31049
|
+
column = params.column;
|
|
31050
|
+
var treeConfig = tableProps.treeConfig;
|
|
31051
|
+
var treeOpts = computeTreeOpts.value;
|
|
31052
|
+
var slots = column.slots,
|
|
31053
|
+
treeNode = column.treeNode;
|
|
31054
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31055
|
+
var rowid = util_getRowid($xetable, row);
|
|
31056
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
31057
|
+
var rLevel = 0;
|
|
31058
|
+
var rIndex = 0;
|
|
31059
|
+
var items = [];
|
|
31060
|
+
|
|
31061
|
+
if (rest) {
|
|
31062
|
+
rLevel = rest.level;
|
|
31063
|
+
rIndex = rest._index;
|
|
31064
|
+
items = rest.items;
|
|
31247
31065
|
}
|
|
31248
|
-
};
|
|
31249
31066
|
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
emit(type, Object.assign({
|
|
31253
|
-
$pulldown: $xepulldown,
|
|
31254
|
-
$event: evnt
|
|
31255
|
-
}, params));
|
|
31256
|
-
},
|
|
31257
|
-
isPanelVisible: isPanelVisible,
|
|
31258
|
-
togglePanel: togglePanel,
|
|
31259
|
-
showPanel: showPanel,
|
|
31260
|
-
hidePanel: hidePanel
|
|
31261
|
-
};
|
|
31262
|
-
Object.assign($xepulldown, pulldownMethods);
|
|
31263
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
31264
|
-
return props.modelValue;
|
|
31265
|
-
}, function (value) {
|
|
31266
|
-
if (value) {
|
|
31267
|
-
showPanel();
|
|
31268
|
-
} else {
|
|
31269
|
-
hidePanel();
|
|
31067
|
+
if (slots && slots.line) {
|
|
31068
|
+
return $xetable.callSlot(slots.line, params);
|
|
31270
31069
|
}
|
|
31271
|
-
});
|
|
31272
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
31273
|
-
GlobalEvent.on($xepulldown, 'mousewheel', handleGlobalMousewheelEvent);
|
|
31274
|
-
GlobalEvent.on($xepulldown, 'mousedown', handleGlobalMousedownEvent);
|
|
31275
|
-
GlobalEvent.on($xepulldown, 'blur', handleGlobalBlurEvent);
|
|
31276
|
-
});
|
|
31277
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
31278
|
-
GlobalEvent.off($xepulldown, 'mousewheel');
|
|
31279
|
-
GlobalEvent.off($xepulldown, 'mousedown');
|
|
31280
|
-
GlobalEvent.off($xepulldown, 'blur');
|
|
31281
|
-
});
|
|
31282
31070
|
|
|
31283
|
-
|
|
31284
|
-
|
|
31071
|
+
if (treeConfig && treeNode && treeOpts.line) {
|
|
31072
|
+
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31073
|
+
class: 'vxe-tree--line-wrapper'
|
|
31074
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31075
|
+
class: 'vxe-tree--line',
|
|
31076
|
+
style: {
|
|
31077
|
+
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
31078
|
+
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize() : 0) + 16, "px")
|
|
31079
|
+
}
|
|
31080
|
+
})])];
|
|
31081
|
+
}
|
|
31285
31082
|
|
|
31286
|
-
|
|
31287
|
-
transfer = props.transfer,
|
|
31288
|
-
disabled = props.disabled;
|
|
31289
|
-
var inited = reactData.inited,
|
|
31290
|
-
isActivated = reactData.isActivated,
|
|
31291
|
-
animatVisible = reactData.animatVisible,
|
|
31292
|
-
visiblePanel = reactData.visiblePanel,
|
|
31293
|
-
panelStyle = reactData.panelStyle,
|
|
31294
|
-
panelPlacement = reactData.panelPlacement;
|
|
31295
|
-
var vSize = computeSize.value;
|
|
31296
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31297
|
-
ref: refElem,
|
|
31298
|
-
class: ['vxe-pulldown', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
|
|
31299
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31300
|
-
ref: refPulldowContent,
|
|
31301
|
-
class: 'vxe-pulldown--content'
|
|
31302
|
-
}, slots.default ? slots.default({
|
|
31303
|
-
$pulldown: $xepulldown
|
|
31304
|
-
}) : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
|
|
31305
|
-
to: 'body',
|
|
31306
|
-
disabled: transfer ? !inited : true
|
|
31307
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31308
|
-
ref: refPulldowPnanel,
|
|
31309
|
-
class: ['vxe-table--ignore-clear vxe-pulldown--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
|
|
31310
|
-
placement: panelPlacement,
|
|
31311
|
-
style: panelStyle
|
|
31312
|
-
}, slots.dropdown ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31313
|
-
class: 'vxe-pulldown--wrapper'
|
|
31314
|
-
}, !inited || destroyOnClose && !visiblePanel && !animatVisible ? [] : slots.dropdown({
|
|
31315
|
-
$pulldown: $xepulldown
|
|
31316
|
-
}))] : [])])]);
|
|
31083
|
+
return [];
|
|
31317
31084
|
};
|
|
31085
|
+
/**
|
|
31086
|
+
* 渲染列
|
|
31087
|
+
*/
|
|
31318
31088
|
|
|
31319
|
-
$xepulldown.renderVN = renderVN;
|
|
31320
|
-
return $xepulldown;
|
|
31321
|
-
},
|
|
31322
|
-
render: function render() {
|
|
31323
|
-
return this.renderVN();
|
|
31324
|
-
}
|
|
31325
|
-
}));
|
|
31326
|
-
// CONCATENATED MODULE: ./packages/pulldown/index.ts
|
|
31327
31089
|
|
|
31090
|
+
var renderColumn = function renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
31091
|
+
var _ref2;
|
|
31092
|
+
|
|
31093
|
+
var columnKey = tableProps.columnKey,
|
|
31094
|
+
height = tableProps.height,
|
|
31095
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31096
|
+
cellClassName = tableProps.cellClassName,
|
|
31097
|
+
cellStyle = tableProps.cellStyle,
|
|
31098
|
+
allAlign = tableProps.align,
|
|
31099
|
+
spanMethod = tableProps.spanMethod,
|
|
31100
|
+
mouseConfig = tableProps.mouseConfig,
|
|
31101
|
+
editConfig = tableProps.editConfig,
|
|
31102
|
+
editRules = tableProps.editRules,
|
|
31103
|
+
tooltipConfig = tableProps.tooltipConfig;
|
|
31104
|
+
var tableData = tableReactData.tableData,
|
|
31105
|
+
overflowX = tableReactData.overflowX,
|
|
31106
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
31107
|
+
currentColumn = tableReactData.currentColumn,
|
|
31108
|
+
mergeList = tableReactData.mergeList,
|
|
31109
|
+
editStore = tableReactData.editStore,
|
|
31110
|
+
validStore = tableReactData.validStore,
|
|
31111
|
+
isAllOverflow = tableReactData.isAllOverflow;
|
|
31112
|
+
var afterFullData = tableInternalData.afterFullData;
|
|
31113
|
+
var validOpts = computeValidOpts.value;
|
|
31114
|
+
var checkboxOpts = computeCheckboxOpts.value;
|
|
31115
|
+
var editOpts = computeEditOpts.value;
|
|
31116
|
+
var tooltipOpts = computeTooltipOpts.value;
|
|
31117
|
+
var rowOpts = computeRowOpts.value;
|
|
31118
|
+
var sYOpts = computeSYOpts.value;
|
|
31119
|
+
var columnOpts = computeColumnOpts.value;
|
|
31120
|
+
var type = column.type,
|
|
31121
|
+
cellRender = column.cellRender,
|
|
31122
|
+
editRender = column.editRender,
|
|
31123
|
+
align = column.align,
|
|
31124
|
+
showOverflow = column.showOverflow,
|
|
31125
|
+
className = column.className,
|
|
31126
|
+
treeNode = column.treeNode;
|
|
31127
|
+
var actived = editStore.actived;
|
|
31128
|
+
var scrollYRHeight = sYOpts.rHeight;
|
|
31129
|
+
var rowHeight = rowOpts.height;
|
|
31130
|
+
var showAllTip = tooltipOpts.showAll;
|
|
31131
|
+
var columnIndex = $xetable.getColumnIndex(column);
|
|
31132
|
+
|
|
31133
|
+
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
31134
|
+
|
|
31135
|
+
var isEdit = isEnableConf(editRender);
|
|
31136
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
31137
|
+
var cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31138
|
+
var showEllipsis = cellOverflow === 'ellipsis';
|
|
31139
|
+
var showTitle = cellOverflow === 'title';
|
|
31140
|
+
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
31141
|
+
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
31142
|
+
var isDirty;
|
|
31143
|
+
var tdOns = {};
|
|
31144
|
+
var cellAlign = align || allAlign;
|
|
31145
|
+
var hasValidError = validStore.row === row && validStore.column === column;
|
|
31146
|
+
var showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
31147
|
+
var attrs = {
|
|
31148
|
+
colid: column.id
|
|
31149
|
+
};
|
|
31150
|
+
var params = {
|
|
31151
|
+
$table: $xetable,
|
|
31152
|
+
seq: seq,
|
|
31153
|
+
rowid: rowid,
|
|
31154
|
+
row: row,
|
|
31155
|
+
rowIndex: rowIndex,
|
|
31156
|
+
$rowIndex: $rowIndex,
|
|
31157
|
+
_rowIndex: _rowIndex,
|
|
31158
|
+
column: column,
|
|
31159
|
+
columnIndex: columnIndex,
|
|
31160
|
+
$columnIndex: $columnIndex,
|
|
31161
|
+
_columnIndex: _columnIndex,
|
|
31162
|
+
fixed: fixedType,
|
|
31163
|
+
type: body_renderType,
|
|
31164
|
+
isHidden: fixedHiddenColumn,
|
|
31165
|
+
level: rowLevel,
|
|
31166
|
+
visibleData: afterFullData,
|
|
31167
|
+
data: tableData,
|
|
31168
|
+
items: items
|
|
31169
|
+
}; // 虚拟滚动不支持动态高度
|
|
31170
|
+
|
|
31171
|
+
if (scrollYLoad && !hasEllipsis) {
|
|
31172
|
+
showEllipsis = hasEllipsis = true;
|
|
31173
|
+
} // hover 进入事件
|
|
31174
|
+
|
|
31175
|
+
|
|
31176
|
+
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
31177
|
+
tdOns.onMouseenter = function (evnt) {
|
|
31178
|
+
if (isOperateMouse()) {
|
|
31179
|
+
return;
|
|
31180
|
+
}
|
|
31181
|
+
|
|
31182
|
+
if (showTitle) {
|
|
31183
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
31184
|
+
} else if (showTooltip || showAllTip) {
|
|
31185
|
+
// 如果配置了显示 tooltip
|
|
31186
|
+
$xetable.triggerBodyTooltipEvent(evnt, params);
|
|
31187
|
+
}
|
|
31188
|
+
|
|
31189
|
+
$xetable.dispatchEvent('cell-mouseenter', Object.assign({
|
|
31190
|
+
cell: evnt.currentTarget
|
|
31191
|
+
}, params), evnt);
|
|
31192
|
+
};
|
|
31193
|
+
} // hover 退出事件
|
|
31328
31194
|
|
|
31329
31195
|
|
|
31196
|
+
if (showTooltip || showAllTip || tooltipConfig) {
|
|
31197
|
+
tdOns.onMouseleave = function (evnt) {
|
|
31198
|
+
if (isOperateMouse()) {
|
|
31199
|
+
return;
|
|
31200
|
+
}
|
|
31330
31201
|
|
|
31331
|
-
|
|
31332
|
-
|
|
31333
|
-
|
|
31334
|
-
}
|
|
31335
|
-
});
|
|
31336
|
-
dynamicApp.component(pulldown.name, pulldown);
|
|
31337
|
-
/* harmony default export */ var packages_pulldown = (Pulldown);
|
|
31338
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
|
|
31339
|
-
var es_promise_finally = __webpack_require__("a79d");
|
|
31202
|
+
if (showTooltip || showAllTip) {
|
|
31203
|
+
$xetable.handleTargetLeaveEvent(evnt);
|
|
31204
|
+
}
|
|
31340
31205
|
|
|
31341
|
-
|
|
31206
|
+
$xetable.dispatchEvent('cell-mouseleave', Object.assign({
|
|
31207
|
+
cell: evnt.currentTarget
|
|
31208
|
+
}, params), evnt);
|
|
31209
|
+
};
|
|
31210
|
+
} // 按下事件处理
|
|
31342
31211
|
|
|
31343
31212
|
|
|
31213
|
+
if (checkboxOpts.range || mouseConfig) {
|
|
31214
|
+
tdOns.onMousedown = function (evnt) {
|
|
31215
|
+
$xetable.triggerCellMousedownEvent(evnt, params);
|
|
31216
|
+
};
|
|
31217
|
+
} // 点击事件处理
|
|
31344
31218
|
|
|
31345
31219
|
|
|
31220
|
+
tdOns.onClick = function (evnt) {
|
|
31221
|
+
$xetable.triggerCellClickEvent(evnt, params);
|
|
31222
|
+
}; // 双击事件处理
|
|
31346
31223
|
|
|
31347
31224
|
|
|
31225
|
+
tdOns.onDblclick = function (evnt) {
|
|
31226
|
+
$xetable.triggerCellDblclickEvent(evnt, params);
|
|
31227
|
+
}; // 合并行或列
|
|
31348
31228
|
|
|
31349
31229
|
|
|
31230
|
+
if (mergeList.length) {
|
|
31231
|
+
var spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex);
|
|
31350
31232
|
|
|
31233
|
+
if (spanRest) {
|
|
31234
|
+
var rowspan = spanRest.rowspan,
|
|
31235
|
+
colspan = spanRest.colspan;
|
|
31351
31236
|
|
|
31237
|
+
if (!rowspan || !colspan) {
|
|
31238
|
+
return null;
|
|
31239
|
+
}
|
|
31352
31240
|
|
|
31241
|
+
if (rowspan > 1) {
|
|
31242
|
+
attrs.rowspan = rowspan;
|
|
31243
|
+
}
|
|
31353
31244
|
|
|
31245
|
+
if (colspan > 1) {
|
|
31246
|
+
attrs.colspan = colspan;
|
|
31247
|
+
}
|
|
31248
|
+
}
|
|
31249
|
+
} else if (spanMethod) {
|
|
31250
|
+
// 自定义合并行或列的方法
|
|
31251
|
+
var _ref = spanMethod(params) || {},
|
|
31252
|
+
_ref$rowspan = _ref.rowspan,
|
|
31253
|
+
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
31254
|
+
_ref$colspan = _ref.colspan,
|
|
31255
|
+
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
31354
31256
|
|
|
31257
|
+
if (!_rowspan || !_colspan) {
|
|
31258
|
+
return null;
|
|
31259
|
+
}
|
|
31355
31260
|
|
|
31261
|
+
if (_rowspan > 1) {
|
|
31262
|
+
attrs.rowspan = _rowspan;
|
|
31263
|
+
}
|
|
31356
31264
|
|
|
31265
|
+
if (_colspan > 1) {
|
|
31266
|
+
attrs.colspan = _colspan;
|
|
31267
|
+
}
|
|
31268
|
+
} // 如果被合并不可隐藏
|
|
31357
31269
|
|
|
31358
|
-
var body_renderType = 'body';
|
|
31359
|
-
var lineOffsetSizes = {
|
|
31360
|
-
mini: 3,
|
|
31361
|
-
small: 2,
|
|
31362
|
-
medium: 1
|
|
31363
|
-
};
|
|
31364
|
-
/* harmony default export */ var src_body = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
31365
|
-
name: 'VxeTableBody',
|
|
31366
|
-
props: {
|
|
31367
|
-
tableData: Array,
|
|
31368
|
-
tableColumn: Array,
|
|
31369
|
-
fixedColumn: Array,
|
|
31370
|
-
fixedType: {
|
|
31371
|
-
type: String,
|
|
31372
|
-
default: null
|
|
31373
|
-
}
|
|
31374
|
-
},
|
|
31375
|
-
setup: function setup(props) {
|
|
31376
|
-
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
31377
|
-
var xesize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('xesize', null);
|
|
31378
|
-
var xID = $xetable.xID,
|
|
31379
|
-
tableProps = $xetable.props,
|
|
31380
|
-
tableContext = $xetable.context,
|
|
31381
|
-
tableReactData = $xetable.reactData,
|
|
31382
|
-
tableInternalData = $xetable.internalData;
|
|
31383
31270
|
|
|
31384
|
-
|
|
31385
|
-
|
|
31386
|
-
|
|
31387
|
-
|
|
31388
|
-
|
|
31389
|
-
refTableRightBody = _$xetable$getRefMaps.refTableRightBody,
|
|
31390
|
-
refValidTooltip = _$xetable$getRefMaps.refValidTooltip;
|
|
31271
|
+
if (fixedHiddenColumn && mergeList) {
|
|
31272
|
+
if (attrs.colspan > 1 || attrs.rowspan > 1) {
|
|
31273
|
+
fixedHiddenColumn = false;
|
|
31274
|
+
}
|
|
31275
|
+
} // 如果编辑列开启显示状态
|
|
31391
31276
|
|
|
31392
|
-
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
31393
|
-
computeEditOpts = _$xetable$getComputeM.computeEditOpts,
|
|
31394
|
-
computeMouseOpts = _$xetable$getComputeM.computeMouseOpts,
|
|
31395
|
-
computeSYOpts = _$xetable$getComputeM.computeSYOpts,
|
|
31396
|
-
computeEmptyOpts = _$xetable$getComputeM.computeEmptyOpts,
|
|
31397
|
-
computeKeyboardOpts = _$xetable$getComputeM.computeKeyboardOpts,
|
|
31398
|
-
computeTooltipOpts = _$xetable$getComputeM.computeTooltipOpts,
|
|
31399
|
-
computeRadioOpts = _$xetable$getComputeM.computeRadioOpts,
|
|
31400
|
-
computeTreeOpts = _$xetable$getComputeM.computeTreeOpts,
|
|
31401
|
-
computeCheckboxOpts = _$xetable$getComputeM.computeCheckboxOpts,
|
|
31402
|
-
computeValidOpts = _$xetable$getComputeM.computeValidOpts,
|
|
31403
|
-
computeRowOpts = _$xetable$getComputeM.computeRowOpts,
|
|
31404
|
-
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
31405
31277
|
|
|
31406
|
-
|
|
31407
|
-
|
|
31408
|
-
|
|
31409
|
-
var refBodyTBody = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31410
|
-
var refBodyXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31411
|
-
var refBodyYSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31412
|
-
var refBodyEmptyBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
31278
|
+
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
31279
|
+
isDirty = $xetable.isUpdateByRow(row, column.property);
|
|
31280
|
+
}
|
|
31413
31281
|
|
|
31414
|
-
|
|
31415
|
-
if (xesize) {
|
|
31416
|
-
var vSize = xesize.value;
|
|
31282
|
+
var tdVNs = [];
|
|
31417
31283
|
|
|
31418
|
-
|
|
31419
|
-
|
|
31284
|
+
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
31285
|
+
tdVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31286
|
+
class: ['vxe-cell', {
|
|
31287
|
+
'c--title': showTitle,
|
|
31288
|
+
'c--tooltip': showTooltip,
|
|
31289
|
+
'c--ellipsis': showEllipsis
|
|
31290
|
+
}],
|
|
31291
|
+
style: {
|
|
31292
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31293
|
+
}
|
|
31294
|
+
}));
|
|
31295
|
+
} else {
|
|
31296
|
+
// 渲染单元格
|
|
31297
|
+
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(params)).concat([Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31298
|
+
class: ['vxe-cell', {
|
|
31299
|
+
'c--title': showTitle,
|
|
31300
|
+
'c--tooltip': showTooltip,
|
|
31301
|
+
'c--ellipsis': showEllipsis
|
|
31302
|
+
}],
|
|
31303
|
+
style: {
|
|
31304
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31305
|
+
},
|
|
31306
|
+
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
31307
|
+
}, column.renderCell(params))]));
|
|
31308
|
+
|
|
31309
|
+
if (showValidTip && hasValidError) {
|
|
31310
|
+
tdVNs.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31311
|
+
class: 'vxe-cell--valid',
|
|
31312
|
+
style: validStore.rule && validStore.rule.maxWidth ? {
|
|
31313
|
+
width: "".concat(validStore.rule.maxWidth, "px")
|
|
31314
|
+
} : null
|
|
31315
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31316
|
+
class: 'vxe-cell--valid-msg'
|
|
31317
|
+
}, validStore.content)]));
|
|
31420
31318
|
}
|
|
31421
31319
|
}
|
|
31422
31320
|
|
|
31423
|
-
return
|
|
31321
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', _objectSpread2(_objectSpread2({
|
|
31322
|
+
class: ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(className, params), getPropClass(cellClassName, params)],
|
|
31323
|
+
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
31324
|
+
}, attrs), {}, {
|
|
31325
|
+
style: Object.assign({
|
|
31326
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31327
|
+
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
31328
|
+
}, tdOns), tdVNs);
|
|
31424
31329
|
};
|
|
31425
31330
|
|
|
31426
|
-
var
|
|
31427
|
-
var
|
|
31331
|
+
var renderRows = function renderRows(fixedType, tableData, tableColumn) {
|
|
31332
|
+
var stripe = tableProps.stripe,
|
|
31333
|
+
rowKey = tableProps.rowKey,
|
|
31334
|
+
highlightHoverRow = tableProps.highlightHoverRow,
|
|
31335
|
+
rowClassName = tableProps.rowClassName,
|
|
31336
|
+
rowStyle = tableProps.rowStyle,
|
|
31337
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31338
|
+
editConfig = tableProps.editConfig,
|
|
31339
|
+
treeConfig = tableProps.treeConfig;
|
|
31340
|
+
var hasFixedColumn = tableReactData.hasFixedColumn,
|
|
31341
|
+
treeExpandeds = tableReactData.treeExpandeds,
|
|
31342
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
31343
|
+
editStore = tableReactData.editStore,
|
|
31344
|
+
rowExpandeds = tableReactData.rowExpandeds,
|
|
31345
|
+
expandColumn = tableReactData.expandColumn,
|
|
31346
|
+
selectRow = tableReactData.selectRow;
|
|
31347
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31348
|
+
var checkboxOpts = computeCheckboxOpts.value;
|
|
31349
|
+
var radioOpts = computeRadioOpts.value;
|
|
31350
|
+
var treeOpts = computeTreeOpts.value;
|
|
31351
|
+
var editOpts = computeEditOpts.value;
|
|
31352
|
+
var rowOpts = computeRowOpts.value;
|
|
31353
|
+
var transform = treeOpts.transform;
|
|
31354
|
+
var rows = [];
|
|
31355
|
+
tableData.forEach(function (row, $rowIndex) {
|
|
31356
|
+
var trOn = {};
|
|
31357
|
+
var rowIndex = $rowIndex; // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
31358
|
+
|
|
31359
|
+
rowIndex = $xetable.getRowIndex(row); // 事件绑定
|
|
31360
|
+
|
|
31361
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31362
|
+
trOn.onMouseenter = function (evnt) {
|
|
31363
|
+
if (isOperateMouse()) {
|
|
31364
|
+
return;
|
|
31365
|
+
}
|
|
31366
|
+
|
|
31367
|
+
$xetable.triggerHoverEvent(evnt, {
|
|
31368
|
+
row: row,
|
|
31369
|
+
rowIndex: rowIndex
|
|
31370
|
+
});
|
|
31371
|
+
};
|
|
31372
|
+
|
|
31373
|
+
trOn.onMouseleave = function () {
|
|
31374
|
+
if (isOperateMouse()) {
|
|
31375
|
+
return;
|
|
31376
|
+
}
|
|
31377
|
+
|
|
31378
|
+
$xetable.clearHoverRow();
|
|
31379
|
+
};
|
|
31380
|
+
}
|
|
31381
|
+
|
|
31382
|
+
var rowid = util_getRowid($xetable, row);
|
|
31383
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
31384
|
+
var rowLevel = 0;
|
|
31385
|
+
var seq = -1;
|
|
31386
|
+
var _rowIndex = 0;
|
|
31387
|
+
|
|
31388
|
+
if (rest) {
|
|
31389
|
+
rowLevel = rest.level;
|
|
31390
|
+
seq = rest.seq;
|
|
31391
|
+
_rowIndex = rest._index;
|
|
31392
|
+
}
|
|
31393
|
+
|
|
31394
|
+
var params = {
|
|
31395
|
+
$table: $xetable,
|
|
31396
|
+
seq: seq,
|
|
31397
|
+
rowid: rowid,
|
|
31398
|
+
fixed: fixedType,
|
|
31399
|
+
type: body_renderType,
|
|
31400
|
+
level: rowLevel,
|
|
31401
|
+
row: row,
|
|
31402
|
+
rowIndex: rowIndex,
|
|
31403
|
+
$rowIndex: $rowIndex,
|
|
31404
|
+
_rowIndex: _rowIndex
|
|
31405
|
+
}; // 行是否被展开
|
|
31406
|
+
|
|
31407
|
+
var isExpandRow = expandColumn && rowExpandeds.length && $xetable.findRowIndexOf(rowExpandeds, row) > -1; // 树节点是否被展开
|
|
31428
31408
|
|
|
31429
|
-
|
|
31430
|
-
|
|
31431
|
-
}
|
|
31409
|
+
var isExpandTree = false;
|
|
31410
|
+
var rowChildren = []; // 处理新增状态
|
|
31432
31411
|
|
|
31433
|
-
|
|
31434
|
-
var rowChildren = prevRow[treeOpts.children];
|
|
31412
|
+
var isNewRow = false;
|
|
31435
31413
|
|
|
31436
|
-
|
|
31437
|
-
|
|
31438
|
-
count += countTreeExpand(rowChildren[index], params);
|
|
31414
|
+
if (editConfig) {
|
|
31415
|
+
isNewRow = $xetable.findRowIndexOf(editStore.insertList, row) > -1;
|
|
31439
31416
|
}
|
|
31440
|
-
}
|
|
31441
|
-
|
|
31442
|
-
return count;
|
|
31443
|
-
};
|
|
31444
|
-
|
|
31445
|
-
var calcTreeLine = function calcTreeLine(params, items, rIndex) {
|
|
31446
|
-
var expandSize = 1;
|
|
31447
31417
|
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
|
|
31418
|
+
if (treeConfig && !scrollYLoad && !transform && treeExpandeds.length) {
|
|
31419
|
+
rowChildren = row[treeOpts.children];
|
|
31420
|
+
isExpandTree = rowChildren && rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1;
|
|
31421
|
+
}
|
|
31451
31422
|
|
|
31452
|
-
|
|
31453
|
-
|
|
31423
|
+
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31424
|
+
class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
31425
|
+
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
31426
|
+
'is--new': isNewRow,
|
|
31427
|
+
'is--expand-row': isExpandRow,
|
|
31428
|
+
'is--expand-tree': isExpandTree,
|
|
31429
|
+
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
31430
|
+
'row--radio': radioOpts.highlight && selectRow === row,
|
|
31431
|
+
'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
|
|
31432
|
+
}, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
|
|
31433
|
+
rowid: rowid,
|
|
31434
|
+
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
31435
|
+
key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex
|
|
31436
|
+
}, trOn), tableColumn.map(function (column, $columnIndex) {
|
|
31437
|
+
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
31438
|
+
}))); // 如果行被展开了
|
|
31454
31439
|
|
|
31440
|
+
if (isExpandRow) {
|
|
31441
|
+
var cellStyle;
|
|
31455
31442
|
|
|
31456
|
-
|
|
31457
|
-
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
|
|
31461
|
-
};
|
|
31443
|
+
if (treeConfig) {
|
|
31444
|
+
cellStyle = {
|
|
31445
|
+
paddingLeft: "".concat(rowLevel * treeOpts.indent + 30, "px")
|
|
31446
|
+
};
|
|
31447
|
+
}
|
|
31462
31448
|
|
|
31463
|
-
|
|
31464
|
-
|
|
31465
|
-
|
|
31466
|
-
|
|
31467
|
-
|
|
31468
|
-
|
|
31469
|
-
|
|
31470
|
-
|
|
31471
|
-
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31449
|
+
var showOverflow = expandColumn.showOverflow;
|
|
31450
|
+
var hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31451
|
+
var expandParams = {
|
|
31452
|
+
$table: $xetable,
|
|
31453
|
+
seq: seq,
|
|
31454
|
+
column: expandColumn,
|
|
31455
|
+
fixed: fixedType,
|
|
31456
|
+
type: body_renderType,
|
|
31457
|
+
level: rowLevel,
|
|
31458
|
+
row: row,
|
|
31459
|
+
rowIndex: rowIndex,
|
|
31460
|
+
$rowIndex: $rowIndex,
|
|
31461
|
+
_rowIndex: _rowIndex
|
|
31462
|
+
};
|
|
31463
|
+
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31464
|
+
class: 'vxe-body--expanded-row',
|
|
31465
|
+
key: "expand_".concat(rowid),
|
|
31466
|
+
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : null
|
|
31467
|
+
}, trOn), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
31468
|
+
class: ['vxe-body--expanded-column', {
|
|
31469
|
+
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
31470
|
+
'col--ellipsis': hasEllipsis
|
|
31471
|
+
}],
|
|
31472
|
+
colspan: tableColumn.length
|
|
31473
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31474
|
+
class: 'vxe-body--expanded-cell',
|
|
31475
|
+
style: cellStyle
|
|
31476
|
+
}, [expandColumn.renderData(expandParams)])])]));
|
|
31477
|
+
} // 如果是树形表格
|
|
31476
31478
|
|
|
31477
|
-
if (rest) {
|
|
31478
|
-
rLevel = rest.level;
|
|
31479
|
-
rIndex = rest._index;
|
|
31480
|
-
items = rest.items;
|
|
31481
|
-
}
|
|
31482
31479
|
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
}
|
|
31480
|
+
if (treeConfig && !scrollYLoad && !transform && treeExpandeds.length) {
|
|
31481
|
+
var _rowChildren = row[treeOpts.children];
|
|
31486
31482
|
|
|
31487
|
-
|
|
31488
|
-
|
|
31489
|
-
class: 'vxe-tree--line-wrapper'
|
|
31490
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31491
|
-
class: 'vxe-tree--line',
|
|
31492
|
-
style: {
|
|
31493
|
-
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
31494
|
-
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize() : 0) + 16, "px")
|
|
31483
|
+
if (_rowChildren && _rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1) {
|
|
31484
|
+
rows.push.apply(rows, _toConsumableArray(renderRows(fixedType, _rowChildren, tableColumn)));
|
|
31495
31485
|
}
|
|
31496
|
-
}
|
|
31497
|
-
}
|
|
31498
|
-
|
|
31499
|
-
return [];
|
|
31486
|
+
}
|
|
31487
|
+
});
|
|
31488
|
+
return rows;
|
|
31500
31489
|
};
|
|
31501
31490
|
/**
|
|
31502
|
-
*
|
|
31491
|
+
* 同步滚动条
|
|
31503
31492
|
*/
|
|
31504
31493
|
|
|
31505
31494
|
|
|
31506
|
-
var
|
|
31507
|
-
var _ref2;
|
|
31508
|
-
|
|
31509
|
-
var columnKey = tableProps.columnKey,
|
|
31510
|
-
height = tableProps.height,
|
|
31511
|
-
allColumnOverflow = tableProps.showOverflow,
|
|
31512
|
-
cellClassName = tableProps.cellClassName,
|
|
31513
|
-
cellStyle = tableProps.cellStyle,
|
|
31514
|
-
allAlign = tableProps.align,
|
|
31515
|
-
spanMethod = tableProps.spanMethod,
|
|
31516
|
-
mouseConfig = tableProps.mouseConfig,
|
|
31517
|
-
editConfig = tableProps.editConfig,
|
|
31518
|
-
editRules = tableProps.editRules,
|
|
31519
|
-
tooltipConfig = tableProps.tooltipConfig;
|
|
31520
|
-
var tableData = tableReactData.tableData,
|
|
31521
|
-
overflowX = tableReactData.overflowX,
|
|
31522
|
-
scrollYLoad = tableReactData.scrollYLoad,
|
|
31523
|
-
currentColumn = tableReactData.currentColumn,
|
|
31524
|
-
mergeList = tableReactData.mergeList,
|
|
31525
|
-
editStore = tableReactData.editStore,
|
|
31526
|
-
validStore = tableReactData.validStore,
|
|
31527
|
-
isAllOverflow = tableReactData.isAllOverflow;
|
|
31528
|
-
var afterFullData = tableInternalData.afterFullData;
|
|
31529
|
-
var validOpts = computeValidOpts.value;
|
|
31530
|
-
var checkboxOpts = computeCheckboxOpts.value;
|
|
31531
|
-
var editOpts = computeEditOpts.value;
|
|
31532
|
-
var tooltipOpts = computeTooltipOpts.value;
|
|
31533
|
-
var rowOpts = computeRowOpts.value;
|
|
31534
|
-
var sYOpts = computeSYOpts.value;
|
|
31535
|
-
var columnOpts = computeColumnOpts.value;
|
|
31536
|
-
var type = column.type,
|
|
31537
|
-
cellRender = column.cellRender,
|
|
31538
|
-
editRender = column.editRender,
|
|
31539
|
-
align = column.align,
|
|
31540
|
-
showOverflow = column.showOverflow,
|
|
31541
|
-
className = column.className,
|
|
31542
|
-
treeNode = column.treeNode;
|
|
31543
|
-
var actived = editStore.actived;
|
|
31544
|
-
var scrollYRHeight = sYOpts.rHeight;
|
|
31545
|
-
var rowHeight = rowOpts.height;
|
|
31546
|
-
var showAllTip = tooltipOpts.showAll;
|
|
31547
|
-
var columnIndex = $xetable.getColumnIndex(column);
|
|
31548
|
-
|
|
31549
|
-
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
31550
|
-
|
|
31551
|
-
var isEdit = isEnableConf(editRender);
|
|
31552
|
-
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
31553
|
-
var cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
31554
|
-
var showEllipsis = cellOverflow === 'ellipsis';
|
|
31555
|
-
var showTitle = cellOverflow === 'title';
|
|
31556
|
-
var showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
31557
|
-
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
31558
|
-
var isDirty;
|
|
31559
|
-
var tdOns = {};
|
|
31560
|
-
var cellAlign = align || allAlign;
|
|
31561
|
-
var hasValidError = validStore.row === row && validStore.column === column;
|
|
31562
|
-
var showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
31563
|
-
var attrs = {
|
|
31564
|
-
colid: column.id
|
|
31565
|
-
};
|
|
31566
|
-
var params = {
|
|
31567
|
-
$table: $xetable,
|
|
31568
|
-
seq: seq,
|
|
31569
|
-
rowid: rowid,
|
|
31570
|
-
row: row,
|
|
31571
|
-
rowIndex: rowIndex,
|
|
31572
|
-
$rowIndex: $rowIndex,
|
|
31573
|
-
_rowIndex: _rowIndex,
|
|
31574
|
-
column: column,
|
|
31575
|
-
columnIndex: columnIndex,
|
|
31576
|
-
$columnIndex: $columnIndex,
|
|
31577
|
-
_columnIndex: _columnIndex,
|
|
31578
|
-
fixed: fixedType,
|
|
31579
|
-
type: body_renderType,
|
|
31580
|
-
isHidden: fixedHiddenColumn,
|
|
31581
|
-
level: rowLevel,
|
|
31582
|
-
visibleData: afterFullData,
|
|
31583
|
-
data: tableData,
|
|
31584
|
-
items: items
|
|
31585
|
-
}; // 虚拟滚动不支持动态高度
|
|
31495
|
+
var scrollProcessTimeout;
|
|
31586
31496
|
|
|
31587
|
-
|
|
31588
|
-
|
|
31589
|
-
|
|
31497
|
+
var syncBodyScroll = function syncBodyScroll(fixedType, scrollTop, elem1, elem2) {
|
|
31498
|
+
if (elem1 || elem2) {
|
|
31499
|
+
if (elem1) {
|
|
31500
|
+
removeScrollListener(elem1);
|
|
31501
|
+
elem1.scrollTop = scrollTop;
|
|
31502
|
+
}
|
|
31590
31503
|
|
|
31504
|
+
if (elem2) {
|
|
31505
|
+
removeScrollListener(elem2);
|
|
31506
|
+
elem2.scrollTop = scrollTop;
|
|
31507
|
+
}
|
|
31591
31508
|
|
|
31592
|
-
|
|
31593
|
-
|
|
31594
|
-
|
|
31595
|
-
|
|
31596
|
-
|
|
31509
|
+
clearTimeout(scrollProcessTimeout);
|
|
31510
|
+
scrollProcessTimeout = setTimeout(function () {
|
|
31511
|
+
// const tableBody = refTableBody.value
|
|
31512
|
+
// const leftBody = refTableLeftBody.value
|
|
31513
|
+
// const rightBody = refTableRightBody.value
|
|
31514
|
+
// const bodyElem = tableBody.$el as XEBodyScrollElement
|
|
31515
|
+
// const leftElem = leftBody ? leftBody.$el as XEBodyScrollElement : null
|
|
31516
|
+
// const rightElem = rightBody ? rightBody.$el as XEBodyScrollElement : null
|
|
31517
|
+
restoreScrollListener(elem1);
|
|
31518
|
+
restoreScrollListener(elem2); // 检查滚动条是的同步
|
|
31519
|
+
// let targetTop = bodyElem.scrollTop
|
|
31520
|
+
// if (fixedType === 'left') {
|
|
31521
|
+
// if (leftElem) {
|
|
31522
|
+
// targetTop = leftElem.scrollTop
|
|
31523
|
+
// }
|
|
31524
|
+
// } else if (fixedType === 'right') {
|
|
31525
|
+
// if (rightElem) {
|
|
31526
|
+
// targetTop = rightElem.scrollTop
|
|
31527
|
+
// }
|
|
31528
|
+
// }
|
|
31529
|
+
// setScrollTop(bodyElem, targetTop)
|
|
31530
|
+
// setScrollTop(leftElem, targetTop)
|
|
31531
|
+
// setScrollTop(rightElem, targetTop)
|
|
31532
|
+
}, 300);
|
|
31533
|
+
}
|
|
31534
|
+
};
|
|
31535
|
+
/**
|
|
31536
|
+
* 滚动处理
|
|
31537
|
+
* 如果存在列固定左侧,同步更新滚动状态
|
|
31538
|
+
* 如果存在列固定右侧,同步更新滚动状态
|
|
31539
|
+
*/
|
|
31597
31540
|
|
|
31598
|
-
if (showTitle) {
|
|
31599
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
31600
|
-
} else if (showTooltip || showAllTip) {
|
|
31601
|
-
// 如果配置了显示 tooltip
|
|
31602
|
-
$xetable.triggerBodyTooltipEvent(evnt, params);
|
|
31603
|
-
}
|
|
31604
31541
|
|
|
31605
|
-
|
|
31606
|
-
|
|
31607
|
-
|
|
31608
|
-
|
|
31609
|
-
|
|
31542
|
+
var scrollEvent = function scrollEvent(evnt) {
|
|
31543
|
+
var fixedType = props.fixedType;
|
|
31544
|
+
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31545
|
+
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31546
|
+
scrollYLoad = tableReactData.scrollYLoad;
|
|
31547
|
+
var elemStore = tableInternalData.elemStore,
|
|
31548
|
+
lastScrollTop = tableInternalData.lastScrollTop,
|
|
31549
|
+
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31550
|
+
var rowOpts = computeRowOpts.value;
|
|
31551
|
+
var tableHeader = refTableHeader.value;
|
|
31552
|
+
var tableBody = refTableBody.value;
|
|
31553
|
+
var tableFooter = refTableFooter.value;
|
|
31554
|
+
var leftBody = refTableLeftBody.value;
|
|
31555
|
+
var rightBody = refTableRightBody.value;
|
|
31556
|
+
var validTip = refValidTooltip.value;
|
|
31557
|
+
var scrollBodyElem = refElem.value;
|
|
31558
|
+
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
31559
|
+
var footerElem = tableFooter ? tableFooter.$el : null;
|
|
31560
|
+
var bodyElem = tableBody.$el;
|
|
31561
|
+
var leftElem = leftBody ? leftBody.$el : null;
|
|
31562
|
+
var rightElem = rightBody ? rightBody.$el : null;
|
|
31563
|
+
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31564
|
+
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31565
|
+
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31566
|
+
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31567
|
+
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31568
|
+
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31569
|
+
var scrollTop = scrollBodyElem.scrollTop;
|
|
31570
|
+
var scrollLeft = bodyElem.scrollLeft;
|
|
31571
|
+
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31572
|
+
var isRollY = scrollTop !== lastScrollTop;
|
|
31573
|
+
tableInternalData.lastScrollTop = scrollTop;
|
|
31574
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31575
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
31610
31576
|
|
|
31577
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31578
|
+
$xetable.clearHoverRow();
|
|
31579
|
+
}
|
|
31611
31580
|
|
|
31612
|
-
if (
|
|
31613
|
-
|
|
31614
|
-
|
|
31615
|
-
|
|
31581
|
+
if (leftElem && fixedType === 'left') {
|
|
31582
|
+
scrollTop = leftElem.scrollTop;
|
|
31583
|
+
syncBodyScroll(fixedType, scrollTop, bodyElem, rightElem);
|
|
31584
|
+
} else if (rightElem && fixedType === 'right') {
|
|
31585
|
+
scrollTop = rightElem.scrollTop;
|
|
31586
|
+
syncBodyScroll(fixedType, scrollTop, bodyElem, leftElem);
|
|
31587
|
+
} else {
|
|
31588
|
+
if (isRollX) {
|
|
31589
|
+
if (headerElem) {
|
|
31590
|
+
headerElem.scrollLeft = bodyElem.scrollLeft;
|
|
31616
31591
|
}
|
|
31617
31592
|
|
|
31618
|
-
if (
|
|
31619
|
-
|
|
31593
|
+
if (footerElem) {
|
|
31594
|
+
footerElem.scrollLeft = bodyElem.scrollLeft;
|
|
31620
31595
|
}
|
|
31596
|
+
}
|
|
31621
31597
|
|
|
31622
|
-
|
|
31623
|
-
|
|
31624
|
-
}, params), evnt);
|
|
31625
|
-
};
|
|
31626
|
-
} // 按下事件处理
|
|
31627
|
-
|
|
31598
|
+
if (leftElem || rightElem) {
|
|
31599
|
+
$xetable.checkScrolling();
|
|
31628
31600
|
|
|
31629
|
-
|
|
31630
|
-
|
|
31631
|
-
|
|
31632
|
-
}
|
|
31633
|
-
}
|
|
31601
|
+
if (isRollY) {
|
|
31602
|
+
syncBodyScroll(fixedType, scrollTop, leftElem, rightElem);
|
|
31603
|
+
}
|
|
31604
|
+
}
|
|
31605
|
+
}
|
|
31634
31606
|
|
|
31607
|
+
if (scrollXLoad && isRollX) {
|
|
31608
|
+
$xetable.triggerScrollXEvent(evnt);
|
|
31609
|
+
}
|
|
31635
31610
|
|
|
31636
|
-
|
|
31637
|
-
$xetable.
|
|
31638
|
-
}
|
|
31611
|
+
if (scrollYLoad && isRollY) {
|
|
31612
|
+
$xetable.triggerScrollYEvent(evnt);
|
|
31613
|
+
}
|
|
31639
31614
|
|
|
31615
|
+
if (isRollX && validTip && validTip.reactData.visible) {
|
|
31616
|
+
validTip.updatePlacement();
|
|
31617
|
+
}
|
|
31640
31618
|
|
|
31641
|
-
|
|
31642
|
-
|
|
31643
|
-
|
|
31619
|
+
$xetable.dispatchEvent('scroll', {
|
|
31620
|
+
type: body_renderType,
|
|
31621
|
+
fixed: fixedType,
|
|
31622
|
+
scrollTop: scrollTop,
|
|
31623
|
+
scrollLeft: scrollLeft,
|
|
31624
|
+
scrollHeight: bodyElem.scrollHeight,
|
|
31625
|
+
scrollWidth: bodyElem.scrollWidth,
|
|
31626
|
+
bodyHeight: bodyHeight,
|
|
31627
|
+
bodyWidth: bodyWidth,
|
|
31628
|
+
isX: isRollX,
|
|
31629
|
+
isY: isRollY
|
|
31630
|
+
}, evnt);
|
|
31631
|
+
};
|
|
31644
31632
|
|
|
31633
|
+
var wheelTime;
|
|
31634
|
+
var wheelYSize = 0;
|
|
31635
|
+
var wheelYInterval = 0;
|
|
31636
|
+
var wheelYTotal = 0;
|
|
31637
|
+
var isPrevWheelTop = false;
|
|
31645
31638
|
|
|
31646
|
-
|
|
31647
|
-
|
|
31639
|
+
var handleWheel = function handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY) {
|
|
31640
|
+
var elemStore = tableInternalData.elemStore;
|
|
31641
|
+
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31642
|
+
scrollYLoad = tableReactData.scrollYLoad;
|
|
31643
|
+
var tableBody = refTableBody.value;
|
|
31644
|
+
var leftBody = refTableLeftBody.value;
|
|
31645
|
+
var rightBody = refTableRightBody.value;
|
|
31646
|
+
var leftElem = leftBody ? leftBody.$el : null;
|
|
31647
|
+
var rightElem = rightBody ? rightBody.$el : null;
|
|
31648
|
+
var bodyElem = tableBody.$el;
|
|
31649
|
+
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31650
|
+
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31651
|
+
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31652
|
+
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31653
|
+
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31654
|
+
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31655
|
+
var remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0;
|
|
31656
|
+
isPrevWheelTop = isTopWheel;
|
|
31657
|
+
wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
|
|
31658
|
+
wheelYInterval = 0;
|
|
31659
|
+
wheelYTotal = 0;
|
|
31660
|
+
clearTimeout(wheelTime);
|
|
31648
31661
|
|
|
31649
|
-
|
|
31650
|
-
|
|
31651
|
-
|
|
31662
|
+
var handleSmooth = function handleSmooth() {
|
|
31663
|
+
if (wheelYTotal < wheelYSize) {
|
|
31664
|
+
var fixedType = props.fixedType;
|
|
31665
|
+
wheelYInterval = Math.max(5, Math.floor(wheelYInterval * 1.5));
|
|
31666
|
+
wheelYTotal = wheelYTotal + wheelYInterval;
|
|
31652
31667
|
|
|
31653
|
-
if (
|
|
31654
|
-
|
|
31668
|
+
if (wheelYTotal > wheelYSize) {
|
|
31669
|
+
wheelYInterval = wheelYInterval - (wheelYTotal - wheelYSize);
|
|
31655
31670
|
}
|
|
31656
31671
|
|
|
31657
|
-
|
|
31658
|
-
|
|
31659
|
-
|
|
31672
|
+
var scrollTop = bodyElem.scrollTop,
|
|
31673
|
+
clientHeight = bodyElem.clientHeight,
|
|
31674
|
+
scrollHeight = bodyElem.scrollHeight;
|
|
31675
|
+
var targerTop = scrollTop + wheelYInterval * (isTopWheel ? -1 : 1);
|
|
31676
|
+
bodyElem.scrollTop = targerTop;
|
|
31660
31677
|
|
|
31661
|
-
if (
|
|
31662
|
-
|
|
31678
|
+
if (leftElem) {
|
|
31679
|
+
leftElem.scrollTop = targerTop;
|
|
31663
31680
|
}
|
|
31664
|
-
}
|
|
31665
|
-
} else if (spanMethod) {
|
|
31666
|
-
// 自定义合并行或列的方法
|
|
31667
|
-
var _ref = spanMethod(params) || {},
|
|
31668
|
-
_ref$rowspan = _ref.rowspan,
|
|
31669
|
-
_rowspan = _ref$rowspan === void 0 ? 1 : _ref$rowspan,
|
|
31670
|
-
_ref$colspan = _ref.colspan,
|
|
31671
|
-
_colspan = _ref$colspan === void 0 ? 1 : _ref$colspan;
|
|
31672
|
-
|
|
31673
|
-
if (!_rowspan || !_colspan) {
|
|
31674
|
-
return null;
|
|
31675
|
-
}
|
|
31676
|
-
|
|
31677
|
-
if (_rowspan > 1) {
|
|
31678
|
-
attrs.rowspan = _rowspan;
|
|
31679
|
-
}
|
|
31680
|
-
|
|
31681
|
-
if (_colspan > 1) {
|
|
31682
|
-
attrs.colspan = _colspan;
|
|
31683
|
-
}
|
|
31684
|
-
} // 如果被合并不可隐藏
|
|
31685
|
-
|
|
31686
|
-
|
|
31687
|
-
if (fixedHiddenColumn && mergeList) {
|
|
31688
|
-
if (attrs.colspan > 1 || attrs.rowspan > 1) {
|
|
31689
|
-
fixedHiddenColumn = false;
|
|
31690
|
-
}
|
|
31691
|
-
} // 如果编辑列开启显示状态
|
|
31692
|
-
|
|
31693
|
-
|
|
31694
|
-
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
31695
|
-
isDirty = $xetable.isUpdateByRow(row, column.property);
|
|
31696
|
-
}
|
|
31697
31681
|
|
|
31698
|
-
|
|
31682
|
+
if (rightElem) {
|
|
31683
|
+
rightElem.scrollTop = targerTop;
|
|
31684
|
+
}
|
|
31699
31685
|
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
class: ['vxe-cell', {
|
|
31703
|
-
'c--title': showTitle,
|
|
31704
|
-
'c--tooltip': showTooltip,
|
|
31705
|
-
'c--ellipsis': showEllipsis
|
|
31706
|
-
}],
|
|
31707
|
-
style: {
|
|
31708
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31686
|
+
if (isTopWheel ? targerTop < scrollHeight - clientHeight : targerTop >= 0) {
|
|
31687
|
+
wheelTime = setTimeout(handleSmooth, 10);
|
|
31709
31688
|
}
|
|
31710
|
-
}));
|
|
31711
|
-
} else {
|
|
31712
|
-
// 渲染单元格
|
|
31713
|
-
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(params)).concat([Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31714
|
-
class: ['vxe-cell', {
|
|
31715
|
-
'c--title': showTitle,
|
|
31716
|
-
'c--tooltip': showTooltip,
|
|
31717
|
-
'c--ellipsis': showEllipsis
|
|
31718
|
-
}],
|
|
31719
|
-
style: {
|
|
31720
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31721
|
-
},
|
|
31722
|
-
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
31723
|
-
}, column.renderCell(params))]));
|
|
31724
31689
|
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
31729
|
-
|
|
31730
|
-
|
|
31731
|
-
|
|
31732
|
-
|
|
31733
|
-
|
|
31690
|
+
$xetable.dispatchEvent('scroll', {
|
|
31691
|
+
type: body_renderType,
|
|
31692
|
+
fixed: fixedType,
|
|
31693
|
+
scrollTop: bodyElem.scrollTop,
|
|
31694
|
+
scrollLeft: bodyElem.scrollLeft,
|
|
31695
|
+
scrollHeight: bodyElem.scrollHeight,
|
|
31696
|
+
scrollWidth: bodyElem.scrollWidth,
|
|
31697
|
+
bodyHeight: bodyHeight,
|
|
31698
|
+
bodyWidth: bodyWidth,
|
|
31699
|
+
isX: isRollX,
|
|
31700
|
+
isY: isRollY
|
|
31701
|
+
}, evnt);
|
|
31734
31702
|
}
|
|
31735
|
-
}
|
|
31703
|
+
};
|
|
31736
31704
|
|
|
31737
|
-
|
|
31738
|
-
class: ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), getPropClass(className, params), getPropClass(cellClassName, params)],
|
|
31739
|
-
key: columnKey || columnOpts.useKey ? column.id : $columnIndex
|
|
31740
|
-
}, attrs), {}, {
|
|
31741
|
-
style: Object.assign({
|
|
31742
|
-
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
31743
|
-
}, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(cellStyle) ? cellStyle(params) : cellStyle : null)
|
|
31744
|
-
}, tdOns), tdVNs);
|
|
31705
|
+
handleSmooth();
|
|
31745
31706
|
};
|
|
31707
|
+
/**
|
|
31708
|
+
* 滚轮处理
|
|
31709
|
+
*/
|
|
31746
31710
|
|
|
31747
|
-
var renderRows = function renderRows(fixedType, tableData, tableColumn) {
|
|
31748
|
-
var stripe = tableProps.stripe,
|
|
31749
|
-
rowKey = tableProps.rowKey,
|
|
31750
|
-
highlightHoverRow = tableProps.highlightHoverRow,
|
|
31751
|
-
rowClassName = tableProps.rowClassName,
|
|
31752
|
-
rowStyle = tableProps.rowStyle,
|
|
31753
|
-
allColumnOverflow = tableProps.showOverflow,
|
|
31754
|
-
editConfig = tableProps.editConfig,
|
|
31755
|
-
treeConfig = tableProps.treeConfig;
|
|
31756
|
-
var hasFixedColumn = tableReactData.hasFixedColumn,
|
|
31757
|
-
treeExpandeds = tableReactData.treeExpandeds,
|
|
31758
|
-
scrollYLoad = tableReactData.scrollYLoad,
|
|
31759
|
-
editStore = tableReactData.editStore,
|
|
31760
|
-
rowExpandeds = tableReactData.rowExpandeds,
|
|
31761
|
-
expandColumn = tableReactData.expandColumn,
|
|
31762
|
-
selectRow = tableReactData.selectRow;
|
|
31763
|
-
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData;
|
|
31764
|
-
var checkboxOpts = computeCheckboxOpts.value;
|
|
31765
|
-
var radioOpts = computeRadioOpts.value;
|
|
31766
|
-
var treeOpts = computeTreeOpts.value;
|
|
31767
|
-
var editOpts = computeEditOpts.value;
|
|
31768
|
-
var rowOpts = computeRowOpts.value;
|
|
31769
|
-
var transform = treeOpts.transform;
|
|
31770
|
-
var rows = [];
|
|
31771
|
-
tableData.forEach(function (row, $rowIndex) {
|
|
31772
|
-
var trOn = {};
|
|
31773
|
-
var rowIndex = $rowIndex; // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
31774
31711
|
|
|
31775
|
-
|
|
31712
|
+
var wheelEvent = function wheelEvent(evnt) {
|
|
31713
|
+
var deltaY = evnt.deltaY,
|
|
31714
|
+
deltaX = evnt.deltaX;
|
|
31715
|
+
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31716
|
+
var scrollYLoad = tableReactData.scrollYLoad;
|
|
31717
|
+
var lastScrollTop = tableInternalData.lastScrollTop,
|
|
31718
|
+
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31719
|
+
var rowOpts = computeRowOpts.value;
|
|
31720
|
+
var tableBody = refTableBody.value;
|
|
31721
|
+
var scrollBodyElem = refElem.value;
|
|
31722
|
+
var bodyElem = tableBody.$el;
|
|
31723
|
+
var deltaTop = deltaY;
|
|
31724
|
+
var deltaLeft = deltaX;
|
|
31725
|
+
var isTopWheel = deltaTop < 0; // 如果滚动位置已经是顶部或底部,则不需要触发
|
|
31776
31726
|
|
|
31777
|
-
|
|
31778
|
-
|
|
31779
|
-
|
|
31780
|
-
return;
|
|
31781
|
-
}
|
|
31727
|
+
if (isTopWheel ? scrollBodyElem.scrollTop <= 0 : scrollBodyElem.scrollTop >= scrollBodyElem.scrollHeight - scrollBodyElem.clientHeight) {
|
|
31728
|
+
return;
|
|
31729
|
+
}
|
|
31782
31730
|
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
};
|
|
31731
|
+
var scrollTop = scrollBodyElem.scrollTop + deltaTop;
|
|
31732
|
+
var scrollLeft = bodyElem.scrollLeft + deltaLeft;
|
|
31733
|
+
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31734
|
+
var isRollY = scrollTop !== lastScrollTop; // 用于鼠标纵向滚轮处理
|
|
31788
31735
|
|
|
31789
|
-
|
|
31790
|
-
|
|
31791
|
-
|
|
31792
|
-
|
|
31736
|
+
if (isRollY) {
|
|
31737
|
+
evnt.preventDefault();
|
|
31738
|
+
tableInternalData.lastScrollTop = scrollTop;
|
|
31739
|
+
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31740
|
+
tableInternalData.lastScrollTime = Date.now();
|
|
31793
31741
|
|
|
31794
|
-
|
|
31795
|
-
|
|
31742
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
31743
|
+
$xetable.clearHoverRow();
|
|
31796
31744
|
}
|
|
31797
31745
|
|
|
31798
|
-
|
|
31799
|
-
var rest = fullAllDataRowIdData[rowid];
|
|
31800
|
-
var rowLevel = 0;
|
|
31801
|
-
var seq = -1;
|
|
31802
|
-
var _rowIndex = 0;
|
|
31746
|
+
handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY);
|
|
31803
31747
|
|
|
31804
|
-
if (
|
|
31805
|
-
|
|
31806
|
-
seq = rest.seq;
|
|
31807
|
-
_rowIndex = rest._index;
|
|
31748
|
+
if (scrollYLoad) {
|
|
31749
|
+
$xetable.triggerScrollYEvent(evnt);
|
|
31808
31750
|
}
|
|
31751
|
+
}
|
|
31752
|
+
};
|
|
31809
31753
|
|
|
31810
|
-
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31820
|
-
|
|
31821
|
-
|
|
31754
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
31755
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
31756
|
+
var fixedType = props.fixedType;
|
|
31757
|
+
var elemStore = tableInternalData.elemStore;
|
|
31758
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
31759
|
+
var el = refElem.value;
|
|
31760
|
+
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
31761
|
+
elemStore["".concat(prefix, "table")] = refBodyTable;
|
|
31762
|
+
elemStore["".concat(prefix, "colgroup")] = refBodyColgroup;
|
|
31763
|
+
elemStore["".concat(prefix, "list")] = refBodyTBody;
|
|
31764
|
+
elemStore["".concat(prefix, "xSpace")] = refBodyXSpace;
|
|
31765
|
+
elemStore["".concat(prefix, "ySpace")] = refBodyYSpace;
|
|
31766
|
+
elemStore["".concat(prefix, "emptyBlock")] = refBodyEmptyBlock;
|
|
31767
|
+
el.onscroll = scrollEvent;
|
|
31768
|
+
el._onscroll = scrollEvent;
|
|
31769
|
+
});
|
|
31770
|
+
});
|
|
31771
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
31772
|
+
var el = refElem.value;
|
|
31773
|
+
clearTimeout(wheelTime);
|
|
31774
|
+
el._onscroll = null;
|
|
31775
|
+
el.onscroll = null;
|
|
31776
|
+
});
|
|
31777
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
31778
|
+
var fixedType = props.fixedType;
|
|
31779
|
+
var elemStore = tableInternalData.elemStore;
|
|
31780
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
31781
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
31782
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
31783
|
+
elemStore["".concat(prefix, "colgroup")] = null;
|
|
31784
|
+
elemStore["".concat(prefix, "list")] = null;
|
|
31785
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
31786
|
+
elemStore["".concat(prefix, "ySpace")] = null;
|
|
31787
|
+
elemStore["".concat(prefix, "emptyBlock")] = null;
|
|
31788
|
+
});
|
|
31822
31789
|
|
|
31823
|
-
|
|
31790
|
+
var renderVN = function renderVN() {
|
|
31791
|
+
var fixedColumn = props.fixedColumn,
|
|
31792
|
+
fixedType = props.fixedType,
|
|
31793
|
+
tableColumn = props.tableColumn;
|
|
31794
|
+
var keyboardConfig = tableProps.keyboardConfig,
|
|
31795
|
+
allColumnOverflow = tableProps.showOverflow,
|
|
31796
|
+
spanMethod = tableProps.spanMethod,
|
|
31797
|
+
mouseConfig = tableProps.mouseConfig;
|
|
31798
|
+
var tableData = tableReactData.tableData,
|
|
31799
|
+
mergeList = tableReactData.mergeList,
|
|
31800
|
+
scrollYLoad = tableReactData.scrollYLoad,
|
|
31801
|
+
isAllOverflow = tableReactData.isAllOverflow;
|
|
31802
|
+
var visibleColumn = tableInternalData.visibleColumn;
|
|
31803
|
+
var slots = tableContext.slots;
|
|
31804
|
+
var sYOpts = computeSYOpts.value;
|
|
31805
|
+
var emptyOpts = computeEmptyOpts.value;
|
|
31806
|
+
var keyboardOpts = computeKeyboardOpts.value;
|
|
31807
|
+
var mouseOpts = computeMouseOpts.value; // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
|
|
31808
|
+
// const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
|
|
31809
|
+
// 如果是使用优化模式
|
|
31824
31810
|
|
|
31825
|
-
|
|
31826
|
-
|
|
31811
|
+
if (fixedType) {
|
|
31812
|
+
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
31813
|
+
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
31814
|
+
tableColumn = fixedColumn;
|
|
31815
|
+
} else {
|
|
31816
|
+
tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
|
|
31817
|
+
// if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
|
|
31818
|
+
// tableColumn = fixedColumn
|
|
31819
|
+
// } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
|
|
31820
|
+
// tableColumn = fixedColumn
|
|
31821
|
+
// } else {
|
|
31822
|
+
// tableColumn = visibleColumn
|
|
31823
|
+
// }
|
|
31824
|
+
}
|
|
31825
|
+
} else {
|
|
31826
|
+
tableColumn = visibleColumn;
|
|
31827
|
+
}
|
|
31828
|
+
}
|
|
31827
31829
|
|
|
31828
|
-
|
|
31830
|
+
var emptyContent;
|
|
31829
31831
|
|
|
31830
|
-
|
|
31831
|
-
|
|
31832
|
+
if (slots.empty) {
|
|
31833
|
+
emptyContent = $xetable.callSlot(slots.empty, {
|
|
31834
|
+
$table: $xetable
|
|
31835
|
+
});
|
|
31836
|
+
} else {
|
|
31837
|
+
var compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null;
|
|
31838
|
+
var renderEmpty = compConf ? compConf.renderEmpty : null;
|
|
31839
|
+
|
|
31840
|
+
if (renderEmpty) {
|
|
31841
|
+
emptyContent = renderEmpty(emptyOpts, {
|
|
31842
|
+
$table: $xetable
|
|
31843
|
+
});
|
|
31844
|
+
} else {
|
|
31845
|
+
emptyContent = tableProps.emptyText || conf.i18n('vxe.table.emptyText');
|
|
31846
|
+
}
|
|
31847
|
+
}
|
|
31848
|
+
|
|
31849
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', _objectSpread2({
|
|
31850
|
+
ref: refElem,
|
|
31851
|
+
class: ['vxe-table--body-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
31852
|
+
xid: xID
|
|
31853
|
+
}, sYOpts.mode === 'wheel' ? {
|
|
31854
|
+
onWheel: wheelEvent
|
|
31855
|
+
} : {}), [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31856
|
+
ref: refBodyXSpace,
|
|
31857
|
+
class: 'vxe-body--x-space'
|
|
31858
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31859
|
+
ref: refBodyYSpace,
|
|
31860
|
+
class: 'vxe-body--y-space'
|
|
31861
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
31862
|
+
ref: refBodyTable,
|
|
31863
|
+
class: 'vxe-table--body',
|
|
31864
|
+
xid: xID,
|
|
31865
|
+
cellspacing: 0,
|
|
31866
|
+
cellpadding: 0,
|
|
31867
|
+
border: 0
|
|
31868
|
+
}, [
|
|
31869
|
+
/**
|
|
31870
|
+
* 列宽
|
|
31871
|
+
*/
|
|
31872
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
31873
|
+
ref: refBodyColgroup
|
|
31874
|
+
}, tableColumn.map(function (column, $columnIndex) {
|
|
31875
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
31876
|
+
name: column.id,
|
|
31877
|
+
key: $columnIndex
|
|
31878
|
+
});
|
|
31879
|
+
})),
|
|
31880
|
+
/**
|
|
31881
|
+
* 内容
|
|
31882
|
+
*/
|
|
31883
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tbody', {
|
|
31884
|
+
ref: refBodyTBody
|
|
31885
|
+
}, renderRows(fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31886
|
+
class: 'vxe-table--checkbox-range'
|
|
31887
|
+
}), mouseConfig && mouseOpts.area ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31888
|
+
class: 'vxe-table--cell-area'
|
|
31889
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31890
|
+
class: 'vxe-table--cell-main-area'
|
|
31891
|
+
}, mouseOpts.extension ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31892
|
+
class: 'vxe-table--cell-main-area-btn',
|
|
31893
|
+
onMousedown: function onMousedown(evnt) {
|
|
31894
|
+
$xetable.triggerCellExtendMousedownEvent(evnt, {
|
|
31895
|
+
$table: $xetable,
|
|
31896
|
+
fixed: fixedType,
|
|
31897
|
+
type: body_renderType
|
|
31898
|
+
});
|
|
31832
31899
|
}
|
|
31900
|
+
})] : []), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31901
|
+
class: 'vxe-table--cell-copy-area'
|
|
31902
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31903
|
+
class: 'vxe-table--cell-extend-area'
|
|
31904
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31905
|
+
class: 'vxe-table--cell-multi-area'
|
|
31906
|
+
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
31907
|
+
class: 'vxe-table--cell-active-area'
|
|
31908
|
+
})]) : null, !fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31909
|
+
class: 'vxe-table--empty-block',
|
|
31910
|
+
ref: refBodyEmptyBlock
|
|
31911
|
+
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31912
|
+
class: 'vxe-table--empty-content'
|
|
31913
|
+
}, emptyContent)]) : null]);
|
|
31914
|
+
};
|
|
31833
31915
|
|
|
31834
|
-
|
|
31835
|
-
|
|
31836
|
-
|
|
31837
|
-
|
|
31916
|
+
return renderVN;
|
|
31917
|
+
}
|
|
31918
|
+
}));
|
|
31919
|
+
// CONCATENATED MODULE: ./packages/header/src/util.ts
|
|
31838
31920
|
|
|
31839
|
-
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31840
|
-
class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
|
|
31841
|
-
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
31842
|
-
'is--new': isNewRow,
|
|
31843
|
-
'is--expand-row': isExpandRow,
|
|
31844
|
-
'is--expand-tree': isExpandTree,
|
|
31845
|
-
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
31846
|
-
'row--radio': radioOpts.highlight && selectRow === row,
|
|
31847
|
-
'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
|
|
31848
|
-
}, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''],
|
|
31849
|
-
rowid: rowid,
|
|
31850
|
-
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
31851
|
-
key: rowKey || rowOpts.useKey || treeConfig ? rowid : $rowIndex
|
|
31852
|
-
}, trOn), tableColumn.map(function (column, $columnIndex) {
|
|
31853
|
-
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
31854
|
-
}))); // 如果行被展开了
|
|
31855
31921
|
|
|
31856
|
-
if (isExpandRow) {
|
|
31857
|
-
var cellStyle;
|
|
31858
31922
|
|
|
31859
|
-
|
|
31860
|
-
|
|
31861
|
-
|
|
31862
|
-
|
|
31863
|
-
}
|
|
31923
|
+
var util_getAllColumns = function getAllColumns(columns, parentColumn) {
|
|
31924
|
+
var result = [];
|
|
31925
|
+
columns.forEach(function (column) {
|
|
31926
|
+
column.parentId = parentColumn ? parentColumn.id : null;
|
|
31864
31927
|
|
|
31865
|
-
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
|
|
31873
|
-
|
|
31874
|
-
|
|
31875
|
-
|
|
31876
|
-
|
|
31877
|
-
|
|
31878
|
-
};
|
|
31879
|
-
rows.push(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', _objectSpread2({
|
|
31880
|
-
class: 'vxe-body--expanded-row',
|
|
31881
|
-
key: "expand_".concat(rowid),
|
|
31882
|
-
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : null
|
|
31883
|
-
}, trOn), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('td', {
|
|
31884
|
-
class: ['vxe-body--expanded-column', {
|
|
31885
|
-
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
31886
|
-
'col--ellipsis': hasEllipsis
|
|
31887
|
-
}],
|
|
31888
|
-
colspan: tableColumn.length
|
|
31889
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
31890
|
-
class: 'vxe-body--expanded-cell',
|
|
31891
|
-
style: cellStyle
|
|
31892
|
-
}, [expandColumn.renderData(expandParams)])])]));
|
|
31893
|
-
} // 如果是树形表格
|
|
31928
|
+
if (column.visible) {
|
|
31929
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
31930
|
+
return column.visible;
|
|
31931
|
+
})) {
|
|
31932
|
+
result.push(column);
|
|
31933
|
+
result.push.apply(result, _toConsumableArray(getAllColumns(column.children, column)));
|
|
31934
|
+
} else {
|
|
31935
|
+
result.push(column);
|
|
31936
|
+
}
|
|
31937
|
+
}
|
|
31938
|
+
});
|
|
31939
|
+
return result;
|
|
31940
|
+
};
|
|
31894
31941
|
|
|
31942
|
+
var util_convertToRows = function convertToRows(originColumns) {
|
|
31943
|
+
var maxLevel = 1;
|
|
31895
31944
|
|
|
31896
|
-
|
|
31897
|
-
|
|
31945
|
+
var traverse = function traverse(column, parent) {
|
|
31946
|
+
if (parent) {
|
|
31947
|
+
column.level = parent.level + 1;
|
|
31898
31948
|
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
|
|
31949
|
+
if (maxLevel < column.level) {
|
|
31950
|
+
maxLevel = column.level;
|
|
31951
|
+
}
|
|
31952
|
+
}
|
|
31953
|
+
|
|
31954
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
31955
|
+
return column.visible;
|
|
31956
|
+
})) {
|
|
31957
|
+
var colSpan = 0;
|
|
31958
|
+
column.children.forEach(function (subColumn) {
|
|
31959
|
+
if (subColumn.visible) {
|
|
31960
|
+
traverse(subColumn, column);
|
|
31961
|
+
colSpan += subColumn.colSpan;
|
|
31902
31962
|
}
|
|
31903
31963
|
});
|
|
31904
|
-
|
|
31905
|
-
}
|
|
31906
|
-
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
|
|
31964
|
+
column.colSpan = colSpan;
|
|
31965
|
+
} else {
|
|
31966
|
+
column.colSpan = 1;
|
|
31967
|
+
}
|
|
31968
|
+
};
|
|
31910
31969
|
|
|
31911
|
-
|
|
31970
|
+
originColumns.forEach(function (column) {
|
|
31971
|
+
column.level = 1;
|
|
31972
|
+
traverse(column);
|
|
31973
|
+
});
|
|
31974
|
+
var rows = [];
|
|
31912
31975
|
|
|
31913
|
-
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
removeScrollListener(elem1);
|
|
31917
|
-
elem1.scrollTop = scrollTop;
|
|
31918
|
-
}
|
|
31976
|
+
for (var i = 0; i < maxLevel; i++) {
|
|
31977
|
+
rows.push([]);
|
|
31978
|
+
}
|
|
31919
31979
|
|
|
31920
|
-
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31980
|
+
var allColumns = util_getAllColumns(originColumns);
|
|
31981
|
+
allColumns.forEach(function (column) {
|
|
31982
|
+
if (column.children && column.children.length && column.children.some(function (column) {
|
|
31983
|
+
return column.visible;
|
|
31984
|
+
})) {
|
|
31985
|
+
column.rowSpan = 1;
|
|
31986
|
+
} else {
|
|
31987
|
+
column.rowSpan = maxLevel - column.level + 1;
|
|
31988
|
+
}
|
|
31924
31989
|
|
|
31925
|
-
|
|
31926
|
-
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
|
|
31930
|
-
// const bodyElem = tableBody.$el as XEBodyScrollElement
|
|
31931
|
-
// const leftElem = leftBody ? leftBody.$el as XEBodyScrollElement : null
|
|
31932
|
-
// const rightElem = rightBody ? rightBody.$el as XEBodyScrollElement : null
|
|
31933
|
-
restoreScrollListener(elem1);
|
|
31934
|
-
restoreScrollListener(elem2); // 检查滚动条是的同步
|
|
31935
|
-
// let targetTop = bodyElem.scrollTop
|
|
31936
|
-
// if (fixedType === 'left') {
|
|
31937
|
-
// if (leftElem) {
|
|
31938
|
-
// targetTop = leftElem.scrollTop
|
|
31939
|
-
// }
|
|
31940
|
-
// } else if (fixedType === 'right') {
|
|
31941
|
-
// if (rightElem) {
|
|
31942
|
-
// targetTop = rightElem.scrollTop
|
|
31943
|
-
// }
|
|
31944
|
-
// }
|
|
31945
|
-
// setScrollTop(bodyElem, targetTop)
|
|
31946
|
-
// setScrollTop(leftElem, targetTop)
|
|
31947
|
-
// setScrollTop(rightElem, targetTop)
|
|
31948
|
-
}, 300);
|
|
31949
|
-
}
|
|
31950
|
-
};
|
|
31951
|
-
/**
|
|
31952
|
-
* 滚动处理
|
|
31953
|
-
* 如果存在列固定左侧,同步更新滚动状态
|
|
31954
|
-
* 如果存在列固定右侧,同步更新滚动状态
|
|
31955
|
-
*/
|
|
31990
|
+
rows[column.level - 1].push(column);
|
|
31991
|
+
});
|
|
31992
|
+
return rows;
|
|
31993
|
+
};
|
|
31994
|
+
// CONCATENATED MODULE: ./packages/header/src/header.ts
|
|
31956
31995
|
|
|
31957
31996
|
|
|
31958
|
-
var scrollEvent = function scrollEvent(evnt) {
|
|
31959
|
-
var fixedType = props.fixedType;
|
|
31960
|
-
var highlightHoverRow = tableProps.highlightHoverRow;
|
|
31961
|
-
var scrollXLoad = tableReactData.scrollXLoad,
|
|
31962
|
-
scrollYLoad = tableReactData.scrollYLoad;
|
|
31963
|
-
var elemStore = tableInternalData.elemStore,
|
|
31964
|
-
lastScrollTop = tableInternalData.lastScrollTop,
|
|
31965
|
-
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
31966
|
-
var rowOpts = computeRowOpts.value;
|
|
31967
|
-
var tableHeader = refTableHeader.value;
|
|
31968
|
-
var tableBody = refTableBody.value;
|
|
31969
|
-
var tableFooter = refTableFooter.value;
|
|
31970
|
-
var leftBody = refTableLeftBody.value;
|
|
31971
|
-
var rightBody = refTableRightBody.value;
|
|
31972
|
-
var validTip = refValidTooltip.value;
|
|
31973
|
-
var scrollBodyElem = refElem.value;
|
|
31974
|
-
var headerElem = tableHeader ? tableHeader.$el : null;
|
|
31975
|
-
var footerElem = tableFooter ? tableFooter.$el : null;
|
|
31976
|
-
var bodyElem = tableBody.$el;
|
|
31977
|
-
var leftElem = leftBody ? leftBody.$el : null;
|
|
31978
|
-
var rightElem = rightBody ? rightBody.$el : null;
|
|
31979
|
-
var bodyYRef = elemStore['main-body-ySpace'];
|
|
31980
|
-
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
31981
|
-
var bodyXRef = elemStore['main-body-xSpace'];
|
|
31982
|
-
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
31983
|
-
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
31984
|
-
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
31985
|
-
var scrollTop = scrollBodyElem.scrollTop;
|
|
31986
|
-
var scrollLeft = bodyElem.scrollLeft;
|
|
31987
|
-
var isRollX = scrollLeft !== lastScrollLeft;
|
|
31988
|
-
var isRollY = scrollTop !== lastScrollTop;
|
|
31989
|
-
tableInternalData.lastScrollTop = scrollTop;
|
|
31990
|
-
tableInternalData.lastScrollLeft = scrollLeft;
|
|
31991
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
31992
31997
|
|
|
31993
|
-
if (rowOpts.isHover || highlightHoverRow) {
|
|
31994
|
-
$xetable.clearHoverRow();
|
|
31995
|
-
}
|
|
31996
31998
|
|
|
31997
|
-
if (leftElem && fixedType === 'left') {
|
|
31998
|
-
scrollTop = leftElem.scrollTop;
|
|
31999
|
-
syncBodyScroll(fixedType, scrollTop, bodyElem, rightElem);
|
|
32000
|
-
} else if (rightElem && fixedType === 'right') {
|
|
32001
|
-
scrollTop = rightElem.scrollTop;
|
|
32002
|
-
syncBodyScroll(fixedType, scrollTop, bodyElem, leftElem);
|
|
32003
|
-
} else {
|
|
32004
|
-
if (isRollX) {
|
|
32005
|
-
if (headerElem) {
|
|
32006
|
-
headerElem.scrollLeft = bodyElem.scrollLeft;
|
|
32007
|
-
}
|
|
32008
31999
|
|
|
32009
|
-
if (footerElem) {
|
|
32010
|
-
footerElem.scrollLeft = bodyElem.scrollLeft;
|
|
32011
|
-
}
|
|
32012
|
-
}
|
|
32013
32000
|
|
|
32014
|
-
if (leftElem || rightElem) {
|
|
32015
|
-
$xetable.checkScrolling();
|
|
32016
32001
|
|
|
32017
|
-
if (isRollY) {
|
|
32018
|
-
syncBodyScroll(fixedType, scrollTop, leftElem, rightElem);
|
|
32019
|
-
}
|
|
32020
|
-
}
|
|
32021
|
-
}
|
|
32022
32002
|
|
|
32023
|
-
if (scrollXLoad && isRollX) {
|
|
32024
|
-
$xetable.triggerScrollXEvent(evnt);
|
|
32025
|
-
}
|
|
32026
32003
|
|
|
32027
|
-
if (scrollYLoad && isRollY) {
|
|
32028
|
-
$xetable.triggerScrollYEvent(evnt);
|
|
32029
|
-
}
|
|
32030
32004
|
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32005
|
+
var header_renderType = 'header';
|
|
32006
|
+
/* harmony default export */ var header = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
|
|
32007
|
+
name: 'VxeTableHeader',
|
|
32008
|
+
props: {
|
|
32009
|
+
tableData: Array,
|
|
32010
|
+
tableColumn: Array,
|
|
32011
|
+
tableGroupColumn: Array,
|
|
32012
|
+
fixedColumn: Array,
|
|
32013
|
+
fixedType: {
|
|
32014
|
+
type: String,
|
|
32015
|
+
default: null
|
|
32016
|
+
}
|
|
32017
|
+
},
|
|
32018
|
+
setup: function setup(props) {
|
|
32019
|
+
var $xetable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('$xetable', {});
|
|
32020
|
+
var xID = $xetable.xID,
|
|
32021
|
+
tableProps = $xetable.props,
|
|
32022
|
+
tableReactData = $xetable.reactData,
|
|
32023
|
+
tableInternalData = $xetable.internalData;
|
|
32034
32024
|
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
scrollWidth: bodyElem.scrollWidth,
|
|
32042
|
-
bodyHeight: bodyHeight,
|
|
32043
|
-
bodyWidth: bodyWidth,
|
|
32044
|
-
isX: isRollX,
|
|
32045
|
-
isY: isRollY
|
|
32046
|
-
}, evnt);
|
|
32047
|
-
};
|
|
32025
|
+
var _$xetable$getRefMaps = $xetable.getRefMaps(),
|
|
32026
|
+
tableRefElem = _$xetable$getRefMaps.refElem,
|
|
32027
|
+
refTableBody = _$xetable$getRefMaps.refTableBody,
|
|
32028
|
+
refLeftContainer = _$xetable$getRefMaps.refLeftContainer,
|
|
32029
|
+
refRightContainer = _$xetable$getRefMaps.refRightContainer,
|
|
32030
|
+
refCellResizeBar = _$xetable$getRefMaps.refCellResizeBar;
|
|
32048
32031
|
|
|
32049
|
-
var
|
|
32050
|
-
|
|
32051
|
-
var wheelYInterval = 0;
|
|
32052
|
-
var wheelYTotal = 0;
|
|
32053
|
-
var isPrevWheelTop = false;
|
|
32032
|
+
var _$xetable$getComputeM = $xetable.getComputeMaps(),
|
|
32033
|
+
computeColumnOpts = _$xetable$getComputeM.computeColumnOpts;
|
|
32054
32034
|
|
|
32055
|
-
var
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
var leftElem = leftBody ? leftBody.$el : null;
|
|
32063
|
-
var rightElem = rightBody ? rightBody.$el : null;
|
|
32064
|
-
var bodyElem = tableBody.$el;
|
|
32065
|
-
var bodyYRef = elemStore['main-body-ySpace'];
|
|
32066
|
-
var bodyYElem = bodyYRef ? bodyYRef.value : null;
|
|
32067
|
-
var bodyXRef = elemStore['main-body-xSpace'];
|
|
32068
|
-
var bodyXElem = bodyXRef ? bodyXRef.value : null;
|
|
32069
|
-
var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
32070
|
-
var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
32071
|
-
var remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0;
|
|
32072
|
-
isPrevWheelTop = isTopWheel;
|
|
32073
|
-
wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
|
|
32074
|
-
wheelYInterval = 0;
|
|
32075
|
-
wheelYTotal = 0;
|
|
32076
|
-
clearTimeout(wheelTime);
|
|
32035
|
+
var headerColumn = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
32036
|
+
var refElem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32037
|
+
var refHeaderTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32038
|
+
var refHeaderColgroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32039
|
+
var refHeaderTHead = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32040
|
+
var refHeaderXSpace = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32041
|
+
var refHeaderBorderRepair = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
32077
32042
|
|
|
32078
|
-
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32082
|
-
wheelYTotal = wheelYTotal + wheelYInterval;
|
|
32043
|
+
var uploadColumn = function uploadColumn() {
|
|
32044
|
+
var isGroup = tableReactData.isGroup;
|
|
32045
|
+
headerColumn.value = isGroup ? util_convertToRows(props.tableGroupColumn) : [];
|
|
32046
|
+
};
|
|
32083
32047
|
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32048
|
+
var resizeMousedown = function resizeMousedown(evnt, params) {
|
|
32049
|
+
var column = params.column;
|
|
32050
|
+
var fixedType = props.fixedType;
|
|
32051
|
+
var tableBody = refTableBody.value;
|
|
32052
|
+
var leftContainerElem = refLeftContainer.value;
|
|
32053
|
+
var rightContainerElem = refRightContainer.value;
|
|
32054
|
+
var resizeBarElem = refCellResizeBar.value;
|
|
32055
|
+
var dragClientX = evnt.clientX;
|
|
32056
|
+
var wrapperElem = refElem.value;
|
|
32057
|
+
var dragBtnElem = evnt.target;
|
|
32058
|
+
var cell = params.cell = dragBtnElem.parentNode;
|
|
32059
|
+
var dragLeft = 0;
|
|
32060
|
+
var tableBodyElem = tableBody.$el;
|
|
32061
|
+
var pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
32062
|
+
var dragBtnWidth = dragBtnElem.clientWidth;
|
|
32063
|
+
var dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
32064
|
+
var minInterval = getColMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
32087
32065
|
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32066
|
+
var dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
|
|
32067
|
+
var dragPosLeft = pos.left + dragBtnOffsetWidth;
|
|
32068
|
+
var domMousemove = document.onmousemove;
|
|
32069
|
+
var domMouseup = document.onmouseup;
|
|
32070
|
+
var isLeftFixed = fixedType === 'left';
|
|
32071
|
+
var isRightFixed = fixedType === 'right';
|
|
32072
|
+
var tableEl = tableRefElem.value; // 计算左右侧固定列偏移量
|
|
32093
32073
|
|
|
32094
|
-
|
|
32095
|
-
leftElem.scrollTop = targerTop;
|
|
32096
|
-
}
|
|
32074
|
+
var fixedOffsetWidth = 0;
|
|
32097
32075
|
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32076
|
+
if (isLeftFixed || isRightFixed) {
|
|
32077
|
+
var siblingProp = isLeftFixed ? 'nextElementSibling' : 'previousElementSibling';
|
|
32078
|
+
var tempCellElem = cell[siblingProp];
|
|
32101
32079
|
|
|
32102
|
-
|
|
32103
|
-
|
|
32080
|
+
while (tempCellElem) {
|
|
32081
|
+
if (hasClass(tempCellElem, 'fixed--hidden')) {
|
|
32082
|
+
break;
|
|
32083
|
+
} else if (!hasClass(tempCellElem, 'col--group')) {
|
|
32084
|
+
fixedOffsetWidth += tempCellElem.offsetWidth;
|
|
32104
32085
|
}
|
|
32105
32086
|
|
|
32106
|
-
|
|
32107
|
-
type: body_renderType,
|
|
32108
|
-
fixed: fixedType,
|
|
32109
|
-
scrollTop: bodyElem.scrollTop,
|
|
32110
|
-
scrollLeft: bodyElem.scrollLeft,
|
|
32111
|
-
scrollHeight: bodyElem.scrollHeight,
|
|
32112
|
-
scrollWidth: bodyElem.scrollWidth,
|
|
32113
|
-
bodyHeight: bodyHeight,
|
|
32114
|
-
bodyWidth: bodyWidth,
|
|
32115
|
-
isX: isRollX,
|
|
32116
|
-
isY: isRollY
|
|
32117
|
-
}, evnt);
|
|
32087
|
+
tempCellElem = tempCellElem[siblingProp];
|
|
32118
32088
|
}
|
|
32119
|
-
};
|
|
32120
32089
|
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
*/
|
|
32090
|
+
if (isRightFixed && rightContainerElem) {
|
|
32091
|
+
dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth;
|
|
32092
|
+
}
|
|
32093
|
+
} // 处理拖动事件
|
|
32126
32094
|
|
|
32127
32095
|
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
lastScrollLeft = tableInternalData.lastScrollLeft;
|
|
32135
|
-
var rowOpts = computeRowOpts.value;
|
|
32136
|
-
var tableBody = refTableBody.value;
|
|
32137
|
-
var scrollBodyElem = refElem.value;
|
|
32138
|
-
var bodyElem = tableBody.$el;
|
|
32139
|
-
var deltaTop = deltaY;
|
|
32140
|
-
var deltaLeft = deltaX;
|
|
32141
|
-
var isTopWheel = deltaTop < 0; // 如果滚动位置已经是顶部或底部,则不需要触发
|
|
32096
|
+
var updateEvent = function updateEvent(evnt) {
|
|
32097
|
+
evnt.stopPropagation();
|
|
32098
|
+
evnt.preventDefault();
|
|
32099
|
+
var offsetX = evnt.clientX - dragClientX;
|
|
32100
|
+
var left = dragPosLeft + offsetX;
|
|
32101
|
+
var scrollLeft = fixedType ? 0 : tableBodyElem.scrollLeft;
|
|
32142
32102
|
|
|
32143
|
-
|
|
32144
|
-
|
|
32145
|
-
|
|
32103
|
+
if (isLeftFixed) {
|
|
32104
|
+
// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
32105
|
+
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval);
|
|
32106
|
+
} else if (isRightFixed) {
|
|
32107
|
+
// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
32108
|
+
dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval;
|
|
32109
|
+
left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval);
|
|
32110
|
+
} else {
|
|
32111
|
+
dragMinLeft = Math.max(tableBodyElem.scrollLeft, dragMinLeft); // left = Math.min(left, tableBodyElem.clientWidth + tableBodyElem.scrollLeft - 40)
|
|
32112
|
+
}
|
|
32146
32113
|
|
|
32147
|
-
|
|
32148
|
-
|
|
32149
|
-
|
|
32150
|
-
var isRollY = scrollTop !== lastScrollTop; // 用于鼠标纵向滚轮处理
|
|
32114
|
+
dragLeft = Math.max(left, dragMinLeft);
|
|
32115
|
+
resizeBarElem.style.left = "".concat(dragLeft - scrollLeft, "px");
|
|
32116
|
+
};
|
|
32151
32117
|
|
|
32152
|
-
|
|
32153
|
-
|
|
32154
|
-
|
|
32155
|
-
|
|
32156
|
-
tableInternalData.lastScrollTime = Date.now();
|
|
32118
|
+
tableInternalData._isResize = true;
|
|
32119
|
+
addClass(tableEl, 'drag--resize');
|
|
32120
|
+
resizeBarElem.style.display = 'block';
|
|
32121
|
+
document.onmousemove = updateEvent;
|
|
32157
32122
|
|
|
32158
|
-
|
|
32159
|
-
|
|
32160
|
-
|
|
32123
|
+
document.onmouseup = function (evnt) {
|
|
32124
|
+
document.onmousemove = domMousemove;
|
|
32125
|
+
document.onmouseup = domMouseup;
|
|
32126
|
+
column.resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
32127
|
+
resizeBarElem.style.display = 'none';
|
|
32128
|
+
tableInternalData._isResize = false;
|
|
32129
|
+
tableInternalData._lastResizeTime = Date.now();
|
|
32130
|
+
$xetable.analyColumnWidth();
|
|
32131
|
+
$xetable.recalculate(true).then(function () {
|
|
32132
|
+
$xetable.saveCustomResizable();
|
|
32133
|
+
$xetable.updateCellAreas();
|
|
32134
|
+
$xetable.dispatchEvent('resizable-change', params, evnt);
|
|
32135
|
+
});
|
|
32136
|
+
removeClass(tableEl, 'drag--resize');
|
|
32137
|
+
};
|
|
32161
32138
|
|
|
32162
|
-
|
|
32139
|
+
updateEvent(evnt);
|
|
32163
32140
|
|
|
32164
|
-
|
|
32165
|
-
|
|
32166
|
-
}
|
|
32141
|
+
if ($xetable.closeMenu) {
|
|
32142
|
+
$xetable.closeMenu();
|
|
32167
32143
|
}
|
|
32168
32144
|
};
|
|
32169
32145
|
|
|
32146
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
32147
|
+
return props.tableColumn;
|
|
32148
|
+
}, uploadColumn);
|
|
32170
32149
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
32171
32150
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
|
|
32172
32151
|
var fixedType = props.fixedType;
|
|
32173
|
-
var
|
|
32174
|
-
var
|
|
32175
|
-
var
|
|
32152
|
+
var internalData = $xetable.internalData;
|
|
32153
|
+
var elemStore = internalData.elemStore;
|
|
32154
|
+
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
32176
32155
|
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
32177
|
-
elemStore["".concat(prefix, "table")] =
|
|
32178
|
-
elemStore["".concat(prefix, "colgroup")] =
|
|
32179
|
-
elemStore["".concat(prefix, "list")] =
|
|
32180
|
-
elemStore["".concat(prefix, "xSpace")] =
|
|
32181
|
-
elemStore["".concat(prefix, "
|
|
32182
|
-
|
|
32183
|
-
el.onscroll = scrollEvent;
|
|
32184
|
-
el._onscroll = scrollEvent;
|
|
32156
|
+
elemStore["".concat(prefix, "table")] = refHeaderTable;
|
|
32157
|
+
elemStore["".concat(prefix, "colgroup")] = refHeaderColgroup;
|
|
32158
|
+
elemStore["".concat(prefix, "list")] = refHeaderTHead;
|
|
32159
|
+
elemStore["".concat(prefix, "xSpace")] = refHeaderXSpace;
|
|
32160
|
+
elemStore["".concat(prefix, "repair")] = refHeaderBorderRepair;
|
|
32161
|
+
uploadColumn();
|
|
32185
32162
|
});
|
|
32186
32163
|
});
|
|
32187
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
32188
|
-
var el = refElem.value;
|
|
32189
|
-
clearTimeout(wheelTime);
|
|
32190
|
-
el._onscroll = null;
|
|
32191
|
-
el.onscroll = null;
|
|
32192
|
-
});
|
|
32193
32164
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(function () {
|
|
32194
32165
|
var fixedType = props.fixedType;
|
|
32195
|
-
var
|
|
32196
|
-
var
|
|
32166
|
+
var internalData = $xetable.internalData;
|
|
32167
|
+
var elemStore = internalData.elemStore;
|
|
32168
|
+
var prefix = "".concat(fixedType || 'main', "-header-");
|
|
32197
32169
|
elemStore["".concat(prefix, "wrapper")] = null;
|
|
32198
32170
|
elemStore["".concat(prefix, "table")] = null;
|
|
32199
32171
|
elemStore["".concat(prefix, "colgroup")] = null;
|
|
32200
32172
|
elemStore["".concat(prefix, "list")] = null;
|
|
32201
32173
|
elemStore["".concat(prefix, "xSpace")] = null;
|
|
32202
|
-
elemStore["".concat(prefix, "
|
|
32203
|
-
elemStore["".concat(prefix, "emptyBlock")] = null;
|
|
32174
|
+
elemStore["".concat(prefix, "repair")] = null;
|
|
32204
32175
|
});
|
|
32205
32176
|
|
|
32206
32177
|
var renderVN = function renderVN() {
|
|
32207
|
-
var
|
|
32208
|
-
|
|
32178
|
+
var fixedType = props.fixedType,
|
|
32179
|
+
fixedColumn = props.fixedColumn,
|
|
32209
32180
|
tableColumn = props.tableColumn;
|
|
32210
|
-
var
|
|
32211
|
-
|
|
32212
|
-
|
|
32181
|
+
var resizable = tableProps.resizable,
|
|
32182
|
+
border = tableProps.border,
|
|
32183
|
+
columnKey = tableProps.columnKey,
|
|
32184
|
+
headerRowClassName = tableProps.headerRowClassName,
|
|
32185
|
+
headerCellClassName = tableProps.headerCellClassName,
|
|
32186
|
+
headerRowStyle = tableProps.headerRowStyle,
|
|
32187
|
+
headerCellStyle = tableProps.headerCellStyle,
|
|
32188
|
+
allColumnHeaderOverflow = tableProps.showHeaderOverflow,
|
|
32189
|
+
allHeaderAlign = tableProps.headerAlign,
|
|
32190
|
+
allAlign = tableProps.align,
|
|
32213
32191
|
mouseConfig = tableProps.mouseConfig;
|
|
32214
|
-
var
|
|
32215
|
-
|
|
32216
|
-
|
|
32217
|
-
|
|
32218
|
-
|
|
32219
|
-
var
|
|
32220
|
-
var
|
|
32221
|
-
var emptyOpts = computeEmptyOpts.value;
|
|
32222
|
-
var keyboardOpts = computeKeyboardOpts.value;
|
|
32223
|
-
var mouseOpts = computeMouseOpts.value; // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
|
|
32224
|
-
// const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
|
|
32225
|
-
// 如果是使用优化模式
|
|
32192
|
+
var isGroup = tableReactData.isGroup,
|
|
32193
|
+
currentColumn = tableReactData.currentColumn,
|
|
32194
|
+
scrollXLoad = tableReactData.scrollXLoad,
|
|
32195
|
+
overflowX = tableReactData.overflowX,
|
|
32196
|
+
scrollbarWidth = tableReactData.scrollbarWidth;
|
|
32197
|
+
var columnOpts = computeColumnOpts.value;
|
|
32198
|
+
var headerGroups = headerColumn.value; // 如果是使用优化模式
|
|
32226
32199
|
|
|
32227
|
-
if (
|
|
32228
|
-
if (
|
|
32229
|
-
if (
|
|
32200
|
+
if (!isGroup) {
|
|
32201
|
+
if (fixedType) {
|
|
32202
|
+
if (scrollXLoad || allColumnHeaderOverflow) {
|
|
32230
32203
|
tableColumn = fixedColumn;
|
|
32231
|
-
} else {
|
|
32232
|
-
tableColumn = visibleColumn; // 检查固定列是否被合并,合并范围是否超出固定列
|
|
32233
|
-
// if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
|
|
32234
|
-
// tableColumn = fixedColumn
|
|
32235
|
-
// } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
|
|
32236
|
-
// tableColumn = fixedColumn
|
|
32237
|
-
// } else {
|
|
32238
|
-
// tableColumn = visibleColumn
|
|
32239
|
-
// }
|
|
32240
32204
|
}
|
|
32241
|
-
} else {
|
|
32242
|
-
tableColumn = visibleColumn;
|
|
32243
32205
|
}
|
|
32244
|
-
}
|
|
32245
|
-
|
|
32246
|
-
var emptyContent;
|
|
32247
|
-
|
|
32248
|
-
if (slots.empty) {
|
|
32249
|
-
emptyContent = $xetable.callSlot(slots.empty, {
|
|
32250
|
-
$table: $xetable
|
|
32251
|
-
});
|
|
32252
|
-
} else {
|
|
32253
|
-
var compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null;
|
|
32254
|
-
var renderEmpty = compConf ? compConf.renderEmpty : null;
|
|
32255
32206
|
|
|
32256
|
-
|
|
32257
|
-
emptyContent = renderEmpty(emptyOpts, {
|
|
32258
|
-
$table: $xetable
|
|
32259
|
-
});
|
|
32260
|
-
} else {
|
|
32261
|
-
emptyContent = tableProps.emptyText || conf.i18n('vxe.table.emptyText');
|
|
32262
|
-
}
|
|
32207
|
+
headerGroups = [tableColumn];
|
|
32263
32208
|
}
|
|
32264
32209
|
|
|
32265
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div',
|
|
32210
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32266
32211
|
ref: refElem,
|
|
32267
|
-
class: ['vxe-table--
|
|
32212
|
+
class: ['vxe-table--header-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'],
|
|
32268
32213
|
xid: xID
|
|
32269
|
-
},
|
|
32270
|
-
|
|
32271
|
-
} : {}), [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32272
|
-
ref: refBodyXSpace,
|
|
32214
|
+
}, [fixedType ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])() : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32215
|
+
ref: refHeaderXSpace,
|
|
32273
32216
|
class: 'vxe-body--x-space'
|
|
32274
|
-
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32275
|
-
ref: refBodyYSpace,
|
|
32276
|
-
class: 'vxe-body--y-space'
|
|
32277
32217
|
}), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('table', {
|
|
32278
|
-
ref:
|
|
32279
|
-
class: 'vxe-table--
|
|
32218
|
+
ref: refHeaderTable,
|
|
32219
|
+
class: 'vxe-table--header',
|
|
32280
32220
|
xid: xID,
|
|
32281
32221
|
cellspacing: 0,
|
|
32282
32222
|
cellpadding: 0,
|
|
@@ -32286,52 +32226,143 @@ var lineOffsetSizes = {
|
|
|
32286
32226
|
* 列宽
|
|
32287
32227
|
*/
|
|
32288
32228
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('colgroup', {
|
|
32289
|
-
ref:
|
|
32229
|
+
ref: refHeaderColgroup
|
|
32290
32230
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
32291
32231
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
32292
32232
|
name: column.id,
|
|
32293
32233
|
key: $columnIndex
|
|
32294
32234
|
});
|
|
32295
|
-
})),
|
|
32235
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('col', {
|
|
32236
|
+
name: 'col_gutter'
|
|
32237
|
+
})] : [])),
|
|
32296
32238
|
/**
|
|
32297
|
-
*
|
|
32239
|
+
* 头部
|
|
32298
32240
|
*/
|
|
32299
|
-
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('
|
|
32300
|
-
ref:
|
|
32301
|
-
},
|
|
32302
|
-
|
|
32303
|
-
|
|
32304
|
-
class: 'vxe-table--cell-area'
|
|
32305
|
-
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32306
|
-
class: 'vxe-table--cell-main-area'
|
|
32307
|
-
}, mouseOpts.extension ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('span', {
|
|
32308
|
-
class: 'vxe-table--cell-main-area-btn',
|
|
32309
|
-
onMousedown: function onMousedown(evnt) {
|
|
32310
|
-
$xetable.triggerCellExtendMousedownEvent(evnt, {
|
|
32241
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('thead', {
|
|
32242
|
+
ref: refHeaderTHead
|
|
32243
|
+
}, headerGroups.map(function (cols, $rowIndex) {
|
|
32244
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tr', {
|
|
32245
|
+
class: ['vxe-header--row', headerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerRowClassName) ? headerRowClassName({
|
|
32311
32246
|
$table: $xetable,
|
|
32247
|
+
$rowIndex: $rowIndex,
|
|
32312
32248
|
fixed: fixedType,
|
|
32313
|
-
type:
|
|
32249
|
+
type: header_renderType
|
|
32250
|
+
}) : headerRowClassName : ''],
|
|
32251
|
+
style: headerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerRowStyle) ? headerRowStyle({
|
|
32252
|
+
$table: $xetable,
|
|
32253
|
+
$rowIndex: $rowIndex,
|
|
32254
|
+
fixed: fixedType,
|
|
32255
|
+
type: header_renderType
|
|
32256
|
+
}) : headerRowStyle : null
|
|
32257
|
+
}, cols.map(function (column, $columnIndex) {
|
|
32258
|
+
var _ref;
|
|
32259
|
+
|
|
32260
|
+
var type = column.type,
|
|
32261
|
+
showHeaderOverflow = column.showHeaderOverflow,
|
|
32262
|
+
headerAlign = column.headerAlign,
|
|
32263
|
+
align = column.align,
|
|
32264
|
+
headerClassName = column.headerClassName;
|
|
32265
|
+
var isColGroup = column.children && column.children.length;
|
|
32266
|
+
var fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : !!column.fixed && overflowX;
|
|
32267
|
+
var headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
32268
|
+
var headAlign = headerAlign || align || allHeaderAlign || allAlign;
|
|
32269
|
+
var showEllipsis = headOverflow === 'ellipsis';
|
|
32270
|
+
var showTitle = headOverflow === 'title';
|
|
32271
|
+
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
32272
|
+
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
32273
|
+
var hasFilter = column.filters && column.filters.some(function (item) {
|
|
32274
|
+
return item.checked;
|
|
32314
32275
|
});
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32276
|
+
var columnIndex = $xetable.getColumnIndex(column);
|
|
32277
|
+
|
|
32278
|
+
var _columnIndex = $xetable.getVTColumnIndex(column);
|
|
32279
|
+
|
|
32280
|
+
var params = {
|
|
32281
|
+
$table: $xetable,
|
|
32282
|
+
$rowIndex: $rowIndex,
|
|
32283
|
+
column: column,
|
|
32284
|
+
columnIndex: columnIndex,
|
|
32285
|
+
$columnIndex: $columnIndex,
|
|
32286
|
+
_columnIndex: _columnIndex,
|
|
32287
|
+
fixed: fixedType,
|
|
32288
|
+
type: header_renderType,
|
|
32289
|
+
isHidden: fixedHiddenColumn,
|
|
32290
|
+
hasFilter: hasFilter
|
|
32291
|
+
};
|
|
32292
|
+
var thOns = {
|
|
32293
|
+
onClick: function onClick(evnt) {
|
|
32294
|
+
return $xetable.triggerHeaderCellClickEvent(evnt, params);
|
|
32295
|
+
},
|
|
32296
|
+
onDblclick: function onDblclick(evnt) {
|
|
32297
|
+
return $xetable.triggerHeaderCellDblclickEvent(evnt, params);
|
|
32298
|
+
}
|
|
32299
|
+
}; // 横向虚拟滚动不支持动态行高
|
|
32300
|
+
|
|
32301
|
+
if (scrollXLoad && !hasEllipsis) {
|
|
32302
|
+
showEllipsis = hasEllipsis = true;
|
|
32303
|
+
} // 按下事件处理
|
|
32304
|
+
|
|
32305
|
+
|
|
32306
|
+
if (mouseConfig) {
|
|
32307
|
+
thOns.onMousedown = function (evnt) {
|
|
32308
|
+
return $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
32309
|
+
};
|
|
32310
|
+
}
|
|
32311
|
+
|
|
32312
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('th', _objectSpread2(_objectSpread2({
|
|
32313
|
+
class: ['vxe-header--column', column.id, (_ref = {}, _defineProperty(_ref, "col--".concat(headAlign), headAlign), _defineProperty(_ref, "col--".concat(type), type), _defineProperty(_ref, 'col--last', $columnIndex === cols.length - 1), _defineProperty(_ref, 'col--fixed', column.fixed), _defineProperty(_ref, 'col--group', isColGroup), _defineProperty(_ref, 'col--ellipsis', hasEllipsis), _defineProperty(_ref, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref, 'is--sortable', column.sortable), _defineProperty(_ref, 'col--filter', !!column.filters), _defineProperty(_ref, 'is--filter-active', hasFilter), _defineProperty(_ref, 'col--current', currentColumn === column), _ref), headerClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerClassName) ? headerClassName(params) : headerClassName : '', headerCellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerCellClassName) ? headerCellClassName(params) : headerCellClassName : ''],
|
|
32314
|
+
colid: column.id,
|
|
32315
|
+
colspan: column.colSpan > 1 ? column.colSpan : null,
|
|
32316
|
+
rowspan: column.rowSpan > 1 ? column.rowSpan : null,
|
|
32317
|
+
style: headerCellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle : null
|
|
32318
|
+
}, thOns), {}, {
|
|
32319
|
+
key: columnKey || columnOpts.useKey || isColGroup ? column.id : $columnIndex
|
|
32320
|
+
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32321
|
+
class: ['vxe-cell', {
|
|
32322
|
+
'c--title': showTitle,
|
|
32323
|
+
'c--tooltip': showTooltip,
|
|
32324
|
+
'c--ellipsis': showEllipsis
|
|
32325
|
+
}]
|
|
32326
|
+
}, column.renderHeader(params)),
|
|
32327
|
+
/**
|
|
32328
|
+
* 列宽拖动
|
|
32329
|
+
*/
|
|
32330
|
+
!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', {
|
|
32331
|
+
class: ['vxe-resizable', {
|
|
32332
|
+
'is--line': !border || border === 'none'
|
|
32333
|
+
}],
|
|
32334
|
+
onMousedown: function onMousedown(evnt) {
|
|
32335
|
+
return resizeMousedown(evnt, params);
|
|
32336
|
+
}
|
|
32337
|
+
}) : null]);
|
|
32338
|
+
}).concat(scrollbarWidth ? [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('th', {
|
|
32339
|
+
class: 'vxe-header--gutter col--gutter'
|
|
32340
|
+
})] : []));
|
|
32341
|
+
}))]),
|
|
32342
|
+
/**
|
|
32343
|
+
* 其他
|
|
32344
|
+
*/
|
|
32345
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
32346
|
+
ref: refHeaderBorderRepair,
|
|
32347
|
+
class: 'vxe-table--header-border-line'
|
|
32348
|
+
})]);
|
|
32330
32349
|
};
|
|
32331
32350
|
|
|
32332
32351
|
return renderVN;
|
|
32333
32352
|
}
|
|
32334
32353
|
}));
|
|
32354
|
+
// CONCATENATED MODULE: ./packages/header/index.ts
|
|
32355
|
+
|
|
32356
|
+
|
|
32357
|
+
|
|
32358
|
+
|
|
32359
|
+
var Header = Object.assign(header, {
|
|
32360
|
+
install: function install(app) {
|
|
32361
|
+
app.component(header.name, header);
|
|
32362
|
+
}
|
|
32363
|
+
});
|
|
32364
|
+
dynamicApp.component(header.name, header);
|
|
32365
|
+
/* harmony default export */ var packages_header = (Header);
|
|
32335
32366
|
// CONCATENATED MODULE: ./packages/table/src/table.ts
|
|
32336
32367
|
|
|
32337
32368
|
|
|
@@ -32374,6 +32405,7 @@ var lineOffsetSizes = {
|
|
|
32374
32405
|
|
|
32375
32406
|
|
|
32376
32407
|
|
|
32408
|
+
|
|
32377
32409
|
|
|
32378
32410
|
|
|
32379
32411
|
var isWebkit = browse['-webkit'] && !browse.edge;
|
|
@@ -39384,7 +39416,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
39384
39416
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
|
|
39385
39417
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
39386
39418
|
class: "vxe-table--fixed-".concat(fixedType, "-wrapper")
|
|
39387
|
-
}, [showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(
|
|
39419
|
+
}, [showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(packages_header, {
|
|
39388
39420
|
ref: isFixedLeft ? refTableLeftHeader : refTableRightHeader,
|
|
39389
39421
|
fixedType: fixedType,
|
|
39390
39422
|
tableData: tableData,
|
|
@@ -39851,7 +39883,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
|
39851
39883
|
/**
|
|
39852
39884
|
* 表头
|
|
39853
39885
|
*/
|
|
39854
|
-
showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(
|
|
39886
|
+
showHeader ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])(packages_header, {
|
|
39855
39887
|
ref: refTableHeader,
|
|
39856
39888
|
tableData: tableData,
|
|
39857
39889
|
tableColumn: tableColumn,
|
|
@@ -40330,13 +40362,12 @@ dynamicApp.component(table.name, table);
|
|
|
40330
40362
|
|
|
40331
40363
|
|
|
40332
40364
|
|
|
40333
|
-
|
|
40334
40365
|
|
|
40335
40366
|
|
|
40336
40367
|
// 按需加载的组件
|
|
40337
40368
|
|
|
40338
40369
|
var components = [// 功能模块
|
|
40339
|
-
|
|
40370
|
+
Footer, Icon, Filter, Menu, Edit, Export, Keyboard, Validator, // 可选组件
|
|
40340
40371
|
Column, Colgroup, Grid, Toolbar, Pager, Checkbox, CheckboxGroup, Radio, RadioGroup, RadioButton, Input, Textarea, Button, Modal, Tooltip, Form, FormItem, FormGather, Select, Optgroup, Option, Switch, List, Pulldown, // 核心
|
|
40341
40372
|
Table]; // 默认中文
|
|
40342
40373
|
|