vxe-table 4.17.29 → 4.17.31

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.
Files changed (40) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/src/emits.js +1 -0
  6. package/es/table/src/table.js +13 -1
  7. package/es/table/style.css +212 -47
  8. package/es/table/style.min.css +1 -1
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/log.js +1 -1
  11. package/es/vxe-table/style.css +212 -47
  12. package/es/vxe-table/style.min.css +1 -1
  13. package/lib/index.css +1 -1
  14. package/lib/index.min.css +1 -1
  15. package/lib/index.umd.js +6 -6
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/style.min.css +1 -1
  19. package/lib/table/src/emits.js +1 -1
  20. package/lib/table/src/emits.min.js +1 -1
  21. package/lib/table/src/table.js +3 -3
  22. package/lib/table/src/table.min.js +1 -1
  23. package/lib/table/style/style.css +212 -47
  24. package/lib/table/style/style.min.css +1 -1
  25. package/lib/ui/index.js +1 -1
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/vxe-table/style/style.css +212 -47
  30. package/lib/vxe-table/style/style.min.css +1 -1
  31. package/package.json +1 -1
  32. package/packages/table/src/emits.ts +1 -0
  33. package/packages/table/src/table.ts +16 -3
  34. package/styles/components/table.scss +326 -129
  35. /package/es/{iconfont.1765538995329.ttf → iconfont.1765852932267.ttf} +0 -0
  36. /package/es/{iconfont.1765538995329.woff → iconfont.1765852932267.woff} +0 -0
  37. /package/es/{iconfont.1765538995329.woff2 → iconfont.1765852932267.woff2} +0 -0
  38. /package/lib/{iconfont.1765538995329.ttf → iconfont.1765852932267.ttf} +0 -0
  39. /package/lib/{iconfont.1765538995329.woff → iconfont.1765852932267.woff} +0 -0
  40. /package/lib/{iconfont.1765538995329.woff2 → iconfont.1765852932267.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3141,7 +3141,7 @@ function eqEmptyValue(cellValue) {
3141
3141
  ;// ./packages/ui/index.ts
3142
3142
 
3143
3143
 
3144
- const version = "4.17.29";
3144
+ const version = "4.17.31";
3145
3145
  core_.VxeUI.version = version;
3146
3146
  core_.VxeUI.tableVersion = version;
3147
3147
  core_.VxeUI.setConfig({
@@ -3656,7 +3656,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3656
3656
  const {
3657
3657
  log: log_log
3658
3658
  } = core_.VxeUI;
3659
- const log_version = `table v${"4.17.29"}`;
3659
+ const log_version = `table v${"4.17.31"}`;
3660
3660
  const warnLog = log_log.create('warn', log_version);
3661
3661
  const errLog = log_log.create('error', log_version);
3662
3662
  ;// ./packages/table/src/columnInfo.ts
@@ -7087,7 +7087,7 @@ const gridProps = {
7087
7087
  }
7088
7088
  };
7089
7089
  ;// ./packages/table/src/emits.ts
7090
- const tableEmits = ['ready', 'init-rendered', 'data-rendered', 'update:data', 'keydown-start', 'keydown', 'keydown-end', 'paste', 'copy', 'cut', 'columns-change', 'data-change', 'footer-data-change', 'current-change', 'current-row-change', 'current-row-disabled', 'current-column-change', 'current-column-disabled', 'radio-change', 'checkbox-change', 'checkbox-all', 'checkbox-range-start', 'checkbox-range-change', 'checkbox-range-end', 'checkbox-range-select', 'cell-click', 'cell-dblclick', 'cell-menu', 'cell-mouseenter', 'cell-mouseleave', 'cell-selected', 'cell-delete-value', 'cell-backspace-value', 'header-cell-click', 'header-cell-dblclick', 'header-cell-menu', 'footer-cell-click', 'footer-cell-dblclick', 'footer-cell-menu', 'clear-merge', 'sort-change', 'clear-sort', 'clear-all-sort', 'filter-change', 'filter-visible', 'clear-filter', 'clear-all-filter', 'resizable-change', 'column-resizable-change', 'row-resizable-change', 'toggle-row-group-expand', 'toggle-row-expand', 'toggle-tree-expand', 'menu-click', 'edit-closed', 'row-dragstart', 'row-dragover', 'row-dragend', 'row-remove-dragend', 'row-insert-dragend', 'column-dragstart', 'column-dragover', 'column-dragend', 'enter-append-row', 'edit-actived', 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'custom-visible-change', 'custom-visible-all', 'custom-fixed-change', 'custom-sort-change', 'change-fnr', 'open-fnr', 'show-fnr', 'hide-fnr', 'fnr-change', 'fnr-find', 'fnr-find-all', 'fnr-replace', 'fnr-replace-all', 'cell-area-copy', 'cell-area-cut', 'cell-area-paste', 'cell-area-merge', 'clear-cell-area-selection', 'clear-cell-area-merge', 'header-cell-area-selection', 'cell-area-selection-invalid', 'cell-area-selection-start', 'cell-area-selection-drag', 'cell-area-selection-end', 'cell-area-extension-start', 'cell-area-extension-drag', 'cell-area-extension-end', 'cell-area-extension-fill', 'cell-area-selection-all-start', 'cell-area-selection-all-end', 'cell-area-arrows-start', 'cell-area-arrows-end', 'active-cell-change-start', 'active-cell-change-end'];
7090
+ const tableEmits = ['ready', 'init-rendered', 'data-rendered', 'update:data', 'keydown-start', 'keydown', 'keydown-end', 'paste', 'copy', 'cut', 'context-menu', 'columns-change', 'data-change', 'footer-data-change', 'current-change', 'current-row-change', 'current-row-disabled', 'current-column-change', 'current-column-disabled', 'radio-change', 'checkbox-change', 'checkbox-all', 'checkbox-range-start', 'checkbox-range-change', 'checkbox-range-end', 'checkbox-range-select', 'cell-click', 'cell-dblclick', 'cell-menu', 'cell-mouseenter', 'cell-mouseleave', 'cell-selected', 'cell-delete-value', 'cell-backspace-value', 'header-cell-click', 'header-cell-dblclick', 'header-cell-menu', 'footer-cell-click', 'footer-cell-dblclick', 'footer-cell-menu', 'clear-merge', 'sort-change', 'clear-sort', 'clear-all-sort', 'filter-change', 'filter-visible', 'clear-filter', 'clear-all-filter', 'resizable-change', 'column-resizable-change', 'row-resizable-change', 'toggle-row-group-expand', 'toggle-row-expand', 'toggle-tree-expand', 'menu-click', 'edit-closed', 'row-dragstart', 'row-dragover', 'row-dragend', 'row-remove-dragend', 'row-insert-dragend', 'column-dragstart', 'column-dragover', 'column-dragend', 'enter-append-row', 'edit-actived', 'edit-activated', 'edit-disabled', 'valid-error', 'scroll', 'scroll-boundary', 'custom', 'custom-visible-change', 'custom-visible-all', 'custom-fixed-change', 'custom-sort-change', 'change-fnr', 'open-fnr', 'show-fnr', 'hide-fnr', 'fnr-change', 'fnr-find', 'fnr-find-all', 'fnr-replace', 'fnr-replace-all', 'cell-area-copy', 'cell-area-cut', 'cell-area-paste', 'cell-area-merge', 'clear-cell-area-selection', 'clear-cell-area-merge', 'header-cell-area-selection', 'cell-area-selection-invalid', 'cell-area-selection-start', 'cell-area-selection-drag', 'cell-area-selection-end', 'cell-area-extension-start', 'cell-area-extension-drag', 'cell-area-extension-end', 'cell-area-extension-fill', 'cell-area-selection-all-start', 'cell-area-selection-all-end', 'cell-area-arrows-start', 'cell-area-arrows-end', 'active-cell-change-start', 'active-cell-change-end'];
7091
7091
  ;// ./packages/grid/src/emits.ts
7092
7092
 
7093
7093
  const gridEmits = [...tableEmits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom'];
@@ -19640,7 +19640,7 @@ internalData.isActivated=isActivated;};/**
19640
19640
  */const keydownEvent=evnt=>{const{mouseConfig,keyboardConfig}=props;const{filterStore,ctxMenuStore,editStore}=reactData;const mouseOpts=computeMouseOpts.value;const keyboardOpts=computeKeyboardOpts.value;const{actived}=editStore;const isEsc=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ESCAPE);if(isEsc){tablePrivateMethods.preventEvent(evnt,'event.keydown',null,()=>{dispatchEvent('keydown-start',{},evnt);if(keyboardConfig&&mouseConfig&&mouseOpts.area&&$xeTable.handleKeyboardCellAreaEvent){$xeTable.handleKeyboardCellAreaEvent(evnt);}else if(actived.row||filterStore.visible||ctxMenuStore.visible){evnt.stopPropagation();// 如果按下了 Esc 键,关闭快捷菜单、筛选
19641
19641
  if($xeTable.closeMenu){$xeTable.closeMenu();}tableMethods.closeFilter();if(keyboardConfig&&keyboardOpts.isEsc){// 如果是激活编辑状态,则取消编辑
19642
19642
  if(actived.row){const params=actived.args;$xeTable.handleClearEdit(evnt);// 如果配置了选中功能,则为选中状态
19643
- if(mouseOpts.selected){(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>$xeTable.handleSelected(params,evnt));}}}}dispatchEvent('keydown',{},evnt);dispatchEvent('keydown-end',{},evnt);});}};/**
19643
+ if(mouseOpts.selected){(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>$xeTable.handleSelected(params,evnt));}}}}dispatchEvent('keydown',{},evnt);dispatchEvent('keydown-end',{},evnt);});}};const contextMenuEvent=evnt=>{dispatchEvent('context-menu',{},evnt);};/**
19644
19644
  * 全局键盘事件
19645
19645
  */const handleGlobalKeydownEvent=evnt=>{// 该行为只对当前激活的表格有效
19646
19646
  if(internalData.isActivated){$xeTable.preventEvent(evnt,'event.keydown',null,()=>{const{mouseConfig,keyboardConfig,treeConfig,editConfig,highlightCurrentRow,highlightCurrentColumn}=props;const{ctxMenuStore,editStore,currentRow}=reactData;const{afterFullData}=internalData;const isContentMenu=computeIsContentMenu.value;const bodyMenu=computeBodyMenu.value;const keyboardOpts=computeKeyboardOpts.value;const mouseOpts=computeMouseOpts.value;const editOpts=computeEditOpts.value;const treeOpts=computeTreeOpts.value;const menuList=computeMenuList.value;const rowOpts=computeRowOpts.value;const columnOpts=computeColumnOpts.value;const{selected,actived}=editStore;const childrenField=treeOpts.children||treeOpts.childrenField;const keyCode=evnt.keyCode;const isEsc=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ESCAPE);const hasBackspaceKey=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.BACKSPACE);const isTab=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.TAB);const isEnter=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ENTER);const isSpacebar=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.SPACEBAR);const isLeftArrow=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ARROW_LEFT);const isUpArrow=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ARROW_UP);const isRightArrow=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ARROW_RIGHT);const isDwArrow=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.ARROW_DOWN);const hasDeleteKey=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.DELETE);const isF2=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.F2);const isContextMenu=table_globalEvents.hasKey(evnt,table_GLOBAL_EVENT_KEYS.CONTEXT_MENU);const isControlKey=hasControlKey(evnt);const hasShiftKey=evnt.shiftKey;const isAltKey=evnt.altKey;const operArrow=isLeftArrow||isUpArrow||isRightArrow||isDwArrow;const operCtxMenu=isContentMenu&&ctxMenuStore.visible&&(isEnter||isSpacebar||operArrow);const isEditStatus=isEnableConf(editConfig)&&actived.column&&actived.row;const beforeEditMethod=editOpts.beforeEditMethod||editOpts.activeMethod;if(operCtxMenu){// 如果配置了右键菜单; 支持方向键操作、回车
@@ -19703,7 +19703,7 @@ const fullDataRowIdMaps={};const idMaps={};const{handleUpdateRowId}=createHandle
19703
19703
  if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=computeTreeOpts.value;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(treeConfig&&lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const aggregateOpts=computeAggregateOpts.value;const{mapChildrenField}=aggregateOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const{treeConfig}=props;const treeOpts=computeTreeOpts.value;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
19704
19704
  if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},/**
19705
19705
  * 指定列宽的列进行拆分
19706
- */analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{columnStore,overflowX,scrollbarHeight}=reactData;const{visibleColumn}=internalData;const{leftList,rightList}=columnStore;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const dragBtnElem=evnt.target;let cell=dragBtnElem.parentElement;let resizeColumn=column;const isDragGroupCol=column.children&&column.children.length;if(isDragGroupCol){resizeColumn=getLastChildColumn(column);if(isDragGroupCol){const trEl=cell?cell.parentElement:null;const theadEl=trEl?trEl.parentElement:null;cell=theadEl?theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`):null;}}if(!cell){return;}const cellParams=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(params,{cell,$table:$xeTable});let dragLeft=0;const tableRect=tableEl.getBoundingClientRect();const rightContainerRect=rightContainerElem?rightContainerElem.getBoundingClientRect():null;const cellRect=cell.getBoundingClientRect();const dragBtnRect=dragBtnElem.getBoundingClientRect();const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
19706
+ */analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){const isLeftBtn=evnt.button===0;if(!isLeftBtn){return;}evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{columnStore,overflowX,scrollbarHeight}=reactData;const{visibleColumn}=internalData;const{leftList,rightList}=columnStore;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const dragBtnElem=evnt.target;let cell=dragBtnElem.parentElement;let resizeColumn=column;const isDragGroupCol=column.children&&column.children.length;if(isDragGroupCol){resizeColumn=getLastChildColumn(column);if(isDragGroupCol){const trEl=cell?cell.parentElement:null;const theadEl=trEl?trEl.parentElement:null;cell=theadEl?theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`):null;}}if(!cell){return;}const cellParams=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(params,{cell,$table:$xeTable});let dragLeft=0;const tableRect=tableEl.getBoundingClientRect();const rightContainerRect=rightContainerElem?rightContainerElem.getBoundingClientRect():null;const cellRect=cell.getBoundingClientRect();const dragBtnRect=dragBtnElem.getBoundingClientRect();const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
19707
19707
  const dragMinLeft=isRightFixed?0:cellRect.x-tableRect.x+dragBtnWidth+minInterval;const dragMaxLeft=cellRect.x-tableRect.x+cell.clientWidth-minInterval;let fixedLeftRemainWidth=0;let fixedRightRemainWidth=0;if(isLeftFixed||isRightFixed){let isMach=false;const fixedColumn=isLeftFixed?leftList:rightList;for(let i=0;i<fixedColumn.length;i++){const item=fixedColumn[i];if(isMach){fixedLeftRemainWidth+=item.renderWidth;}else{isMach=item.id===resizeColumn.id;if(!isMach){fixedRightRemainWidth+=item.renderWidth;}}}}// 处理拖动事件
