vxe-table 4.10.6-beta.2 → 4.10.6-beta.4
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/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/body.js +2 -1
- package/es/table/src/footer.js +2 -1
- package/es/table/src/header.js +29 -19
- package/es/table/src/table.js +11 -5
- package/es/table/style.css +7 -4
- 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 +7 -4
- 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 +44 -26
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.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 +27 -17
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +11 -5
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +7 -4
- 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 +7 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/body.ts +2 -1
- package/packages/table/src/footer.ts +2 -1
- package/packages/table/src/header.ts +29 -19
- package/packages/table/src/table.ts +11 -5
- package/styles/components/table.scss +7 -5
- /package/es/{iconfont.1736736829304.ttf → iconfont.1736759340059.ttf} +0 -0
- /package/es/{iconfont.1736736829304.woff → iconfont.1736759340059.woff} +0 -0
- /package/es/{iconfont.1736736829304.woff2 → iconfont.1736759340059.woff2} +0 -0
- /package/lib/{iconfont.1736736829304.ttf → iconfont.1736759340059.ttf} +0 -0
- /package/lib/{iconfont.1736736829304.woff → iconfont.1736759340059.woff} +0 -0
- /package/lib/{iconfont.1736736829304.woff2 → iconfont.1736759340059.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.4";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3568,7 +3568,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3568
3568
|
const {
|
|
3569
3569
|
log: log_log
|
|
3570
3570
|
} = core_.VxeUI;
|
|
3571
|
-
const log_version = `table v${"4.10.6-beta.
|
|
3571
|
+
const log_version = `table v${"4.10.6-beta.4"}`;
|
|
3572
3572
|
const warnLog = log_log.create('warn', log_version);
|
|
3573
3573
|
const errLog = log_log.create('error', log_version);
|
|
3574
3574
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -6512,6 +6512,7 @@ const renderType = 'body';
|
|
|
6512
6512
|
}));
|
|
6513
6513
|
}
|
|
6514
6514
|
}
|
|
6515
|
+
const isLastColumn = $columnIndex === columns.length - 1;
|
|
6515
6516
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
6516
6517
|
let isPreLoadStatus = false;
|
|
6517
6518
|
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex || _rowIndex > scrollYStore.visibleEndIndex)) {
|
|
@@ -6524,7 +6525,7 @@ const renderType = 'body';
|
|
|
6524
6525
|
[`col--${cellAlign}`]: cellAlign,
|
|
6525
6526
|
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
6526
6527
|
[`col--${type}`]: type,
|
|
6527
|
-
'col--last':
|
|
6528
|
+
'col--last': isLastColumn,
|
|
6528
6529
|
'col--tree-node': treeNode,
|
|
6529
6530
|
'col--edit': isEdit,
|
|
6530
6531
|
'col--ellipsis': hasEllipsis,
|
|
@@ -7019,7 +7020,6 @@ const header_renderType = 'header';
|
|
|
7019
7020
|
} = $xeTable;
|
|
7020
7021
|
const {
|
|
7021
7022
|
refElem: tableRefElem,
|
|
7022
|
-
refTableBody,
|
|
7023
7023
|
refLeftContainer,
|
|
7024
7024
|
refRightContainer,
|
|
7025
7025
|
refCellResizeBar,
|
|
@@ -7052,10 +7052,10 @@ const header_renderType = 'header';
|
|
|
7052
7052
|
fixedType
|
|
7053
7053
|
} = props;
|
|
7054
7054
|
const {
|
|
7055
|
+
elemStore,
|
|
7055
7056
|
visibleColumn
|
|
7056
7057
|
} = tableInternalData;
|
|
7057
7058
|
const resizableOpts = computeResizableOpts.value;
|
|
7058
|
-
const tableBody = refTableBody.value;
|
|
7059
7059
|
const tableEl = tableRefElem.value;
|
|
7060
7060
|
const leftContainerElem = refLeftContainer.value;
|
|
7061
7061
|
const rightContainerElem = refRightContainer.value;
|
|
@@ -7066,12 +7066,21 @@ const header_renderType = 'header';
|
|
|
7066
7066
|
} = evnt;
|
|
7067
7067
|
const wrapperElem = refElem.value;
|
|
7068
7068
|
const dragBtnElem = evnt.target;
|
|
7069
|
+
let resizeColumn = column;
|
|
7070
|
+
if (column.children && column.children.length) {
|
|
7071
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children, childColumn => {
|
|
7072
|
+
resizeColumn = childColumn;
|
|
7073
|
+
});
|
|
7074
|
+
}
|
|
7069
7075
|
const cell = dragBtnElem.parentNode;
|
|
7070
7076
|
const cellParams = Object.assign(params, {
|
|
7071
7077
|
cell
|
|
7072
7078
|
});
|
|
7073
7079
|
let dragLeft = 0;
|
|
7074
|
-
const
|
|
7080
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
7081
|
+
if (!bodyScrollElem) {
|
|
7082
|
+
return;
|
|
7083
|
+
}
|
|
7075
7084
|
const pos = getOffsetPos(dragBtnElem, wrapperElem);
|
|
7076
7085
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
7077
7086
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
@@ -7100,25 +7109,25 @@ const header_renderType = 'header';
|
|
|
7100
7109
|
}
|
|
7101
7110
|
}
|
|
7102
7111
|
// 处理拖动事件
|
|
7103
|
-
const updateEvent =
|
|
7112
|
+
const updateEvent = evnt => {
|
|
7104
7113
|
evnt.stopPropagation();
|
|
7105
7114
|
evnt.preventDefault();
|
|
7106
7115
|
const offsetX = evnt.clientX - dragClientX;
|
|
7107
7116
|
let left = dragPosLeft + offsetX;
|
|
7108
|
-
const scrollLeft = fixedType ? 0 :
|
|
7117
|
+
const scrollLeft = fixedType ? 0 : bodyScrollElem.scrollLeft;
|
|
7109
7118
|
if (isLeftFixed) {
|
|
7110
7119
|
// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
7111
|
-
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft :
|
|
7120
|
+
left = Math.min(left, (rightContainerElem ? rightContainerElem.offsetLeft : bodyScrollElem.clientWidth) - fixedOffsetWidth - minInterval);
|
|
7112
7121
|
} else if (isRightFixed) {
|
|
7113
7122
|
// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
7114
7123
|
dragMinLeft = (leftContainerElem ? leftContainerElem.clientWidth : 0) + fixedOffsetWidth + minInterval;
|
|
7115
7124
|
left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval);
|
|
7116
7125
|
} else {
|
|
7117
|
-
dragMinLeft = Math.max(
|
|
7118
|
-
// left = Math.min(left,
|
|
7126
|
+
dragMinLeft = Math.max(bodyScrollElem.scrollLeft, dragMinLeft);
|
|
7127
|
+
// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
|
|
7119
7128
|
}
|
|
7120
7129
|
dragLeft = Math.max(left, dragMinLeft);
|
|
7121
|
-
const resizeBarLeft = dragLeft - scrollLeft;
|
|
7130
|
+
const resizeBarLeft = Math.max(1, dragLeft - scrollLeft);
|
|
7122
7131
|
resizeBarElem.style.left = `${resizeBarLeft}px`;
|
|
7123
7132
|
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
7124
7133
|
const tableWidth = tableEl.clientWidth;
|
|
@@ -7128,13 +7137,13 @@ const header_renderType = 'header';
|
|
|
7128
7137
|
const resizeTipHeight = resizeTipElem.clientHeight;
|
|
7129
7138
|
let resizeTipLeft = -resizeTipWidth;
|
|
7130
7139
|
if (resizeBarLeft < resizeTipWidth + resizeBarWidth) {
|
|
7131
|
-
resizeTipLeft =
|
|
7140
|
+
resizeTipLeft = 0;
|
|
7132
7141
|
} else if (resizeBarLeft > tableWidth) {
|
|
7133
7142
|
resizeTipLeft += tableWidth - resizeBarLeft;
|
|
7134
7143
|
}
|
|
7135
7144
|
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
7136
7145
|
resizeTipElem.style.top = `${Math.min(tableEl.clientHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
|
|
7137
|
-
resizeTipElem.textContent = header_getI18n('vxe.table.resizeColTip', [
|
|
7146
|
+
resizeTipElem.textContent = header_getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
|
|
7138
7147
|
}
|
|
7139
7148
|
};
|
|
7140
7149
|
tableReactData._isResize = true;
|
|
@@ -7144,11 +7153,11 @@ const header_renderType = 'header';
|
|
|
7144
7153
|
document.onmouseup = function (evnt) {
|
|
7145
7154
|
document.onmousemove = domMousemove;
|
|
7146
7155
|
document.onmouseup = domMouseup;
|
|
7147
|
-
const resizeWidth =
|
|
7148
|
-
|
|
7156
|
+
const resizeWidth = resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
7157
|
+
resizeColumn.resizeWidth = resizeWidth;
|
|
7149
7158
|
if (resizableOpts.dragMode === 'fixed') {
|
|
7150
7159
|
visibleColumn.forEach(item => {
|
|
7151
|
-
if (item.id !==
|
|
7160
|
+
if (item.id !== resizeColumn.id) {
|
|
7152
7161
|
if (!item.resizeWidth) {
|
|
7153
7162
|
item.resizeWidth = item.renderWidth;
|
|
7154
7163
|
}
|
|
@@ -7281,6 +7290,8 @@ const header_renderType = 'header';
|
|
|
7281
7290
|
thOns.onMouseup = $xeTable.handleHeaderCellDragMouseupEvent;
|
|
7282
7291
|
}
|
|
7283
7292
|
}
|
|
7293
|
+
const isLastColumn = $columnIndex === cols.length - 1;
|
|
7294
|
+
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
7284
7295
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7285
7296
|
let isPreLoadStatus = false;
|
|
7286
7297
|
if (scrollXLoad && !isGroup && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex || _columnIndex > scrollXStore.visibleEndIndex)) {
|
|
@@ -7290,7 +7301,7 @@ const header_renderType = 'header';
|
|
|
7290
7301
|
class: ['vxe-header--column', colid, {
|
|
7291
7302
|
[`col--${headAlign}`]: headAlign,
|
|
7292
7303
|
[`col--${type}`]: type,
|
|
7293
|
-
'col--last':
|
|
7304
|
+
'col--last': isLastColumn,
|
|
7294
7305
|
'col--fixed': column.fixed,
|
|
7295
7306
|
'col--group': isColGroup,
|
|
7296
7307
|
'col--ellipsis': hasEllipsis,
|
|
@@ -7317,13 +7328,13 @@ const header_renderType = 'header';
|
|
|
7317
7328
|
/**
|
|
7318
7329
|
* 列宽拖动
|
|
7319
7330
|
*/
|
|
7320
|
-
!fixedHiddenColumn &&
|
|
7331
|
+
!fixedHiddenColumn && showResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7321
7332
|
class: ['vxe-resizable', {
|
|
7322
7333
|
'is--line': !border || border === 'none'
|
|
7323
7334
|
}],
|
|
7324
7335
|
onMousedown: evnt => resizeMousedownEvent(evnt, params),
|
|
7325
7336
|
onDblclick: evnt => $xeTable.handleResizeDblclickEvent(evnt, params)
|
|
7326
|
-
}) :
|
|
7337
|
+
}) : header_renderEmptyElement($xeTable)]);
|
|
7327
7338
|
});
|
|
7328
7339
|
};
|
|
7329
7340
|
const renderHeads = (isGroup, isOptimizeMode, headerGroups) => {
|
|
@@ -7733,6 +7744,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7733
7744
|
attrs.colspan = colspan;
|
|
7734
7745
|
}
|
|
7735
7746
|
}
|
|
7747
|
+
const isLastColumn = $columnIndex === tableColumn.length - 1;
|
|
7736
7748
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7737
7749
|
let isPreLoadStatus = false;
|
|
7738
7750
|
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex || _columnIndex > scrollXStore.visibleEndIndex)) {
|
|
@@ -7742,7 +7754,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7742
7754
|
class: ['vxe-footer--column', column.id, {
|
|
7743
7755
|
[`col--${footAlign}`]: footAlign,
|
|
7744
7756
|
[`col--${type}`]: type,
|
|
7745
|
-
'col--last':
|
|
7757
|
+
'col--last': isLastColumn,
|
|
7746
7758
|
'fixed--width': !isAutoCellWidth,
|
|
7747
7759
|
'fixed--hidden': fixedHiddenColumn,
|
|
7748
7760
|
'col--ellipsis': hasEllipsis,
|
|
@@ -11520,7 +11532,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11520
11532
|
}
|
|
11521
11533
|
fullColumnFieldData[field] = rest;
|
|
11522
11534
|
} else {
|
|
11523
|
-
if (storage || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
|
|
11535
|
+
if (storage && !type || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
|
|
11524
11536
|
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field`]);
|
|
11525
11537
|
}
|
|
11526
11538
|
}
|
|
@@ -17801,7 +17813,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17801
17813
|
const {
|
|
17802
17814
|
column
|
|
17803
17815
|
} = params;
|
|
17804
|
-
|
|
17816
|
+
let resizeColumn = column;
|
|
17817
|
+
if (column.children && column.children.length) {
|
|
17818
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children, childColumn => {
|
|
17819
|
+
resizeColumn = childColumn;
|
|
17820
|
+
});
|
|
17821
|
+
}
|
|
17822
|
+
const colid = resizeColumn.id;
|
|
17805
17823
|
const colRest = fullColumnIdData[colid];
|
|
17806
17824
|
const dragBtnElem = evnt.target;
|
|
17807
17825
|
const cell = dragBtnElem.parentNode;
|
|
@@ -17809,11 +17827,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17809
17827
|
cell
|
|
17810
17828
|
});
|
|
17811
17829
|
const colMinWidth = getColReMinWidth(cellParams);
|
|
17812
|
-
let resizeWidth = calcColumnAutoWidth(
|
|
17830
|
+
let resizeWidth = calcColumnAutoWidth(resizeColumn, el);
|
|
17813
17831
|
if (colRest) {
|
|
17814
17832
|
resizeWidth = Math.max(resizeWidth, colRest.width);
|
|
17815
17833
|
}
|
|
17816
|
-
|
|
17834
|
+
resizeColumn.resizeWidth = Math.max(colMinWidth, resizeWidth);
|
|
17817
17835
|
reactData._isResize = false;
|
|
17818
17836
|
internalData._lastResizeTime = Date.now();
|
|
17819
17837
|
$xeTable.analyColumnWidth();
|
|
@@ -18079,7 +18097,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18079
18097
|
}
|
|
18080
18098
|
vLen++;
|
|
18081
18099
|
});
|
|
18082
|
-
const isSelected =
|
|
18100
|
+
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
|
|
18083
18101
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
18084
18102
|
reactData.isAllSelected = isSelected;
|
|
18085
18103
|
reactData.isIndeterminate = halfSelect;
|