vxe-table 4.13.7 → 4.13.9
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/render/index.js +13 -3
- package/es/table/src/footer.js +11 -15
- package/es/table/src/header.js +20 -11
- package/es/table/src/table.js +6 -4
- package/es/table/style.css +12 -5
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +12 -5
- 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 +40 -36
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/render/index.js +14 -3
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/footer.js +10 -15
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +5 -10
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +4 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +12 -5
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -3
- 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 +12 -5
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/render/index.ts +17 -3
- package/packages/table/src/footer.ts +11 -15
- package/packages/table/src/header.ts +21 -11
- package/packages/table/src/table.ts +7 -4
- package/packages/ui/index.ts +2 -2
- package/styles/components/table.scss +30 -17
- /package/es/{iconfont.1745290253213.ttf → iconfont.1745458144424.ttf} +0 -0
- /package/es/{iconfont.1745290253213.woff → iconfont.1745458144424.woff} +0 -0
- /package/es/{iconfont.1745290253213.woff2 → iconfont.1745458144424.woff2} +0 -0
- /package/lib/{iconfont.1745290253213.ttf → iconfont.1745458144424.ttf} +0 -0
- /package/lib/{iconfont.1745290253213.woff → iconfont.1745458144424.woff} +0 -0
- /package/lib/{iconfont.1745290253213.woff2 → iconfont.1745458144424.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.13.
|
|
3141
|
+
const version = "4.13.9";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3350,8 +3350,8 @@ core_.VxeUI.setConfig({
|
|
|
3350
3350
|
oSize: 0
|
|
3351
3351
|
},
|
|
3352
3352
|
scrollbarConfig: {
|
|
3353
|
-
|
|
3354
|
-
|
|
3353
|
+
width: 14,
|
|
3354
|
+
height: 14
|
|
3355
3355
|
}
|
|
3356
3356
|
},
|
|
3357
3357
|
// export: {
|
|
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3599
3599
|
const {
|
|
3600
3600
|
log: log_log
|
|
3601
3601
|
} = core_.VxeUI;
|
|
3602
|
-
const log_version = `table v${"4.13.
|
|
3602
|
+
const log_version = `table v${"4.13.9"}`;
|
|
3603
3603
|
const warnLog = log_log.create('warn', log_version);
|
|
3604
3604
|
const errLog = log_log.create('error', log_version);
|
|
3605
3605
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -7443,10 +7443,10 @@ const header_renderType = 'header';
|
|
|
7443
7443
|
const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
7444
7444
|
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
7445
7445
|
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
7446
|
-
|
|
7446
|
+
const showEllipsis = headOverflow === 'ellipsis';
|
|
7447
7447
|
const showTitle = headOverflow === 'title';
|
|
7448
7448
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
7449
|
-
|
|
7449
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
7450
7450
|
let hasFilter = false;
|
|
7451
7451
|
let firstFilterOption = null;
|
|
7452
7452
|
if (filters) {
|
|
@@ -7478,10 +7478,6 @@ const header_renderType = 'header';
|
|
|
7478
7478
|
onClick: evnt => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
7479
7479
|
onDblclick: evnt => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
7480
7480
|
};
|
|
7481
|
-
// 横向虚拟滚动不支持动态行高
|
|
7482
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
7483
|
-
showEllipsis = hasEllipsis = true;
|
|
7484
|
-
}
|
|
7485
7481
|
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell';
|
|
7486
7482
|
let isDisabledDrag = false;
|
|
7487
7483
|
if (isColDragCell) {
|
|
@@ -7504,7 +7500,7 @@ const header_renderType = 'header';
|
|
|
7504
7500
|
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
7505
7501
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7506
7502
|
let isVNPreEmptyStatus = false;
|
|
7507
|
-
if (!isGroup) {
|
|
7503
|
+
if (isOptimizeMode && !isGroup) {
|
|
7508
7504
|
if (!dragCol || dragCol.id !== colid) {
|
|
7509
7505
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
7510
7506
|
isVNPreEmptyStatus = true;
|
|
@@ -7616,7 +7612,6 @@ const header_renderType = 'header';
|
|
|
7616
7612
|
isColLoading,
|
|
7617
7613
|
overflowX,
|
|
7618
7614
|
scrollXLoad,
|
|
7619
|
-
scrollYLoad,
|
|
7620
7615
|
dragCol
|
|
7621
7616
|
} = tableReactData;
|
|
7622
7617
|
const {
|
|
@@ -7631,14 +7626,14 @@ const header_renderType = 'header';
|
|
|
7631
7626
|
renderColumnList = visibleColumn;
|
|
7632
7627
|
} else {
|
|
7633
7628
|
// 如果是使用优化模式
|
|
7634
|
-
if (scrollXLoad
|
|
7629
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
7635
7630
|
if (spanMethod || footerSpanMethod) {
|
|
7636
7631
|
// 如果不支持优化模式
|
|
7637
7632
|
} else {
|
|
7638
7633
|
isOptimizeMode = true;
|
|
7639
7634
|
}
|
|
7640
7635
|
}
|
|
7641
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
7636
|
+
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
7642
7637
|
renderColumnList = visibleColumn;
|
|
7643
7638
|
}
|
|
7644
7639
|
if (fixedType) {
|
|
@@ -7832,7 +7827,7 @@ const footer_renderType = 'footer';
|
|
|
7832
7827
|
const refFooterColgroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7833
7828
|
const refFooterTFoot = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7834
7829
|
const refFooterXSpace = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7835
|
-
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7830
|
+
const renderRows = (isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7836
7831
|
const $xeGrid = $xeTable.xeGrid;
|
|
7837
7832
|
const {
|
|
7838
7833
|
fixedType
|
|
@@ -7891,10 +7886,10 @@ const footer_renderType = 'footer';
|
|
|
7891
7886
|
const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding;
|
|
7892
7887
|
const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
7893
7888
|
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
7894
|
-
|
|
7889
|
+
const showEllipsis = footOverflow === 'ellipsis';
|
|
7895
7890
|
const showTitle = footOverflow === 'title';
|
|
7896
7891
|
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
7897
|
-
|
|
7892
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
7898
7893
|
const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
7899
7894
|
const attrs = {
|
|
7900
7895
|
colid
|
|
@@ -7920,10 +7915,6 @@ const footer_renderType = 'footer';
|
|
|
7920
7915
|
type: footer_renderType,
|
|
7921
7916
|
data: footerTableData
|
|
7922
7917
|
};
|
|
7923
|
-
// 纵向虚拟滚动不支持动态行高
|
|
7924
|
-
if (scrollXLoad && !hasEllipsis) {
|
|
7925
|
-
showEllipsis = hasEllipsis = true;
|
|
7926
|
-
}
|
|
7927
7918
|
if (showTitle || showTooltip || showAllTip) {
|
|
7928
7919
|
tfOns.onMouseenter = evnt => {
|
|
7929
7920
|
if (showTitle) {
|
|
@@ -7990,7 +7981,7 @@ const footer_renderType = 'footer';
|
|
|
7990
7981
|
const isLastColumn = $columnIndex === tableColumn.length - 1;
|
|
7991
7982
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
7992
7983
|
let isVNPreEmptyStatus = false;
|
|
7993
|
-
if (!isMergeCell) {
|
|
7984
|
+
if (isOptimizeMode && !isMergeCell) {
|
|
7994
7985
|
if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
7995
7986
|
isVNPreEmptyStatus = true;
|
|
7996
7987
|
}
|
|
@@ -8039,7 +8030,7 @@ const footer_renderType = 'footer';
|
|
|
8039
8030
|
}) : footer_renderEmptyElement($xeTable)]);
|
|
8040
8031
|
});
|
|
8041
8032
|
};
|
|
8042
|
-
const renderHeads = renderColumnList => {
|
|
8033
|
+
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
8043
8034
|
const {
|
|
8044
8035
|
fixedType,
|
|
8045
8036
|
footerTableData
|
|
@@ -8072,14 +8063,14 @@ const footer_renderType = 'footer';
|
|
|
8072
8063
|
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
8073
8064
|
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
8074
8065
|
}, {
|
|
8075
|
-
default: () => renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
8066
|
+
default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
8076
8067
|
});
|
|
8077
8068
|
}
|
|
8078
8069
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {
|
|
8079
8070
|
key: $rowIndex,
|
|
8080
8071
|
class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
8081
8072
|
style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
8082
|
-
}, renderRows(renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
8073
|
+
}, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
|
|
8083
8074
|
});
|
|
8084
8075
|
};
|
|
8085
8076
|
const renderVN = () => {
|
|
@@ -8102,20 +8093,19 @@ const footer_renderType = 'footer';
|
|
|
8102
8093
|
isColLoading,
|
|
8103
8094
|
overflowX,
|
|
8104
8095
|
scrollXLoad,
|
|
8105
|
-
scrollYLoad,
|
|
8106
8096
|
dragCol
|
|
8107
8097
|
} = tableReactData;
|
|
8108
8098
|
let renderColumnList = tableColumn;
|
|
8109
8099
|
let isOptimizeMode = false;
|
|
8110
8100
|
// 如果是使用优化模式
|
|
8111
|
-
if (scrollXLoad
|
|
8101
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
8112
8102
|
if (spanMethod || footerSpanMethod) {
|
|
8113
8103
|
// 如果不支持优化模式
|
|
8114
8104
|
} else {
|
|
8115
8105
|
isOptimizeMode = true;
|
|
8116
8106
|
}
|
|
8117
8107
|
}
|
|
8118
|
-
if (!isColLoading && (fixedType || !overflowX)) {
|
|
8108
|
+
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
8119
8109
|
renderColumnList = visibleColumn;
|
|
8120
8110
|
}
|
|
8121
8111
|
if (fixedType) {
|
|
@@ -8187,7 +8177,7 @@ const footer_renderType = 'footer';
|
|
|
8187
8177
|
*/
|
|
8188
8178
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tfoot', {
|
|
8189
8179
|
ref: refFooterTFoot
|
|
8190
|
-
}, renderHeads(renderColumnList))])])]);
|
|
8180
|
+
}, renderHeads(isOptimizeMode, renderColumnList))])])]);
|
|
8191
8181
|
};
|
|
8192
8182
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
8193
8183
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
@@ -10747,17 +10737,17 @@ if(allSortMethod){const sortRests=allSortMethod({data:tableTree,sortList:orderCo
|
|
|
10747
10737
|
if(allSortMethod){const sortRests=allSortMethod({data:tableTree,sortList:orderColumns,$table:$xeTable});tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortRests)?sortRests:tableTree;}else{const treeList=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(tableTree,{children:mapChildrenField});tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(treeList,orderColumns.map(({column,order})=>[getOrderField(column),order])),{key:rowField,parentKey:parentField,children:childrenField,mapChildren:mapChildrenField});}tableData=tableTree;}else{if(allSortMethod){const sortRests=allSortMethod({data:tableData,sortList:orderColumns,$table:$xeTable});tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortRests)?sortRests:tableData;}else{tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData,orderColumns.map(({column,order})=>[getOrderField(column),order]));}tableTree=tableData;}}}else{if(isRowGroupStatus){// 还原行分组
|
|
10748
10738
|
// 还原虚拟树
|
|
10749
10739
|
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullGroupData,()=>true,{original:true,isEvery:true,children:rowGroupOpts.mapChildrenField,mapChildren:rowGroupOpts.childrenField});tableData=tableTree;}else if(treeConfig&&transform){// 还原虚拟树
|
|
10750
|
-
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData,()=>true,{original:true,isEvery,children:mapChildrenField,mapChildren:childrenField});tableData=tableTree;}else{tableData=treeConfig?tableFullTreeData.slice(0):tableFullData.slice(0);tableTree=tableData;}}internalData.afterFullData=tableData;internalData.afterTreeFullData=tableTree;internalData.afterGroupFullData=tableTree;updateAfterDataIndex();};const updateStyle=()=>{const{showHeaderOverflow:allColumnHeaderOverflow,showFooterOverflow:allColumnFooterOverflow,mouseConfig,spanMethod,footerSpanMethod}=props;const{isGroup,currentRow,tableColumn,scrollXLoad,scrollYLoad,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isAllOverflow,expandColumn}=reactData;const{visibleColumn,tableHeight,headerHeight,footerHeight,elemStore,customHeight,customMinHeight,customMaxHeight}=internalData;const el=refElem.value;if(!el){return;}const containerList=['main','left','right'];const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=refEmptyPlaceholder.value;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${headerHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}let bodyHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-headerHeight-footerHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-headerHeight-footerHeight-osbHeight);}if(customHeight){bodyHeight=customHeight-headerHeight-footerHeight-osbHeight;}if(!bodyHeight){if(bodyTableElem){bodyHeight=bodyTableElem.clientHeight;}}if(bodyHeight){if(bodyMaxHeight){bodyHeight=Math.min(bodyMaxHeight,bodyHeight);}bodyHeight=Math.max(bodyMinHeight,bodyHeight);}const scrollbarXToTop=computeScrollbarXToTop.value;const xLeftCornerEl=refScrollXLeftCornerElem.value;const xRightCornerEl=refScrollXRightCornerElem.value;const scrollXVirtualEl=refScrollXVirtualElem.value;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=overflowX?'visible':'hidden';}const xWrapperEl=refScrollXWrapperElem.value;if(xWrapperEl){xWrapperEl.style.left=scrollbarXToTop?`${osbWidth}px`:'';xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;}if(xLeftCornerEl){xLeftCornerEl.style.width=scrollbarXToTop?`${osbWidth}px`:'';xLeftCornerEl.style.display=scrollbarXToTop?overflowX&&osbHeight?'block':'':'';}if(xRightCornerEl){xRightCornerEl.style.width=scrollbarXToTop?'':`${osbWidth}px`;xRightCornerEl.style.display=scrollbarXToTop?'':overflowX&&osbHeight?'block':'';}const scrollYVirtualEl=refScrollYVirtualElem.value;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${bodyHeight+headerHeight+footerHeight}px`;scrollYVirtualEl.style.visibility=overflowY?'visible':'hidden';}const yTopCornerEl=refScrollYTopCornerElem.value;if(yTopCornerEl){yTopCornerEl.style.height=`${headerHeight}px`;yTopCornerEl.style.display=overflowY&&headerHeight?'block':'';}const yWrapperEl=refScrollYWrapperElem.value;if(yWrapperEl){yWrapperEl.style.height=`${bodyHeight}px`;yWrapperEl.style.top=`${headerHeight}px`;}const yBottomCornerEl=refScrollYBottomCornerElem.value;if(yBottomCornerEl){yBottomCornerEl.style.height=`${footerHeight}px`;yBottomCornerEl.style.top=`${headerHeight+bodyHeight}px`;yBottomCornerEl.style.display=overflowY&&footerHeight?'block':'';}const rowExpandEl=refRowExpandElem.value;if(rowExpandEl){rowExpandEl.style.height=`${bodyHeight}px`;rowExpandEl.style.top=`${headerHeight}px`;}containerList.forEach((name,index)=>{const fixedType=index>0?name:'';const layoutList=['header','body','footer'];const isFixedLeft=fixedType==='left';let fixedColumn=[];let fixedWrapperElem;if(fixedType){fixedColumn=isFixedLeft?columnStore.leftList:columnStore.rightList;fixedWrapperElem=isFixedLeft?refLeftContainer.value:refRightContainer.value;}layoutList.forEach(layout=>{const wrapperElem=getRefElem(elemStore[`${name}-${layout}-wrapper`]);const currScrollElem=getRefElem(elemStore[`${name}-${layout}-scroll`]);const tableElem=getRefElem(elemStore[`${name}-${layout}-table`]);if(layout==='header'){// 表头体样式处理
|
|
10740
|
+
tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullTreeData,()=>true,{original:true,isEvery,children:mapChildrenField,mapChildren:childrenField});tableData=tableTree;}else{tableData=treeConfig?tableFullTreeData.slice(0):tableFullData.slice(0);tableTree=tableData;}}internalData.afterFullData=tableData;internalData.afterTreeFullData=tableTree;internalData.afterGroupFullData=tableTree;updateAfterDataIndex();};const updateStyle=()=>{const{showHeaderOverflow:allColumnHeaderOverflow,showFooterOverflow:allColumnFooterOverflow,mouseConfig,spanMethod,footerSpanMethod}=props;const{isGroup,currentRow,tableColumn,scrollXLoad,scrollYLoad,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isAllOverflow,expandColumn,isColLoading}=reactData;const{visibleColumn,tableHeight,headerHeight,footerHeight,elemStore,customHeight,customMinHeight,customMaxHeight}=internalData;const el=refElem.value;if(!el){return;}const containerList=['main','left','right'];const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=refEmptyPlaceholder.value;const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${headerHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}let bodyHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-headerHeight-footerHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-headerHeight-footerHeight-osbHeight);}if(customHeight){bodyHeight=customHeight-headerHeight-footerHeight-osbHeight;}if(!bodyHeight){if(bodyTableElem){bodyHeight=bodyTableElem.clientHeight;}}if(bodyHeight){if(bodyMaxHeight){bodyHeight=Math.min(bodyMaxHeight,bodyHeight);}bodyHeight=Math.max(bodyMinHeight,bodyHeight);}const scrollbarXToTop=computeScrollbarXToTop.value;const xLeftCornerEl=refScrollXLeftCornerElem.value;const xRightCornerEl=refScrollXRightCornerElem.value;const scrollXVirtualEl=refScrollXVirtualElem.value;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=overflowX?'visible':'hidden';}const xWrapperEl=refScrollXWrapperElem.value;if(xWrapperEl){xWrapperEl.style.left=scrollbarXToTop?`${osbWidth}px`:'';xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;}if(xLeftCornerEl){xLeftCornerEl.style.width=scrollbarXToTop?`${osbWidth}px`:'';xLeftCornerEl.style.display=scrollbarXToTop?overflowX&&osbHeight?'block':'':'';}if(xRightCornerEl){xRightCornerEl.style.width=scrollbarXToTop?'':`${osbWidth}px`;xRightCornerEl.style.display=scrollbarXToTop?'':overflowX&&osbHeight?'block':'';}const scrollYVirtualEl=refScrollYVirtualElem.value;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${bodyHeight+headerHeight+footerHeight}px`;scrollYVirtualEl.style.visibility=overflowY?'visible':'hidden';}const yTopCornerEl=refScrollYTopCornerElem.value;if(yTopCornerEl){yTopCornerEl.style.height=`${headerHeight}px`;yTopCornerEl.style.display=overflowY&&headerHeight?'block':'';}const yWrapperEl=refScrollYWrapperElem.value;if(yWrapperEl){yWrapperEl.style.height=`${bodyHeight}px`;yWrapperEl.style.top=`${headerHeight}px`;}const yBottomCornerEl=refScrollYBottomCornerElem.value;if(yBottomCornerEl){yBottomCornerEl.style.height=`${footerHeight}px`;yBottomCornerEl.style.top=`${headerHeight+bodyHeight}px`;yBottomCornerEl.style.display=overflowY&&footerHeight?'block':'';}const rowExpandEl=refRowExpandElem.value;if(rowExpandEl){rowExpandEl.style.height=`${bodyHeight}px`;rowExpandEl.style.top=`${headerHeight}px`;}containerList.forEach((name,index)=>{const fixedType=index>0?name:'';const layoutList=['header','body','footer'];const isFixedLeft=fixedType==='left';let fixedColumn=[];let fixedWrapperElem;if(fixedType){fixedColumn=isFixedLeft?columnStore.leftList:columnStore.rightList;fixedWrapperElem=isFixedLeft?refLeftContainer.value:refRightContainer.value;}layoutList.forEach(layout=>{const wrapperElem=getRefElem(elemStore[`${name}-${layout}-wrapper`]);const currScrollElem=getRefElem(elemStore[`${name}-${layout}-scroll`]);const tableElem=getRefElem(elemStore[`${name}-${layout}-table`]);if(layout==='header'){// 表头体样式处理
|
|
10751
10741
|
// 横向滚动渲染
|
|
10752
10742
|
let renderColumnList=tableColumn;let isOptimizeMode=false;if(isGroup){renderColumnList=visibleColumn;}else{// 如果是使用优化模式
|
|
10753
|
-
if(scrollXLoad
|
|
10754
|
-
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn
|
|
10743
|
+
if(scrollXLoad&&allColumnHeaderOverflow){if(spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10744
|
+
}else{isOptimizeMode=true;}}if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){// 如果是使用优化模式
|
|
10755
10745
|
if(isOptimizeMode){renderColumnList=fixedColumn||[];}}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isGroup){if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}else{if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}}if(currScrollElem){currScrollElem.style.height=`${headerHeight}px`;}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='body'){if(currScrollElem){currScrollElem.style.maxHeight=customMaxHeight?`${bodyMaxHeight}px`:'';currScrollElem.style.height=customHeight?`${bodyHeight}px`:'';currScrollElem.style.minHeight=`${bodyMinHeight}px`;}// 如果是固定列
|
|
10756
10746
|
if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${headerHeight}px`;}fixedWrapperElem.style.height=`${customHeight>0?customHeight:tableHeight+headerHeight+footerHeight+osbHeight}px`;fixedWrapperElem.style.width=`${fixedColumn.reduce((previous,column)=>previous+column.renderWidth,0)}px`;}let renderColumnList=tableColumn;let isOptimizeMode=false;// 如果是使用优化模式
|
|
10757
10747
|
if(scrollXLoad||scrollYLoad||isAllOverflow){if(expandColumn&&expandOpts.mode!=='fixed'||spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10758
10748
|
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';// 兼容性处理
|
|
10759
10749
|
tableElem.style.paddingRight=osbWidth&&fixedType&&(browseObj['-moz']||browseObj.safari)?`${osbWidth}px`:'';}const emptyBlockElem=getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);if(emptyBlockElem){emptyBlockElem.style.width=tWidth?`${tWidth}px`:'';}}else if(layout==='footer'){let renderColumnList=tableColumn;let isOptimizeMode=false;// 如果是使用优化模式
|
|
10760
|
-
if(scrollXLoad
|
|
10750
|
+
if(scrollXLoad&&allColumnFooterOverflow){if(spanMethod||footerSpanMethod){// 如果不支持优化模式
|
|
10761
10751
|
}else{isOptimizeMode=true;}}if(fixedType){renderColumnList=visibleColumn;if(isOptimizeMode){renderColumnList=fixedColumn||[];}}const tWidth=renderColumnList.reduce((previous,column)=>previous+column.renderWidth,0);if(fixedType){if(isOptimizeMode){if(wrapperElem){wrapperElem.style.width=tWidth?`${tWidth}px`:'';}}else{if(wrapperElem){wrapperElem.style.width=scrollXWidth?`${scrollXWidth}px`:'';}}}if(currScrollElem){currScrollElem.style.height=`${footerHeight}px`;// 如果是固定列
|
|
10762
10752
|
if(fixedWrapperElem){if(wrapperElem){wrapperElem.style.top=`${customHeight>0?customHeight-footerHeight-osbHeight:tableHeight+headerHeight}px`;}}}if(tableElem){tableElem.style.width=tWidth?`${tWidth}px`:'';}}});});if(currentRow){$xeTable.setCurrentRow(currentRow);}if(mouseConfig&&mouseOpts.selected&&editStore.selected.row&&editStore.selected.column){$xeTable.addCellSelectedClass();}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};const checkValidate=type=>{if($xeTable.triggerValidate){return $xeTable.triggerValidate(type);}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();};/**
|
|
10763
10753
|
* 当单元格发生改变时
|
|
@@ -19651,7 +19641,18 @@ function defaultEditRender(renderOpts, params) {
|
|
|
19651
19641
|
...getEditOns(renderOpts, params)
|
|
19652
19642
|
})];
|
|
19653
19643
|
}
|
|
19654
|
-
function
|
|
19644
|
+
function checkboxEditRender(renderOpts, params) {
|
|
19645
|
+
const {
|
|
19646
|
+
row,
|
|
19647
|
+
column
|
|
19648
|
+
} = params;
|
|
19649
|
+
const cellValue = getCellValue(row, column);
|
|
19650
|
+
return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(getDefaultComponent(renderOpts), {
|
|
19651
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
19652
|
+
...getEditOns(renderOpts, params)
|
|
19653
|
+
})];
|
|
19654
|
+
}
|
|
19655
|
+
function radioAndCheckboxGroupEditRender(renderOpts, params) {
|
|
19655
19656
|
const {
|
|
19656
19657
|
options
|
|
19657
19658
|
} = renderOpts;
|
|
@@ -20360,10 +20361,13 @@ render_renderer.mixin({
|
|
|
20360
20361
|
}
|
|
20361
20362
|
},
|
|
20362
20363
|
VxeRadioGroup: {
|
|
20363
|
-
renderTableDefault:
|
|
20364
|
+
renderTableDefault: radioAndCheckboxGroupEditRender
|
|
20365
|
+
},
|
|
20366
|
+
VxeCheckbox: {
|
|
20367
|
+
renderTableDefault: checkboxEditRender
|
|
20364
20368
|
},
|
|
20365
20369
|
VxeCheckboxGroup: {
|
|
20366
|
-
renderTableDefault:
|
|
20370
|
+
renderTableDefault: radioAndCheckboxGroupEditRender
|
|
20367
20371
|
},
|
|
20368
20372
|
VxeSwitch: {
|
|
20369
20373
|
tableAutoFocus: 'button',
|