19708
19708
  const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[Math.floor(resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft))]);const tableWrapperWidth=tableEl.clientWidth;const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-tableRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell,$table:$xeTable});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{showOverflow}=props;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;let tableEl=refElem.value;if($xeGantt){const{refGanttContainerElem}=$xeGantt.getRefMaps();const ganttContainerElem=refGanttContainerElem.value;if(ganttContainerElem){tableEl=ganttContainerElem;}}const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;let currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;if(!showOverflow){currCellHeight=tdEl.clientHeight;}const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,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)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
19709
19709
  const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const rtWidth=tableEl.clientWidth-osbWidth;const tableHeight=tableEl.clientHeight-osbHeight;let dragTop=evnt.clientY-tableRect.y-targetOffsetY;if(dragTop<minTop){dragTop=minTop;}else{resizeHeight=Math.max(cellMinHeight,currCellHeight+evnt.clientY-dragClientY);}resizeBarElem.style.left=`${scrollbarYToLeft?osbWidth:0}px`;resizeBarElem.style.top=`${dragTop}px`;resizeBarElem.style.width=`${rtWidth}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeRowTip',[resizeHeight]);const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeBarLeft=Math.max(2,evnt.clientX-tableRect.x);let resizeBarTop=0;if(resizeBarLeft+resizeTipWidth>=rtWidth-2){resizeBarLeft=rtWidth-resizeTipWidth-2;}if(dragTop+resizeTipHeight>=tableHeight){resizeBarTop=tableHeight-(dragTop+resizeTipHeight);}resizeTipElem.style.left=`${resizeBarLeft}px`;resizeTipElem.style.top=`${resizeBarTop}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'row-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);if(resizeHeight!==currCellHeight){const resizeParams={...params,resizeHeight,resizeRow:row};internalData.isResizeCellHeight=true;if($xeTable.handleRowResizeCellAreaEvent){$xeTable.handleRowResizeCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);updateRowOffsetTop();}}removeClass(tableEl,'row-drag--resize');};updateEvent(evnt);},handleRowResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoHeight}=resizableOpts;const el=refElem.value;if(isDblclickAutoHeight&&el){evnt.stopPropagation();evnt.preventDefault();const{editStore}=reactData;const{fullAllDataRowIdData}=internalData;const{actived}=editStore;const{row}=params;const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const handleRsHeight=()=>{el.setAttribute('data-calc-row','Y');const resizeHeight=calcCellAutoHeight(rowRest,el);el.removeAttribute('data-calc-row');const resizeParams={...params,resizeHeight,resizeRow:row};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleRowResizeDblclickCellAreaEvent){$xeTable.handleRowResizeDblclickCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);}};if(actived.row||actived.column){$xeTable.clearEdit().then(handleRsHeight);}else{handleRsHeight();}}},saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
