vxe-table 4.10.6-beta.25 → 4.10.6-beta.27
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/en-US.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +21 -19
- package/es/table/src/cell.js +25 -39
- package/es/table/src/column.js +10 -0
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/footer.js +2 -1
- package/es/table/src/header.js +2 -2
- package/es/table/src/table.js +111 -81
- package/es/table/src/util.js +9 -3
- package/es/table/style.css +51 -26
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +51 -26
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +189 -150
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +17 -18
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +24 -33
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +10 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +122 -92
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +10 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +51 -26
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +51 -26
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/table/src/body.ts +21 -19
- package/packages/table/src/cell.ts +25 -47
- package/packages/table/src/column.ts +10 -0
- package/packages/table/src/columnInfo.ts +2 -0
- package/packages/table/src/footer.ts +2 -1
- package/packages/table/src/header.ts +2 -2
- package/packages/table/src/table.ts +116 -83
- package/packages/table/src/util.ts +10 -3
- package/styles/components/table.scss +63 -31
- /package/es/{iconfont.1737356819937.ttf → iconfont.1737446773545.ttf} +0 -0
- /package/es/{iconfont.1737356819937.woff → iconfont.1737446773545.woff} +0 -0
- /package/es/{iconfont.1737356819937.woff2 → iconfont.1737446773545.woff2} +0 -0
- /package/lib/{iconfont.1737356819937.ttf → iconfont.1737446773545.ttf} +0 -0
- /package/lib/{iconfont.1737356819937.woff → iconfont.1737446773545.woff} +0 -0
- /package/lib/{iconfont.1737356819937.woff2 → iconfont.1737446773545.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.10.6-beta.
|
|
3141
|
+
const version = "4.10.6-beta.27";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3577,7 +3577,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3577
3577
|
const {
|
|
3578
3578
|
log: log_log
|
|
3579
3579
|
} = core_.VxeUI;
|
|
3580
|
-
const log_version = `table v${"4.10.6-beta.
|
|
3580
|
+
const log_version = `table v${"4.10.6-beta.27"}`;
|
|
3581
3581
|
const warnLog = log_log.create('warn', log_version);
|
|
3582
3582
|
const errLog = log_log.create('error', log_version);
|
|
3583
3583
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3666,6 +3666,8 @@ class ColumnInfo {
|
|
|
3666
3666
|
footerClassName: _vm.footerClassName,
|
|
3667
3667
|
formatter: formatter,
|
|
3668
3668
|
footerFormatter: _vm.footerFormatter,
|
|
3669
|
+
padding: _vm.padding,
|
|
3670
|
+
verticalAlign: _vm.verticalAlign,
|
|
3669
3671
|
sortable: _vm.sortable,
|
|
3670
3672
|
sortBy: _vm.sortBy,
|
|
3671
3673
|
sortType: _vm.sortType,
|
|
@@ -4120,6 +4122,12 @@ function getRefElem(refEl) {
|
|
|
4120
4122
|
}
|
|
4121
4123
|
return null;
|
|
4122
4124
|
}
|
|
4125
|
+
function getCellHeight(height) {
|
|
4126
|
+
if (height === 'unset') {
|
|
4127
|
+
return 0;
|
|
4128
|
+
}
|
|
4129
|
+
return height || 0;
|
|
4130
|
+
}
|
|
4123
4131
|
/**
|
|
4124
4132
|
* 列宽拖动最大宽度
|
|
4125
4133
|
* @param params
|
|
@@ -4480,7 +4488,7 @@ function rowToVisible($xeTable, row) {
|
|
|
4480
4488
|
return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * defaultRowHeight);
|
|
4481
4489
|
}
|
|
4482
4490
|
let scrollTop = 0;
|
|
4483
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
4491
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
4484
4492
|
const rHeight = rowRest ? rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight : defaultRowHeight;
|
|
4485
4493
|
for (let i = 0; i < afterFullData.length; i++) {
|
|
4486
4494
|
const currRow = afterFullData[i];
|
|
@@ -4488,8 +4496,8 @@ function rowToVisible($xeTable, row) {
|
|
|
4488
4496
|
if (currRow === row || currRowid === rowid) {
|
|
4489
4497
|
break;
|
|
4490
4498
|
}
|
|
4491
|
-
const
|
|
4492
|
-
scrollTop +=
|
|
4499
|
+
const currRowRest = fullAllDataRowIdData[currRowid] || {};
|
|
4500
|
+
scrollTop += currRowRest.resizeHeight || currRowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
4493
4501
|
}
|
|
4494
4502
|
if (scrollTop < bodyScrollTop) {
|
|
4495
4503
|
return $xeTable.scrollTo(null, scrollTop - leftFixedWidth - 1);
|
|
@@ -4852,18 +4860,6 @@ function renderTitleContent(params, content) {
|
|
|
4852
4860
|
...ons
|
|
4853
4861
|
}, getSlotVNs(content))];
|
|
4854
4862
|
}
|
|
4855
|
-
function formatFooterLabel(footerFormatter, params) {
|
|
4856
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerFormatter)) {
|
|
4857
|
-
return `${footerFormatter(params)}`;
|
|
4858
|
-
}
|
|
4859
|
-
const isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerFormatter);
|
|
4860
|
-
const gFormatOpts = isArr ? cell_formats.get(footerFormatter[0]) : cell_formats.get(footerFormatter);
|
|
4861
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4862
|
-
if (footerFormatMethod) {
|
|
4863
|
-
return `${isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)}`;
|
|
4864
|
-
}
|
|
4865
|
-
return '';
|
|
4866
|
-
}
|
|
4867
4863
|
function getFooterContent(params) {
|
|
4868
4864
|
const {
|
|
4869
4865
|
$table,
|
|
@@ -4883,35 +4879,38 @@ function getFooterContent(params) {
|
|
|
4883
4879
|
if (footerSlot) {
|
|
4884
4880
|
return $table.callSlot(footerSlot, params);
|
|
4885
4881
|
}
|
|
4882
|
+
let itemValue = '';
|
|
4883
|
+
// 兼容老模式
|
|
4884
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(items)) {
|
|
4885
|
+
itemValue = items[_columnIndex];
|
|
4886
|
+
} else {
|
|
4887
|
+
itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
4888
|
+
}
|
|
4889
|
+
const footParams = Object.assign(params, {
|
|
4890
|
+
itemValue
|
|
4891
|
+
});
|
|
4892
|
+
if (footerFormatter) {
|
|
4893
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerFormatter)) {
|
|
4894
|
+
return `${footerFormatter(footParams)}`;
|
|
4895
|
+
}
|
|
4896
|
+
const isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(footerFormatter);
|
|
4897
|
+
const gFormatOpts = isArr ? cell_formats.get(footerFormatter[0]) : cell_formats.get(footerFormatter);
|
|
4898
|
+
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4899
|
+
if (footerFormatMethod) {
|
|
4900
|
+
return `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`;
|
|
4901
|
+
}
|
|
4902
|
+
return '';
|
|
4903
|
+
}
|
|
4886
4904
|
if (renderOpts) {
|
|
4887
4905
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
4888
4906
|
if (compConf) {
|
|
4889
4907
|
const rtFooter = compConf.renderTableFooter || compConf.renderFooter;
|
|
4890
4908
|
if (rtFooter) {
|
|
4891
|
-
return getSlotVNs(rtFooter(renderOpts,
|
|
4909
|
+
return getSlotVNs(rtFooter(renderOpts, footParams));
|
|
4892
4910
|
}
|
|
4893
4911
|
}
|
|
4894
4912
|
}
|
|
4895
|
-
|
|
4896
|
-
// 兼容老模式
|
|
4897
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(items)) {
|
|
4898
|
-
itemValue = items[_columnIndex];
|
|
4899
|
-
return [footerFormatter ? formatFooterLabel(footerFormatter, {
|
|
4900
|
-
itemValue,
|
|
4901
|
-
column,
|
|
4902
|
-
row,
|
|
4903
|
-
items,
|
|
4904
|
-
_columnIndex
|
|
4905
|
-
}) : formatText(itemValue, 1)];
|
|
4906
|
-
}
|
|
4907
|
-
itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
4908
|
-
return [footerFormatter ? formatFooterLabel(footerFormatter, {
|
|
4909
|
-
itemValue,
|
|
4910
|
-
column,
|
|
4911
|
-
row,
|
|
4912
|
-
items,
|
|
4913
|
-
_columnIndex
|
|
4914
|
-
}) : formatText(itemValue, 1)];
|
|
4913
|
+
return [formatText(itemValue, 1)];
|
|
4915
4914
|
}
|
|
4916
4915
|
function getDefaultCellLabel(params) {
|
|
4917
4916
|
const {
|
|
@@ -5937,6 +5936,16 @@ const columnProps = {
|
|
|
5937
5936
|
formatter: [Function, Array, String],
|
|
5938
5937
|
// 格式化表尾显示内容
|
|
5939
5938
|
footerFormatter: [Function, Array, String],
|
|
5939
|
+
// 是否显示间距
|
|
5940
|
+
padding: {
|
|
5941
|
+
type: Boolean,
|
|
5942
|
+
default: null
|
|
5943
|
+
},
|
|
5944
|
+
// 垂直对齐方式
|
|
5945
|
+
verticalAlign: {
|
|
5946
|
+
type: String,
|
|
5947
|
+
default: null
|
|
5948
|
+
},
|
|
5940
5949
|
// 是否允许排序
|
|
5941
5950
|
sortable: Boolean,
|
|
5942
5951
|
// 自定义排序的属性
|
|
@@ -6259,7 +6268,6 @@ const renderType = 'body';
|
|
|
6259
6268
|
const {
|
|
6260
6269
|
columnKey,
|
|
6261
6270
|
height,
|
|
6262
|
-
showOverflow: allColumnOverflow,
|
|
6263
6271
|
cellClassName: allCellClassName,
|
|
6264
6272
|
cellStyle,
|
|
6265
6273
|
align: allAlign,
|
|
@@ -6317,10 +6325,12 @@ const renderType = 'body';
|
|
|
6317
6325
|
className,
|
|
6318
6326
|
treeNode,
|
|
6319
6327
|
rowResize,
|
|
6328
|
+
padding,
|
|
6329
|
+
verticalAlign,
|
|
6320
6330
|
slots
|
|
6321
6331
|
} = column;
|
|
6322
6332
|
const {
|
|
6323
|
-
verticalAlign
|
|
6333
|
+
verticalAlign: allVerticalAlign
|
|
6324
6334
|
} = cellOpts;
|
|
6325
6335
|
const {
|
|
6326
6336
|
actived
|
|
@@ -6337,16 +6347,17 @@ const renderType = 'body';
|
|
|
6337
6347
|
const isEdit = isEnableConf(editRender);
|
|
6338
6348
|
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
6339
6349
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
6340
|
-
const
|
|
6341
|
-
const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().
|
|
6350
|
+
const isCellPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(padding) ? allPadding === null ? cellOpts.padding : allPadding : padding;
|
|
6351
|
+
const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
6342
6352
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
6343
6353
|
const showTitle = cellOverflow === 'title';
|
|
6344
6354
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
6345
|
-
|
|
6346
|
-
const
|
|
6355
|
+
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
6356
|
+
const isRsHeight = resizeHeight > 0;
|
|
6347
6357
|
let isDirty;
|
|
6348
6358
|
const tdOns = {};
|
|
6349
6359
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
6360
|
+
const cellVerticalAlign = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(verticalAlign) ? allVerticalAlign : verticalAlign;
|
|
6350
6361
|
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
6351
6362
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
6352
6363
|
const tdAttrs = {
|
|
@@ -6496,13 +6507,13 @@ const renderType = 'body';
|
|
|
6496
6507
|
isVNPreEmptyStatus = true;
|
|
6497
6508
|
}
|
|
6498
6509
|
const tcStyle = {};
|
|
6499
|
-
if (hasEllipsis) {
|
|
6510
|
+
if (scrollYLoad || hasEllipsis || isRsHeight) {
|
|
6500
6511
|
tcStyle.height = `${cellHeight}px`;
|
|
6501
6512
|
} else {
|
|
6502
6513
|
tcStyle.minHeight = `${cellHeight}px`;
|
|
6503
6514
|
}
|
|
6504
6515
|
const tdVNs = [];
|
|
6505
|
-
if (fixedHiddenColumn &&
|
|
6516
|
+
if (fixedHiddenColumn && isAllOverflow) {
|
|
6506
6517
|
tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6507
6518
|
key: 'tc',
|
|
6508
6519
|
class: ['vxe-cell', {
|
|
@@ -6564,19 +6575,17 @@ const renderType = 'body';
|
|
|
6564
6575
|
}));
|
|
6565
6576
|
}
|
|
6566
6577
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
6567
|
-
class: ['vxe-body--column', colid, {
|
|
6568
|
-
[`col--${cellAlign}`]: cellAlign,
|
|
6569
|
-
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
6570
|
-
[`col--${type}`]: type,
|
|
6578
|
+
class: ['vxe-body--column', colid, cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : '', cellAlign ? `col--${cellAlign}` : '', type ? `col--${type}` : '', {
|
|
6571
6579
|
'col--last': isLastColumn,
|
|
6572
6580
|
'col--tree-node': treeNode,
|
|
6573
6581
|
'col--edit': isEdit,
|
|
6574
6582
|
'col--ellipsis': hasEllipsis,
|
|
6583
|
+
'col--rs-height': isRsHeight,
|
|
6575
6584
|
'col--to-row': showAreaRowStatus,
|
|
6576
6585
|
'col--auto-height': isVNAutoHeight,
|
|
6577
6586
|
'fixed--width': !isAutoCellWidth,
|
|
6578
6587
|
'fixed--hidden': fixedHiddenColumn,
|
|
6579
|
-
'is--padding':
|
|
6588
|
+
'is--padding': isCellPadding,
|
|
6580
6589
|
'is--drag-cell': isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
6581
6590
|
'is--drag-disabled': isDisabledDrag,
|
|
6582
6591
|
'col--dirty': isDirty,
|
|
@@ -6597,7 +6606,6 @@ const renderType = 'body';
|
|
|
6597
6606
|
highlightHoverRow,
|
|
6598
6607
|
rowClassName,
|
|
6599
6608
|
rowStyle,
|
|
6600
|
-
showOverflow: allColumnOverflow,
|
|
6601
6609
|
editConfig,
|
|
6602
6610
|
treeConfig
|
|
6603
6611
|
} = tableProps;
|
|
@@ -6606,6 +6614,7 @@ const renderType = 'body';
|
|
|
6606
6614
|
treeExpandedMaps,
|
|
6607
6615
|
scrollXLoad,
|
|
6608
6616
|
scrollYLoad,
|
|
6617
|
+
isAllOverflow,
|
|
6609
6618
|
rowExpandedMaps,
|
|
6610
6619
|
expandColumn,
|
|
6611
6620
|
selectRadioRow,
|
|
@@ -6743,7 +6752,7 @@ const renderType = 'body';
|
|
|
6743
6752
|
const {
|
|
6744
6753
|
showOverflow
|
|
6745
6754
|
} = expandColumn;
|
|
6746
|
-
const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ?
|
|
6755
|
+
const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
6747
6756
|
const expandParams = {
|
|
6748
6757
|
$table: $xeTable,
|
|
6749
6758
|
seq,
|
|
@@ -6831,7 +6840,6 @@ const renderType = 'body';
|
|
|
6831
6840
|
tableColumn
|
|
6832
6841
|
} = props;
|
|
6833
6842
|
const {
|
|
6834
|
-
showOverflow: allColumnOverflow,
|
|
6835
6843
|
spanMethod,
|
|
6836
6844
|
footerSpanMethod,
|
|
6837
6845
|
mouseConfig
|
|
@@ -6862,7 +6870,7 @@ const renderType = 'body';
|
|
|
6862
6870
|
let renderColumnList = tableColumn;
|
|
6863
6871
|
let isOptimizeMode = false;
|
|
6864
6872
|
// 如果是使用优化模式
|
|
6865
|
-
if (scrollXLoad || scrollYLoad ||
|
|
6873
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
6866
6874
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
6867
6875
|
// 如果不支持优化模式
|
|
6868
6876
|
} else {
|
|
@@ -6944,7 +6952,7 @@ const renderType = 'body';
|
|
|
6944
6952
|
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
6945
6953
|
}
|
|
6946
6954
|
};
|
|
6947
|
-
if (leftFixedWidth || rightFixedWidth) {
|
|
6955
|
+
if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
|
|
6948
6956
|
ons.onWheel = $xeTable.triggerBodyWheelEvent;
|
|
6949
6957
|
}
|
|
6950
6958
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
@@ -7112,7 +7120,7 @@ const header_renderType = 'header';
|
|
|
7112
7120
|
const cellOpts = computeCellOpts.value;
|
|
7113
7121
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
7114
7122
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
7115
|
-
const currCellHeight = headerCellOpts.height || cellOpts.height || defaultRowHeight;
|
|
7123
|
+
const currCellHeight = getCellHeight(headerCellOpts.height || cellOpts.height) || defaultRowHeight;
|
|
7116
7124
|
const {
|
|
7117
7125
|
disabledMethod: dragDisabledMethod,
|
|
7118
7126
|
isCrossDrag,
|
|
@@ -7466,6 +7474,7 @@ const header_renderType = 'header';
|
|
|
7466
7474
|
|
|
7467
7475
|
|
|
7468
7476
|
|
|
7477
|
+
|
|
7469
7478
|
const {
|
|
7470
7479
|
renderer: footer_renderer,
|
|
7471
7480
|
renderEmptyElement: footer_renderEmptyElement
|
|
@@ -7565,7 +7574,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7565
7574
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
7566
7575
|
const cellOpts = computeCellOpts.value;
|
|
7567
7576
|
const footerCellOpts = computeFooterCellOpts.value;
|
|
7568
|
-
const currCellHeight = footerCellOpts.height || cellOpts.height || defaultRowHeight;
|
|
7577
|
+
const currCellHeight = getCellHeight(footerCellOpts.height || cellOpts.height) || defaultRowHeight;
|
|
7569
7578
|
return tableColumn.map((column, $columnIndex) => {
|
|
7570
7579
|
const {
|
|
7571
7580
|
type,
|
|
@@ -11154,14 +11163,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11154
11163
|
};
|
|
11155
11164
|
const computeRowHeight = () => {
|
|
11156
11165
|
const {
|
|
11157
|
-
|
|
11158
|
-
} =
|
|
11166
|
+
isAllOverflow
|
|
11167
|
+
} = reactData;
|
|
11159
11168
|
const tableHeader = refTableHeader.value;
|
|
11160
11169
|
const tableBody = refTableBody.value;
|
|
11161
11170
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
11162
11171
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
11163
11172
|
let rowHeight = 0;
|
|
11164
|
-
if (
|
|
11173
|
+
if (isAllOverflow) {
|
|
11165
11174
|
if (tableBodyElem) {
|
|
11166
11175
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
11167
11176
|
let firstTrElem;
|
|
@@ -11184,8 +11193,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11184
11193
|
};
|
|
11185
11194
|
const handleVirtualYVisible = currScrollTop => {
|
|
11186
11195
|
const {
|
|
11187
|
-
|
|
11188
|
-
} =
|
|
11196
|
+
isAllOverflow
|
|
11197
|
+
} = reactData;
|
|
11189
11198
|
const {
|
|
11190
11199
|
elemStore,
|
|
11191
11200
|
isResizeCellHeight,
|
|
@@ -11204,15 +11213,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11204
11213
|
let offsetTop = 0;
|
|
11205
11214
|
let visibleSize = 0;
|
|
11206
11215
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
11207
|
-
if (!isCustomCellHeight &&
|
|
11216
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
11208
11217
|
toVisibleIndex = Math.floor(scrollTop / defaultRowHeight);
|
|
11209
11218
|
visibleSize = Math.ceil(clientHeight / defaultRowHeight) + 1;
|
|
11210
11219
|
} else {
|
|
11211
11220
|
for (let rIndex = 0, rLen = afterFullData.length; rIndex < rLen; rIndex++) {
|
|
11212
11221
|
const row = afterFullData[rIndex];
|
|
11213
11222
|
const rowid = getRowid($xeTable, row);
|
|
11214
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
11215
|
-
offsetTop += rowRest
|
|
11223
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
11224
|
+
offsetTop += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
11216
11225
|
if (toVisibleIndex === -1 && scrollTop < offsetTop) {
|
|
11217
11226
|
toVisibleIndex = rIndex;
|
|
11218
11227
|
}
|
|
@@ -11785,26 +11794,20 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11785
11794
|
};
|
|
11786
11795
|
const calcCellAutoHeight = (rowRest, wrapperEl) => {
|
|
11787
11796
|
const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
11788
|
-
let
|
|
11789
|
-
const firstCellEl = cellElemList[0];
|
|
11790
|
-
if (firstCellEl && firstCellEl.parentElement) {
|
|
11791
|
-
const cellStyle = getComputedStyle(firstCellEl.parentElement);
|
|
11792
|
-
topBottomPadding = Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom));
|
|
11793
|
-
}
|
|
11794
|
-
let colHeight = rowRest.height - topBottomPadding;
|
|
11797
|
+
let colHeight = rowRest.height;
|
|
11795
11798
|
for (let i = 0; i < cellElemList.length; i++) {
|
|
11796
11799
|
const cellElem = cellElemList[i];
|
|
11800
|
+
const tdEl = cellElem.parentElement;
|
|
11801
|
+
const topBottomPadding = Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(tdEl.style.paddingTop) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(tdEl.style.paddingBottom));
|
|
11797
11802
|
const cellHeight = cellElem ? cellElem.clientHeight : 0;
|
|
11798
|
-
colHeight = Math.max(colHeight, Math.ceil(cellHeight));
|
|
11803
|
+
colHeight = Math.max(colHeight - topBottomPadding, Math.ceil(cellHeight));
|
|
11799
11804
|
}
|
|
11800
|
-
return colHeight
|
|
11805
|
+
return colHeight;
|
|
11801
11806
|
};
|
|
11802
11807
|
const calcCellHeight = () => {
|
|
11803
|
-
const {
|
|
11804
|
-
showOverflow
|
|
11805
|
-
} = props;
|
|
11806
11808
|
const {
|
|
11807
11809
|
tableData,
|
|
11810
|
+
isAllOverflow,
|
|
11808
11811
|
scrollYLoad,
|
|
11809
11812
|
scrollXLoad
|
|
11810
11813
|
} = reactData;
|
|
@@ -11813,14 +11816,16 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11813
11816
|
} = internalData;
|
|
11814
11817
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
11815
11818
|
const el = refElem.value;
|
|
11816
|
-
if (!
|
|
11819
|
+
if (!isAllOverflow && scrollYLoad && el) {
|
|
11820
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
11817
11821
|
tableData.forEach(row => {
|
|
11818
11822
|
const rowid = getRowid($xeTable, row);
|
|
11819
11823
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
11820
11824
|
if (rowRest) {
|
|
11821
|
-
const
|
|
11822
|
-
rowRest.height = Math.max(defaultRowHeight, scrollXLoad ? Math.max(rowRest.height,
|
|
11825
|
+
const reHeight = calcCellAutoHeight(rowRest, el);
|
|
11826
|
+
rowRest.height = Math.max(defaultRowHeight, scrollXLoad ? Math.max(rowRest.height, reHeight) : reHeight);
|
|
11823
11827
|
}
|
|
11828
|
+
el.removeAttribute('data-calc-row');
|
|
11824
11829
|
});
|
|
11825
11830
|
reactData.calcCellHeightFlag++;
|
|
11826
11831
|
}
|
|
@@ -12197,7 +12202,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12197
12202
|
const updateStyle = () => {
|
|
12198
12203
|
const {
|
|
12199
12204
|
border,
|
|
12200
|
-
showOverflow: allColumnOverflow,
|
|
12201
12205
|
showHeaderOverflow: allColumnHeaderOverflow,
|
|
12202
12206
|
showFooterOverflow: allColumnFooterOverflow,
|
|
12203
12207
|
mouseConfig,
|
|
@@ -12418,7 +12422,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12418
12422
|
let renderColumnList = tableColumn;
|
|
12419
12423
|
let isOptimizeMode = false;
|
|
12420
12424
|
// 如果是使用优化模式
|
|
12421
|
-
if (scrollXLoad || scrollYLoad ||
|
|
12425
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
12422
12426
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
12423
12427
|
// 如果不支持优化模式
|
|
12424
12428
|
} else {
|
|
@@ -12502,7 +12506,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12502
12506
|
} else if (layout === 'footer') {
|
|
12503
12507
|
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
12504
12508
|
} else {
|
|
12505
|
-
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ?
|
|
12509
|
+
cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
12506
12510
|
}
|
|
12507
12511
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
12508
12512
|
const showTitle = cellOverflow === 'title';
|
|
@@ -13205,8 +13209,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13205
13209
|
const loadTableData = (datas, isReset) => {
|
|
13206
13210
|
const {
|
|
13207
13211
|
keepSource,
|
|
13208
|
-
treeConfig
|
|
13209
|
-
showOverflow
|
|
13212
|
+
treeConfig
|
|
13210
13213
|
} = props;
|
|
13211
13214
|
const {
|
|
13212
13215
|
editStore,
|
|
@@ -13219,7 +13222,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13219
13222
|
lastScrollTop
|
|
13220
13223
|
} = internalData;
|
|
13221
13224
|
const treeOpts = computeTreeOpts.value;
|
|
13222
|
-
const rowOpts = computeRowOpts.value;
|
|
13223
13225
|
const {
|
|
13224
13226
|
transform
|
|
13225
13227
|
} = treeOpts;
|
|
@@ -13280,32 +13282,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13280
13282
|
internalData.tableSynchData = datas;
|
|
13281
13283
|
if (isReset) {
|
|
13282
13284
|
internalData.isResizeCellHeight = false;
|
|
13285
|
+
reactData.rowExpandedMaps = {};
|
|
13286
|
+
reactData.rowExpandLazyLoadedMaps = {};
|
|
13287
|
+
reactData.treeExpandedMaps = {};
|
|
13288
|
+
reactData.treeExpandLazyLoadedMaps = {};
|
|
13283
13289
|
}
|
|
13284
13290
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
13285
13291
|
if (keepSource) {
|
|
13286
13292
|
tablePrivateMethods.cacheSourceMap(fullData);
|
|
13287
13293
|
}
|
|
13288
|
-
if (sYLoad) {
|
|
13289
|
-
if (showOverflow) {
|
|
13290
|
-
if (!rowOpts.height) {
|
|
13291
|
-
const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false);
|
|
13292
|
-
if (errColumn) {
|
|
13293
|
-
errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
|
|
13294
|
-
}
|
|
13295
|
-
}
|
|
13296
|
-
}
|
|
13297
|
-
if (true) {
|
|
13298
|
-
if (!(props.height || props.maxHeight)) {
|
|
13299
|
-
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
13300
|
-
}
|
|
13301
|
-
// if (!props.showOverflow) {
|
|
13302
|
-
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
13303
|
-
// }
|
|
13304
|
-
if (props.spanMethod) {
|
|
13305
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
13306
|
-
}
|
|
13307
|
-
}
|
|
13308
|
-
}
|
|
13309
13294
|
if ($xeTable.clearCellAreas && props.mouseConfig) {
|
|
13310
13295
|
$xeTable.clearCellAreas();
|
|
13311
13296
|
$xeTable.clearCopyCellArea();
|
|
@@ -13324,6 +13309,27 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13324
13309
|
if (sYLoad) {
|
|
13325
13310
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
13326
13311
|
}
|
|
13312
|
+
if (sYLoad) {
|
|
13313
|
+
// if (showOverflow) {
|
|
13314
|
+
// if (!rowOpts.height) {
|
|
13315
|
+
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
13316
|
+
// if (errColumn) {
|
|
13317
|
+
// errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
|
|
13318
|
+
// }
|
|
13319
|
+
// }
|
|
13320
|
+
// }
|
|
13321
|
+
if (true) {
|
|
13322
|
+
if (!(props.height || props.maxHeight)) {
|
|
13323
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
13324
|
+
}
|
|
13325
|
+
// if (!props.showOverflow) {
|
|
13326
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
13327
|
+
// }
|
|
13328
|
+
if (props.spanMethod) {
|
|
13329
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
13330
|
+
}
|
|
13331
|
+
}
|
|
13332
|
+
}
|
|
13327
13333
|
handleReserveStatus();
|
|
13328
13334
|
tablePrivateMethods.checkSelectionStatus();
|
|
13329
13335
|
return new Promise(resolve => {
|
|
@@ -13774,10 +13780,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13774
13780
|
*/
|
|
13775
13781
|
const loadScrollYData = scrollTop => {
|
|
13776
13782
|
const {
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
const {
|
|
13780
|
-
mergeList
|
|
13783
|
+
mergeList,
|
|
13784
|
+
isAllOverflow
|
|
13781
13785
|
} = reactData;
|
|
13782
13786
|
const {
|
|
13783
13787
|
scrollYStore
|
|
@@ -13788,7 +13792,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
13788
13792
|
endIndex,
|
|
13789
13793
|
offsetSize
|
|
13790
13794
|
} = scrollYStore;
|
|
13791
|
-
const autoOffsetYSize =
|
|
13795
|
+
const autoOffsetYSize = isAllOverflow ? offsetSize : offsetSize + 1;
|
|
13792
13796
|
const {
|
|
13793
13797
|
toVisibleIndex,
|
|
13794
13798
|
visibleSize
|
|
@@ -15041,7 +15045,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15041
15045
|
if (rowRest) {
|
|
15042
15046
|
const resizeHeight = rowRest.resizeHeight;
|
|
15043
15047
|
if (resizeHeight || isFull) {
|
|
15044
|
-
const currCellHeight = resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
15048
|
+
const currCellHeight = resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
15045
15049
|
rest[rowid] = currCellHeight;
|
|
15046
15050
|
}
|
|
15047
15051
|
}
|
|
@@ -15092,8 +15096,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
15092
15096
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
15093
15097
|
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
|
|
15094
15098
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
15095
|
-
|
|
15096
|
-
|
|
15099
|
+
if (rowRest) {
|
|
15100
|
+
return rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
15101
|
+
}
|
|
15102
|
+
return 0;
|
|
15097
15103
|
},
|
|
15098
15104
|
/**
|
|
15099
15105
|
* 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
|
|
@@ -16364,9 +16370,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16364
16370
|
*/
|
|
16365
16371
|
scrollToRow(row, fieldOrColumn) {
|
|
16366
16372
|
const {
|
|
16367
|
-
|
|
16368
|
-
} = props;
|
|
16369
|
-
const {
|
|
16373
|
+
isAllOverflow,
|
|
16370
16374
|
scrollYLoad,
|
|
16371
16375
|
scrollXLoad
|
|
16372
16376
|
} = reactData;
|
|
@@ -16383,7 +16387,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16383
16387
|
}
|
|
16384
16388
|
return Promise.all(rest).then(() => {
|
|
16385
16389
|
if (row) {
|
|
16386
|
-
if (!
|
|
16390
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad)) {
|
|
16387
16391
|
calcCellHeight();
|
|
16388
16392
|
calcCellWidth();
|
|
16389
16393
|
}
|
|
@@ -17995,6 +17999,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17995
17999
|
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
17996
18000
|
resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
|
|
17997
18001
|
}
|
|
18002
|
+
reactData.isDragResize = true;
|
|
17998
18003
|
};
|
|
17999
18004
|
reactData.isDragResize = true;
|
|
18000
18005
|
addClass(tableEl, 'col-drag--resize');
|
|
@@ -18004,8 +18009,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18004
18009
|
document.onmousemove = null;
|
|
18005
18010
|
document.onmouseup = null;
|
|
18006
18011
|
resizeBarElem.style.display = 'none';
|
|
18007
|
-
reactData.isDragResize = false;
|
|
18008
18012
|
internalData._lastResizeTime = Date.now();
|
|
18013
|
+
setTimeout(() => {
|
|
18014
|
+
reactData.isDragResize = false;
|
|
18015
|
+
}, 50);
|
|
18009
18016
|
const resizeWidth = resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
18010
18017
|
const resizeParams = {
|
|
18011
18018
|
...params,
|
|
@@ -18041,6 +18048,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18041
18048
|
} = resizableOpts;
|
|
18042
18049
|
const el = refElem.value;
|
|
18043
18050
|
if (isDblclickAutoWidth && el) {
|
|
18051
|
+
evnt.stopPropagation();
|
|
18052
|
+
evnt.preventDefault();
|
|
18044
18053
|
const {
|
|
18045
18054
|
fullColumnIdData
|
|
18046
18055
|
} = internalData;
|
|
@@ -18127,7 +18136,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18127
18136
|
return;
|
|
18128
18137
|
}
|
|
18129
18138
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
18130
|
-
const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
18139
|
+
const currCellHeight = rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
18131
18140
|
const tableRect = tableEl.getBoundingClientRect();
|
|
18132
18141
|
const trRect = trEl.getBoundingClientRect();
|
|
18133
18142
|
const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight;
|
|
@@ -18169,6 +18178,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18169
18178
|
resizeTipElem.style.left = `${resizeBarLeft}px`;
|
|
18170
18179
|
resizeTipElem.style.top = `${resizeBarTop}px`;
|
|
18171
18180
|
}
|
|
18181
|
+
reactData.isDragResize = true;
|
|
18172
18182
|
};
|
|
18173
18183
|
reactData.isDragResize = true;
|
|
18174
18184
|
addClass(tableEl, 'row-drag--resize');
|
|
@@ -18178,8 +18188,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18178
18188
|
document.onmousemove = null;
|
|
18179
18189
|
document.onmouseup = null;
|
|
18180
18190
|
resizeBarElem.style.display = 'none';
|
|
18181
|
-
reactData.isDragResize = false;
|
|
18182
18191
|
internalData._lastResizeTime = Date.now();
|
|
18192
|
+
setTimeout(() => {
|
|
18193
|
+
reactData.isDragResize = false;
|
|
18194
|
+
}, 50);
|
|
18183
18195
|
if (resizeHeight !== currCellHeight) {
|
|
18184
18196
|
const resizeParams = {
|
|
18185
18197
|
...params,
|
|
@@ -18205,9 +18217,17 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18205
18217
|
} = resizableOpts;
|
|
18206
18218
|
const el = refElem.value;
|
|
18207
18219
|
if (isDblclickAutoHeight && el) {
|
|
18220
|
+
evnt.stopPropagation();
|
|
18221
|
+
evnt.preventDefault();
|
|
18222
|
+
const {
|
|
18223
|
+
editStore
|
|
18224
|
+
} = reactData;
|
|
18208
18225
|
const {
|
|
18209
18226
|
fullAllDataRowIdData
|
|
18210
18227
|
} = internalData;
|
|
18228
|
+
const {
|
|
18229
|
+
actived
|
|
18230
|
+
} = editStore;
|
|
18211
18231
|
const {
|
|
18212
18232
|
row
|
|
18213
18233
|
} = params;
|
|
@@ -18216,19 +18236,28 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18216
18236
|
if (!rowRest) {
|
|
18217
18237
|
return;
|
|
18218
18238
|
}
|
|
18219
|
-
const
|
|
18220
|
-
|
|
18221
|
-
|
|
18222
|
-
|
|
18223
|
-
|
|
18239
|
+
const handleRsHeight = () => {
|
|
18240
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
18241
|
+
const resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
18242
|
+
el.removeAttribute('data-calc-row');
|
|
18243
|
+
const resizeParams = {
|
|
18244
|
+
...params,
|
|
18245
|
+
resizeHeight,
|
|
18246
|
+
resizeRow: row
|
|
18247
|
+
};
|
|
18248
|
+
reactData.isDragResize = false;
|
|
18249
|
+
internalData._lastResizeTime = Date.now();
|
|
18250
|
+
if ($xeTable.handleRowResizeDblclickCellAreaEvent) {
|
|
18251
|
+
$xeTable.handleRowResizeDblclickCellAreaEvent(evnt, resizeParams);
|
|
18252
|
+
} else {
|
|
18253
|
+
rowRest.resizeHeight = resizeHeight;
|
|
18254
|
+
handleUpdateRowResize(evnt, resizeParams);
|
|
18255
|
+
}
|
|
18224
18256
|
};
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
if ($xeTable.handleRowResizeDblclickCellAreaEvent) {
|
|
18228
|
-
$xeTable.handleRowResizeDblclickCellAreaEvent(evnt, resizeParams);
|
|
18257
|
+
if (actived.row || actived.column) {
|
|
18258
|
+
$xeTable.clearEdit().then(handleRsHeight);
|
|
18229
18259
|
} else {
|
|
18230
|
-
|
|
18231
|
-
handleUpdateRowResize(evnt, resizeParams);
|
|
18260
|
+
handleRsHeight();
|
|
18232
18261
|
}
|
|
18233
18262
|
}
|
|
18234
18263
|
},
|
|
@@ -18716,11 +18745,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18716
18745
|
internalData.tooltipTimeout = setTimeout(() => {
|
|
18717
18746
|
$tooltip = refTooltip.value;
|
|
18718
18747
|
if ($tooltip && $tooltip.isActived && !$tooltip.isActived()) {
|
|
18719
|
-
|
|
18748
|
+
$xeTable.closeTooltip();
|
|
18720
18749
|
}
|
|
18721
18750
|
}, tooltipOpts.leaveDelay);
|
|
18722
18751
|
} else {
|
|
18723
|
-
|
|
18752
|
+
$xeTable.closeTooltip();
|
|
18724
18753
|
}
|
|
18725
18754
|
},
|
|
18726
18755
|
triggerHeaderCellClickEvent(evnt, params) {
|
|
@@ -18765,8 +18794,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18765
18794
|
editConfig
|
|
18766
18795
|
} = props;
|
|
18767
18796
|
const {
|
|
18768
|
-
editStore
|
|
18797
|
+
editStore,
|
|
18798
|
+
isDragResize
|
|
18769
18799
|
} = reactData;
|
|
18800
|
+
if (isDragResize) {
|
|
18801
|
+
return;
|
|
18802
|
+
}
|
|
18770
18803
|
const expandOpts = computeExpandOpts.value;
|
|
18771
18804
|
const editOpts = computeEditOpts.value;
|
|
18772
18805
|
const treeOpts = computeTreeOpts.value;
|
|
@@ -18876,8 +18909,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18876
18909
|
editConfig
|
|
18877
18910
|
} = props;
|
|
18878
18911
|
const {
|
|
18879
|
-
editStore
|
|
18912
|
+
editStore,
|
|
18913
|
+
isDragResize
|
|
18880
18914
|
} = reactData;
|
|
18915
|
+
if (isDragResize) {
|
|
18916
|
+
return;
|
|
18917
|
+
}
|
|
18881
18918
|
const editOpts = computeEditOpts.value;
|
|
18882
18919
|
const {
|
|
18883
18920
|
actived
|
|
@@ -20214,9 +20251,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20214
20251
|
},
|
|
20215
20252
|
triggerBodyWheelEvent(evnt) {
|
|
20216
20253
|
const {
|
|
20254
|
+
target,
|
|
20217
20255
|
deltaY,
|
|
20218
20256
|
deltaX
|
|
20219
20257
|
} = evnt;
|
|
20258
|
+
if (target && /^textarea$/i.test(target.tagName)) {
|
|
20259
|
+
return;
|
|
20260
|
+
}
|
|
20220
20261
|
const {
|
|
20221
20262
|
highlightHoverRow
|
|
20222
20263
|
} = src_props;
|
|
@@ -20451,9 +20492,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20451
20492
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
20452
20493
|
updateScrollYSpace() {
|
|
20453
20494
|
const {
|
|
20454
|
-
|
|
20455
|
-
} = props;
|
|
20456
|
-
const {
|
|
20495
|
+
isAllOverflow,
|
|
20457
20496
|
scrollYLoad
|
|
20458
20497
|
} = reactData;
|
|
20459
20498
|
const {
|
|
@@ -20475,21 +20514,21 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20475
20514
|
let ySpaceHeight = 0;
|
|
20476
20515
|
if (scrollYLoad) {
|
|
20477
20516
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
20478
|
-
if (!isCustomCellHeight &&
|
|
20517
|
+
if (!isCustomCellHeight && isAllOverflow) {
|
|
20479
20518
|
ySpaceHeight = afterFullData.length * defaultRowHeight;
|
|
20480
20519
|
topSpaceHeight = Math.max(0, startIndex * defaultRowHeight);
|
|
20481
20520
|
} else {
|
|
20482
20521
|
for (let i = 0; i < afterFullData.length; i++) {
|
|
20483
20522
|
const row = afterFullData[i];
|
|
20484
20523
|
const rowid = getRowid($xeTable, row);
|
|
20485
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
20486
|
-
ySpaceHeight += rowRest
|
|
20524
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
20525
|
+
ySpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
20487
20526
|
}
|
|
20488
20527
|
for (let i = 0; i < startIndex; i++) {
|
|
20489
20528
|
const row = afterFullData[i];
|
|
20490
20529
|
const rowid = getRowid($xeTable, row);
|
|
20491
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
20492
|
-
topSpaceHeight += rowRest
|
|
20530
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
20531
|
+
topSpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight;
|
|
20493
20532
|
}
|
|
20494
20533
|
}
|
|
20495
20534
|
} else {
|
|
@@ -20520,13 +20559,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20520
20559
|
},
|
|
20521
20560
|
updateScrollXData() {
|
|
20522
20561
|
const {
|
|
20523
|
-
|
|
20524
|
-
} =
|
|
20562
|
+
isAllOverflow
|
|
20563
|
+
} = reactData;
|
|
20525
20564
|
handleTableColumn();
|
|
20526
20565
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
20527
20566
|
handleTableColumn();
|
|
20528
20567
|
$xeTable.updateScrollXSpace();
|
|
20529
|
-
if (!
|
|
20568
|
+
if (!isAllOverflow) {
|
|
20530
20569
|
$xeTable.updateScrollYSpace();
|
|
20531
20570
|
}
|
|
20532
20571
|
});
|
|
@@ -21115,7 +21154,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21115
21154
|
if (value && value.length >= 50000) {
|
|
21116
21155
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
21117
21156
|
}
|
|
21118
|
-
loadTableData(value,
|
|
21157
|
+
loadTableData(value, true).then(() => {
|
|
21119
21158
|
const {
|
|
21120
21159
|
scrollXLoad,
|
|
21121
21160
|
scrollYLoad,
|