@@ -19881,7 +19881,7 @@ Object.assign($xeTable,tableMethods,tablePrivateMethods);/**
19881
19881
  * 表体
19882
19882
  */(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(body,{ref:refTableBody,tableData,tableColumn}),/**
19883
19883
  * 表尾
19884
- */showFooter?(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(footer,{ref:refTableFooter,footerTableData,tableColumn}):table_renderEmptyElement($xeTable)]),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table--fixed-wrapper'},[leftList&&leftList.length&&overflowX?renderViewFixed('left'):table_renderEmptyElement($xeTable),rightList&&rightList.length&&overflowX?renderViewFixed('right'):table_renderEmptyElement($xeTable)]),renderRowExpandedVNs()]);};const renderBody=()=>{const scrollbarYToLeft=computeScrollbarYToLeft.value;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table--layout-wrapper'},scrollbarYToLeft?[renderScrollY(),renderViewport()]:[renderViewport(),renderScrollY()]);};const renderVN=()=>{const{loading,stripe,showHeader,height,treeConfig,mouseConfig,showFooter,highlightCell,highlightHoverRow,highlightHoverColumn,editConfig,editRules}=props;const{isGroup,overflowX,overflowY,scrollXLoad,scrollYLoad,tableData,initStore,isRowGroupStatus,columnStore,filterStore,customStore,tooltipStore}=reactData;const{teleportToWrapperElem,popupToWrapperElem}=internalData;const{leftList,rightList}=columnStore;const loadingSlot=slots.loading;const tipSlots={header:slots.headerTooltip||slots['header-tooltip'],body:slots.tooltip,footer:slots.footerTooltip||slots['footer-tooltip']};const currTooltipSlot=tooltipStore.visible&&tooltipStore.type?tipSlots[tooltipStore.type]:null;const rowDragOpts=computeRowDragOpts.value;const tableTipConfig=computeTableTipConfig.value;const validTipConfig=computeValidTipConfig.value;const validOpts=computeValidOpts.value;const checkboxOpts=computeCheckboxOpts.value;const treeOpts=computeTreeOpts.value;const rowOpts=computeRowOpts.value;const columnOpts=computeColumnOpts.value;const vSize=computeSize.value;const tableBorder=computeTableBorder.value;const mouseOpts=computeMouseOpts.value;const areaOpts=computeAreaOpts.value;const loadingOpts=computeLoadingOpts.value;const isContentMenu=computeIsContentMenu.value;const currLoading=reactData.isColLoading||reactData.isRowLoading||loading;const resizableOpts=computeResizableOpts.value;const isArea=mouseConfig&&mouseOpts.area;const columnDragOpts=computeColumnDragOpts.value;const scrollbarXToTop=computeScrollbarXToTop.value;const scrollbarYToLeft=computeScrollbarYToLeft.value;const{isCrossTableDrag}=rowDragOpts;const tbOns={onKeydown:keydownEvent};if(isCrossTableDrag&&!tableData.length){tbOns.onDragover=$xeTable.handleCrossTableRowDragoverEmptyEvent;}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{ref:refElem,class:['vxe-table','vxe-table--render-default',`tid_${xID}`,`border--${tableBorder}`,`sx-pos--${scrollbarXToTop?'top':'bottom'}`,`sy-pos--${scrollbarYToLeft?'left':'right'}`,{[`size--${vSize}`]:vSize,[`valid-msg--${validOpts.msgMode}`]:!!editRules,'vxe-editable':!!editConfig,'old-cell-valid':editRules&&table_getConfig().cellVaildMode==='obsolete','cell--highlight':highlightCell,'cell--selected':mouseConfig&&mouseOpts.selected,'cell--area':isArea,'header-cell--area':isArea&&areaOpts.selectCellByHeader,'body-cell--area':isArea&&areaOpts.selectCellByBody,'row--highlight':rowOpts.isHover||highlightHoverRow,'column--highlight':columnOpts.isHover||highlightHoverColumn,'checkbox--range':checkboxOpts.range,'col--drag-cell':columnOpts.drag&&columnDragOpts.trigger==='cell','is--header':showHeader,'is--footer':showFooter,'is--group':isGroup,'is-row-group':isRowGroupStatus,'is--tree-line':treeConfig&&(treeOpts.showLine||treeOpts.line),'is--fixed-left':leftList.length,'is--fixed-right':rightList.length,'is--animat':!!props.animat,'is--round':props.round,'is--stripe':!treeConfig&&stripe,'is--loading':currLoading,'is--empty':!currLoading&&!tableData.length,'is--scroll-y':overflowY,'is--scroll-x':overflowX,'is--virtual-x':scrollXLoad,'is--virtual-y':scrollYLoad}],spellcheck:false,...tbOns},[/**
19884
+ */showFooter?(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(footer,{ref:refTableFooter,footerTableData,tableColumn}):table_renderEmptyElement($xeTable)]),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table--fixed-wrapper'},[leftList&&leftList.length&&overflowX?renderViewFixed('left'):table_renderEmptyElement($xeTable),rightList&&rightList.length&&overflowX?renderViewFixed('right'):table_renderEmptyElement($xeTable)]),renderRowExpandedVNs()]);};const renderBody=()=>{const scrollbarYToLeft=computeScrollbarYToLeft.value;return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table--layout-wrapper'},scrollbarYToLeft?[renderScrollY(),renderViewport()]:[renderViewport(),renderScrollY()]);};const renderVN=()=>{const{loading,stripe,showHeader,height,treeConfig,mouseConfig,showFooter,highlightCell,highlightHoverRow,highlightHoverColumn,editConfig,editRules}=props;const{isGroup,overflowX,overflowY,scrollXLoad,scrollYLoad,tableData,initStore,isRowGroupStatus,columnStore,filterStore,customStore,tooltipStore}=reactData;const{teleportToWrapperElem,popupToWrapperElem}=internalData;const{leftList,rightList}=columnStore;const loadingSlot=slots.loading;const tipSlots={header:slots.headerTooltip||slots['header-tooltip'],body:slots.tooltip,footer:slots.footerTooltip||slots['footer-tooltip']};const currTooltipSlot=tooltipStore.visible&&tooltipStore.type?tipSlots[tooltipStore.type]:null;const rowDragOpts=computeRowDragOpts.value;const tableTipConfig=computeTableTipConfig.value;const validTipConfig=computeValidTipConfig.value;const validOpts=computeValidOpts.value;const checkboxOpts=computeCheckboxOpts.value;const treeOpts=computeTreeOpts.value;const rowOpts=computeRowOpts.value;const columnOpts=computeColumnOpts.value;const vSize=computeSize.value;const tableBorder=computeTableBorder.value;const mouseOpts=computeMouseOpts.value;const areaOpts=computeAreaOpts.value;const loadingOpts=computeLoadingOpts.value;const isContentMenu=computeIsContentMenu.value;const currLoading=reactData.isColLoading||reactData.isRowLoading||loading;const resizableOpts=computeResizableOpts.value;const isArea=mouseConfig&&mouseOpts.area;const columnDragOpts=computeColumnDragOpts.value;const scrollbarXToTop=computeScrollbarXToTop.value;const scrollbarYToLeft=computeScrollbarYToLeft.value;const{isCrossTableDrag}=rowDragOpts;const tbOns={onKeydown:keydownEvent,onContextmenu:contextMenuEvent};if(isCrossTableDrag&&!tableData.length){tbOns.onDragover=$xeTable.handleCrossTableRowDragoverEmptyEvent;}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{ref:refElem,class:['vxe-table','vxe-table--render-default',`tid_${xID}`,`border--${tableBorder}`,`sx-pos--${scrollbarXToTop?'top':'bottom'}`,`sy-pos--${scrollbarYToLeft?'left':'right'}`,{[`size--${vSize}`]:vSize,[`valid-msg--${validOpts.msgMode}`]:!!editRules,'vxe-editable':!!editConfig,'old-cell-valid':editRules&&table_getConfig().cellVaildMode==='obsolete','cell--highlight':highlightCell,'cell--selected':mouseConfig&&mouseOpts.selected,'cell--area':isArea,'header-cell--area':isArea&&areaOpts.selectCellByHeader,'body-cell--area':isArea&&areaOpts.selectCellByBody,'row--highlight':rowOpts.isHover||highlightHoverRow,'column--highlight':columnOpts.isHover||highlightHoverColumn,'checkbox--range':checkboxOpts.range,'col--drag-cell':columnOpts.drag&&columnDragOpts.trigger==='cell','is--header':showHeader,'not--header':!showHeader,'is--footer':showFooter,'not--footer':!showFooter,'is--group':isGroup,'is-row-group':isRowGroupStatus,'is--tree-line':treeConfig&&(treeOpts.showLine||treeOpts.line),'is--fixed-left':leftList.length,'is--fixed-right':rightList.length,'is--animat':!!props.animat,'is--round':props.round,'is--stripe':!treeConfig&&stripe,'is--loading':currLoading,'is--empty':!currLoading&&!tableData.length,'is--scroll-y':overflowY,'not--scroll-y':!overflowY,'is--scroll-x':overflowX,'not--scroll-x':!overflowX,'is--virtual-x':scrollXLoad,'is--virtual-y':scrollYLoad}],spellcheck:false,...tbOns},[/**
19885
19885
  * 隐藏列
19886
19886
  */(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table-slots'},slots.default?slots.default({}):[]),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{ref:refVarElem,class:'vxe-table-vars'},[(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table-var-default'}),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table-var-medium'}),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table-var-small'}),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{class:'vxe-table-var-mini'})]),(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div',{key:'tw',class:'vxe-table--render-wrapper'},scrollbarXToTop?[renderScrollX(),renderBody()]:[renderBody(),renderScrollX()]),/**
19887
19887
  * 空数据