vxe-table 3.20.9 → 3.20.11

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 (63) 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/module/custom/mixin.js +76 -5
  6. package/es/table/module/custom/panel.js +18 -12
  7. package/es/table/module/keyboard/mixin.js +1 -3
  8. package/es/table/src/body.js +16 -15
  9. package/es/table/src/methods.js +52 -20
  10. package/es/table/src/table.js +23 -19
  11. package/es/table/src/util.js +6 -3
  12. package/es/table/style.css +14 -0
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +3 -2
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +14 -0
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/helper/vetur/attributes.json +1 -1
  19. package/helper/vetur/tags.json +1 -1
  20. package/lib/index.css +1 -1
  21. package/lib/index.min.css +1 -1
  22. package/lib/index.umd.js +160 -70
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/style.css +1 -1
  25. package/lib/style.min.css +1 -1
  26. package/lib/table/module/custom/mixin.js +81 -5
  27. package/lib/table/module/custom/mixin.min.js +1 -1
  28. package/lib/table/module/custom/panel.js +20 -12
  29. package/lib/table/module/custom/panel.min.js +1 -1
  30. package/lib/table/module/keyboard/mixin.js +1 -4
  31. package/lib/table/module/keyboard/mixin.min.js +1 -1
  32. package/lib/table/src/body.js +16 -11
  33. package/lib/table/src/body.min.js +1 -1
  34. package/lib/table/src/methods.js +13 -15
  35. package/lib/table/src/methods.min.js +1 -1
  36. package/lib/table/src/table.js +19 -17
  37. package/lib/table/src/table.min.js +1 -1
  38. package/lib/table/src/util.js +6 -3
  39. package/lib/table/src/util.min.js +1 -1
  40. package/lib/table/style/style.css +14 -0
  41. package/lib/table/style/style.min.css +1 -1
  42. package/lib/ui/index.js +3 -2
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/vxe-table/style/style.css +14 -0
  47. package/lib/vxe-table/style/style.min.css +1 -1
  48. package/package.json +1 -1
  49. package/packages/table/module/custom/mixin.ts +77 -6
  50. package/packages/table/module/custom/panel.ts +19 -13
  51. package/packages/table/module/keyboard/mixin.ts +1 -3
  52. package/packages/table/src/body.ts +18 -15
  53. package/packages/table/src/methods.ts +54 -20
  54. package/packages/table/src/table.ts +23 -19
  55. package/packages/table/src/util.ts +7 -3
  56. package/packages/ui/index.ts +2 -1
  57. package/styles/components/table-module/custom.scss +14 -0
  58. /package/es/{iconfont.1774420912543.ttf → iconfont.1775652058165.ttf} +0 -0
  59. /package/es/{iconfont.1774420912543.woff → iconfont.1775652058165.woff} +0 -0
  60. /package/es/{iconfont.1774420912543.woff2 → iconfont.1775652058165.woff2} +0 -0
  61. /package/lib/{iconfont.1774420912543.ttf → iconfont.1775652058165.ttf} +0 -0
  62. /package/lib/{iconfont.1774420912543.woff → iconfont.1775652058165.woff} +0 -0
  63. /package/lib/{iconfont.1774420912543.woff2 → iconfont.1775652058165.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
2005
2005
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2006
2006
 
2007
2007
 
2008
- const version = "3.20.8";
2008
+ const version = "3.20.11";
2009
2009
  core_.VxeUI.version = version;
2010
2010
  core_.VxeUI.tableVersion = version;
2011
2011
  core_.VxeUI.setConfig({
@@ -2072,7 +2072,8 @@ core_.VxeUI.setConfig({
2072
2072
  strict: true
2073
2073
  },
2074
2074
  tooltipConfig: {
2075
- enterable: true
2075
+ enterable: true,
2076
+ defaultPlacement: 'top'
2076
2077
  },
2077
2078
  headerTooltipConfig: {
2078
2079
  enterable: true
@@ -2746,7 +2747,7 @@ function wheelScrollTopTo(diffNum, cb) {
2746
2747
  const {
2747
2748
  log: log_log
2748
2749
  } = core_.VxeUI;
2749
- const log_version = `table v${"3.20.8"}`;
2750
+ const log_version = `table v${"3.20.11"}`;
2750
2751
  const warnLog = log_log.create('warn', log_version);
2751
2752
  const errLog = log_log.create('error', log_version);
2752
2753
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -3064,6 +3065,8 @@ function createInternalData() {
3064
3065
  sourceDataRowIdData: {},
3065
3066
  fullColumnIdData: {},
3066
3067
  fullColumnFieldData: {},
3068
+ // 当前行
3069
+ currentRow: null,
3067
3070
  // 合并表头单元格的数据
3068
3071
  mergeHeaderList: [],
3069
3072
  mergeHeaderMaps: {},
@@ -3112,6 +3115,7 @@ function createInternalData() {
3112
3115
  tFooterHeight: 0,
3113
3116
  teleportToWrapperElem: null,
3114
3117
  popupToWrapperElem: null,
3118
+ customPopupToElem: null,
3115
3119
  lastSTime: 0,
3116
3120
  inited: false,
3117
3121
  tooltipTimeout: null,
@@ -3154,8 +3158,6 @@ function createReactData() {
3154
3158
  isAllSelected: false,
3155
3159
  // 复选框属性,有选中且非全选状态
3156
3160
  isIndeterminate: false,
3157
- // 当前行
3158
- currentRow: null,
3159
3161
  // 单选框属性,选中列
3160
3162
  currentColumn: null,
3161
3163
  // 单选框属性,选中行
@@ -3191,7 +3193,7 @@ function createReactData() {
3191
3193
  activeWrapper: false,
3192
3194
  visible: false,
3193
3195
  maxHeight: null,
3194
- popupTop: 0,
3196
+ popupStyle: {},
3195
3197
  oldSortMaps: {},
3196
3198
  oldFixedMaps: {},
3197
3199
  oldVisibleMaps: {}
@@ -3352,6 +3354,8 @@ function createReactData() {
3352
3354
  resizeHeightFlag: 1,
3353
3355
  resizeWidthFlag: 1,
3354
3356
  isCustomStatus: false,
3357
+ isCustomDragStatus: true,
3358
+ ctPopupFlag: 1,
3355
3359
  isCrossDragRow: false,
3356
3360
  dragRow: null,
3357
3361
  isCrossDragCol: false,
@@ -6302,7 +6306,7 @@ if(sortMultiple){tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_
6302
6306
  if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(firstOrderColumn.sortBy)){sortByConfs=firstOrderColumn.sortBy.map(item=>[item,firstOrderColumn.order]);}tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData,sortByConfs||[firstOrderColumn].map(({column,order})=>[getOrderField($xeTable,column),order]));}tableData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData,orderColumns.map(({column,order})=>[getOrderField($xeTable,column),order]));}tableTree=tableData;}}}else{if(isRowGroupStatus){// 还原行分组
6303
6307
  // 还原虚拟树
6304
6308
  tableTree=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(tableFullGroupData,()=>true,{original:true,isEvery:true,children:aggregateOpts.mapChildrenField,mapChildren:aggregateOpts.childrenField});tableData=tableTree;}else if(treeConfig&&transform&&isSortDeep!==false){// 还原虚拟树
6305
- 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($xeTable);}function updateStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{mouseConfig}=props;const{isGroup,currentRow,tableColumn,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isColLoading}=reactData;const{visibleColumn,tableHeight,elemStore,customHeight,customMinHeight,customMaxHeight,tHeaderHeight,tFooterHeight}=internalData;const $xeGanttView=internalData.xeGanttView;const el=$xeTable.$refs.refElem;if(!el||internalData.tBodyHeight&&!el.clientHeight){return;}const containerList=['main','left','right'];const{leftList,rightList}=columnStore;let osbWidth=overflowY?scrollbarWidth:0;let osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=$xeTable.$refs.refEmptyPlaceholder;const isHeaderRenderOptimize=$xeTable.computeIsHeaderRenderOptimize;const isBodyRenderOptimize=$xeTable.computeIsBodyRenderOptimize;const isFooterRenderOptimize=$xeTable.computeIsFooterRenderOptimize;const scrollbarOpts=$xeTable.computeScrollbarOpts;const mouseOpts=$xeTable.computeMouseOpts;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${tHeaderHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}const scrollbarXConf=scrollbarOpts.x||{};const scrollbarYConf=scrollbarOpts.y||{};const scrollbarYToLeft=$xeTable.computeScrollbarYToLeft;let xScrollbarVisible=overflowX?'visible':'hidden';if(scrollbarXConf.visible==='visible'||$xeGanttView){osbHeight=scrollbarHeight;xScrollbarVisible='visible';}else if(scrollbarXConf.visible==='hidden'||scrollbarXConf.visible===false){osbHeight=0;xScrollbarVisible='hidden';}let yScrollbarVisible=overflowY?'visible':'hidden';if(scrollbarYConf.visible==='hidden'||scrollbarYConf.visible===false||$xeGanttView&&!scrollbarYToLeft){osbWidth=0;yScrollbarVisible='hidden';}else if(scrollbarYConf.visible==='visible'){osbWidth=scrollbarWidth;yScrollbarVisible='visible';}let tbHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-tHeaderHeight-tFooterHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-tHeaderHeight-tFooterHeight-osbHeight);}if(customHeight){tbHeight=customHeight-tHeaderHeight-tFooterHeight-osbHeight;}if(!tbHeight){if(bodyTableElem){tbHeight=bodyTableElem.clientHeight;}}if(tbHeight){if(bodyMaxHeight){tbHeight=Math.min(bodyMaxHeight,tbHeight);}tbHeight=Math.max(bodyMinHeight,tbHeight);}const xLeftCornerEl=$xeTable.$refs.refScrollXLeftCornerElem;const xRightCornerEl=$xeTable.$refs.refScrollXRightCornerElem;const scrollXVirtualEl=$xeTable.$refs.refScrollXVirtualElem;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=xScrollbarVisible;}const xWrapperEl=$xeTable.$refs.refScrollXWrapperElem;if(xWrapperEl){xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;if(scrollbarYToLeft){xWrapperEl.style.left=`${osbWidth}px`;}else{xWrapperEl.style.left='';}}if(xLeftCornerEl){if(scrollbarYToLeft){xLeftCornerEl.style.width=`${osbWidth}px`;xLeftCornerEl.style.display=overflowY&&osbWidth?'block':'';}else{xLeftCornerEl.style.display='';}}if(xRightCornerEl){if(scrollbarYToLeft){xRightCornerEl.style.display='';}else{xRightCornerEl.style.width=`${osbWidth}px`;xRightCornerEl.style.display=xScrollbarVisible==='visible'?'block':'';}}const scrollYVirtualEl=$xeTable.$refs.refScrollYVirtualElem;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${tbHeight+tHeaderHeight+tFooterHeight}px`;scrollYVirtualEl.style.visibility=yScrollbarVisible;}const yTopCornerEl=$xeTable.$refs.refScrollYTopCornerElem;if(yTopCornerEl){yTopCornerEl.style.height=`${tHeaderHeight}px`;yTopCornerEl.style.display=tHeaderHeight&&yScrollbarVisible==='visible'?'block':'';}const yWrapperEl=$xeTable.$refs.refScrollYWrapperElem;if(yWrapperEl){yWrapperEl.style.height=`${tbHeight}px`;yWrapperEl.style.top=`${tHeaderHeight}px`;}const yBottomCornerEl=$xeTable.$refs.refScrollYBottomCornerElem;if(yBottomCornerEl){yBottomCornerEl.style.height=`${tFooterHeight}px`;yBottomCornerEl.style.top=`${tHeaderHeight+tbHeight}px`;yBottomCornerEl.style.display=tFooterHeight&&yScrollbarVisible==='visible'?'block':'';}const rowExpandEl=$xeTable.$refs.refRowExpandElem;if(rowExpandEl){rowExpandEl.style.height=`${tbHeight}px`;rowExpandEl.style.top=`${tHeaderHeight}px`;}internalData.tBodyHeight=tbHeight;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?leftList:rightList;fixedWrapperElem=isFixedLeft?$xeTable.$refs.refLeftContainer:$xeTable.$refs.refRightContainer;}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'){// 表头体样式处理
6309
+ 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($xeTable);}function updateStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{mouseConfig}=props;const{isGroup,tableColumn,overflowX,scrollbarWidth,overflowY,scrollbarHeight,scrollXWidth,columnStore,editStore,isColLoading}=reactData;const{visibleColumn,tableHeight,elemStore,currentRow,customHeight,customMinHeight,customMaxHeight,tHeaderHeight,tFooterHeight}=internalData;const $xeGanttView=internalData.xeGanttView;const el=$xeTable.$refs.refElem;if(!el||internalData.tBodyHeight&&!el.clientHeight){return;}const containerList=['main','left','right'];const{leftList,rightList}=columnStore;let osbWidth=overflowY?scrollbarWidth:0;let osbHeight=overflowX?scrollbarHeight:0;const emptyPlaceholderElem=$xeTable.$refs.refEmptyPlaceholder;const isHeaderRenderOptimize=$xeTable.computeIsHeaderRenderOptimize;const isBodyRenderOptimize=$xeTable.computeIsBodyRenderOptimize;const isFooterRenderOptimize=$xeTable.computeIsFooterRenderOptimize;const scrollbarOpts=$xeTable.computeScrollbarOpts;const mouseOpts=$xeTable.computeMouseOpts;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const bodyTableElem=getRefElem(elemStore['main-body-table']);if(emptyPlaceholderElem){emptyPlaceholderElem.style.top=`${tHeaderHeight}px`;emptyPlaceholderElem.style.height=bodyWrapperElem?`${bodyWrapperElem.offsetHeight-osbHeight}px`:'';}const scrollbarXConf=scrollbarOpts.x||{};const scrollbarYConf=scrollbarOpts.y||{};const scrollbarYToLeft=$xeTable.computeScrollbarYToLeft;let xScrollbarVisible=overflowX?'visible':'hidden';if(scrollbarXConf.visible==='visible'||$xeGanttView){osbHeight=scrollbarHeight;xScrollbarVisible='visible';}else if(scrollbarXConf.visible==='hidden'||scrollbarXConf.visible===false){osbHeight=0;xScrollbarVisible='hidden';}let yScrollbarVisible=overflowY?'visible':'hidden';if(scrollbarYConf.visible==='hidden'||scrollbarYConf.visible===false||$xeGanttView&&!scrollbarYToLeft){osbWidth=0;yScrollbarVisible='hidden';}else if(scrollbarYConf.visible==='visible'){osbWidth=scrollbarWidth;yScrollbarVisible='visible';}let tbHeight=0;let bodyMaxHeight=0;const bodyMinHeight=customMinHeight-tHeaderHeight-tFooterHeight-osbHeight;if(customMaxHeight){bodyMaxHeight=Math.max(bodyMinHeight,customMaxHeight-tHeaderHeight-tFooterHeight-osbHeight);}if(customHeight){tbHeight=customHeight-tHeaderHeight-tFooterHeight-osbHeight;}if(!tbHeight){if(bodyTableElem){tbHeight=bodyTableElem.clientHeight;}}if(tbHeight){if(bodyMaxHeight){tbHeight=Math.min(bodyMaxHeight,tbHeight);}tbHeight=Math.max(bodyMinHeight,tbHeight);}const xLeftCornerEl=$xeTable.$refs.refScrollXLeftCornerElem;const xRightCornerEl=$xeTable.$refs.refScrollXRightCornerElem;const scrollXVirtualEl=$xeTable.$refs.refScrollXVirtualElem;if(scrollXVirtualEl){scrollXVirtualEl.style.height=`${osbHeight}px`;scrollXVirtualEl.style.visibility=xScrollbarVisible;}const xWrapperEl=$xeTable.$refs.refScrollXWrapperElem;if(xWrapperEl){xWrapperEl.style.width=`${el.clientWidth-osbWidth}px`;if(scrollbarYToLeft){xWrapperEl.style.left=`${osbWidth}px`;}else{xWrapperEl.style.left='';}}if(xLeftCornerEl){if(scrollbarYToLeft){xLeftCornerEl.style.width=`${osbWidth}px`;xLeftCornerEl.style.display=overflowY&&osbWidth?'block':'';}else{xLeftCornerEl.style.display='';}}if(xRightCornerEl){if(scrollbarYToLeft){xRightCornerEl.style.display='';}else{xRightCornerEl.style.width=`${osbWidth}px`;xRightCornerEl.style.display=xScrollbarVisible==='visible'?'block':'';}}const scrollYVirtualEl=$xeTable.$refs.refScrollYVirtualElem;if(scrollYVirtualEl){scrollYVirtualEl.style.width=`${osbWidth}px`;scrollYVirtualEl.style.height=`${tbHeight+tHeaderHeight+tFooterHeight}px`;scrollYVirtualEl.style.visibility=yScrollbarVisible;}const yTopCornerEl=$xeTable.$refs.refScrollYTopCornerElem;if(yTopCornerEl){yTopCornerEl.style.height=`${tHeaderHeight}px`;yTopCornerEl.style.display=tHeaderHeight&&yScrollbarVisible==='visible'?'block':'';}const yWrapperEl=$xeTable.$refs.refScrollYWrapperElem;if(yWrapperEl){yWrapperEl.style.height=`${tbHeight}px`;yWrapperEl.style.top=`${tHeaderHeight}px`;}const yBottomCornerEl=$xeTable.$refs.refScrollYBottomCornerElem;if(yBottomCornerEl){yBottomCornerEl.style.height=`${tFooterHeight}px`;yBottomCornerEl.style.top=`${tHeaderHeight+tbHeight}px`;yBottomCornerEl.style.display=tFooterHeight&&yScrollbarVisible==='visible'?'block':'';}const rowExpandEl=$xeTable.$refs.refRowExpandElem;if(rowExpandEl){rowExpandEl.style.height=`${tbHeight}px`;rowExpandEl.style.top=`${tHeaderHeight}px`;}internalData.tBodyHeight=tbHeight;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?leftList:rightList;fixedWrapperElem=isFixedLeft?$xeTable.$refs.refLeftContainer:$xeTable.$refs.refRightContainer;}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'){// 表头体样式处理
6306
6310
  // 横向滚动渲染
6307
6311
  let renderColumnList=tableColumn;const isOptimizeMode=isHeaderRenderOptimize;if(isGroup){renderColumnList=visibleColumn;}else{if(!isOptimizeMode||!isColLoading&&(fixedType||!overflowX)){renderColumnList=visibleColumn;}if(fixedType){// 如果是使用优化模式
6308
6312
  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=`${tHeaderHeight}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?`${tbHeight}px`:'';currScrollElem.style.minHeight=`${bodyMinHeight}px`;}// 如果是固定列
@@ -6347,13 +6351,13 @@ if(treeConfig||isRowGroupStatus){external_root_XEUtils_commonjs_xe_utils_commonj
6347
6351
  * 如果方法成立,则不添加到临时集合中;如果方法不成立则判断当前是否已勾选,如果已被勾选则添加到新集合中
6348
6352
  * 如果不存在选中方法,无需处理,临时集合默认为空
6349
6353
  */if(!isForce&&checkMethod){afterFullData.forEach(row=>{const rowid=handleGetRowId(row);if(checkMethod({$table:$xeTable,row})?false:selectCheckboxMaps[rowid]){selectRowMaps[rowid]=row;}});}}}}if(reserve){if(checked){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectRowMaps,(row,rowid)=>{checkboxReserveRowMap[rowid]=row;});}else{afterFullData.forEach(row=>handleCheckboxReserveRow($xeTable,row,false));}}reactData.updateCheckboxFlag++;internalData.selectCheckboxMaps=checkField?{}:selectRowMaps;reactData.isAllSelected=checked;reactData.isIndeterminate=false;internalData.treeIndeterminateRowMaps={};$xeTable.checkSelectionStatus();return $xeTable.$nextTick();}// 还原展开、选中等相关状态
6350
- function handleReserveStatus($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{expandColumn,currentRow,selectRadioRow}=reactData;const{fullDataRowIdData,fullAllDataRowIdData,radioReserveRow,selectCheckboxMaps,treeExpandedMaps,rowExpandedMaps}=internalData;const expandOpts=$xeTable.computeExpandOpts;const treeOpts=$xeTable.computeTreeOpts;const radioOpts=$xeTable.computeRadioOpts;const checkboxOpts=$xeTable.computeCheckboxOpts;// 单选框
6354
+ function handleReserveStatus($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{expandColumn,selectRadioRow}=reactData;const{fullDataRowIdData,fullAllDataRowIdData,radioReserveRow,selectCheckboxMaps,treeExpandedMaps,rowExpandedMaps,currentRow}=internalData;const expandOpts=$xeTable.computeExpandOpts;const treeOpts=$xeTable.computeTreeOpts;const radioOpts=$xeTable.computeRadioOpts;const checkboxOpts=$xeTable.computeCheckboxOpts;// 单选框
6351
6355
  if(selectRadioRow&&!fullAllDataRowIdData[getRowid($xeTable,selectRadioRow)]){reactData.selectRadioRow=null;// 刷新单选行状态
6352
6356
  }// 还原保留选中状态
6353
6357
  if(radioOpts.reserve&&radioReserveRow){const rowid=getRowid($xeTable,radioReserveRow);if(fullDataRowIdData[rowid]){handleCheckedRadioRow($xeTable,fullDataRowIdData[rowid].row,true);}}// 复选框
6354
6358
  internalData.selectCheckboxMaps=getRecoverRowMaps($xeTable,selectCheckboxMaps);// 刷新多选行状态
6355
6359
  reactData.updateCheckboxFlag++;// 还原保留选中状态
6356
- if(checkboxOpts.reserve){handleCheckedCheckboxRow($xeTable,handleReserveRow($xeTable,internalData.checkboxReserveRowMap),true,true);}if(currentRow&&!fullAllDataRowIdData[getRowid($xeTable,currentRow)]){reactData.currentRow=null;// 刷新当前行状态
6360
+ if(checkboxOpts.reserve){handleCheckedCheckboxRow($xeTable,handleReserveRow($xeTable,internalData.checkboxReserveRowMap),true,true);}if(currentRow&&!fullAllDataRowIdData[getRowid($xeTable,currentRow)]){internalData.currentRow=null;// 刷新当前行状态
6357
6361
  }// 行展开
6358
6362
  internalData.rowExpandedMaps=expandColumn?getRecoverRowMaps($xeTable,rowExpandedMaps):{};// 刷新行展开状态
6359
6363
  reactData.rowExpandedFlag++;// 还原保留状态
@@ -6397,7 +6401,7 @@ function computeScrollLoad($xeTable){const reactData=$xeTable;const internalData
6397
6401
  if(scrollXLoad){const{toVisibleIndex:toXVisibleIndex,visibleSize:visibleXSize}=handleVirtualXVisible($xeTable);const offsetXSize=Math.max(0,virtualXOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.oSize):0);scrollXStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.preSize);scrollXStore.offsetSize=offsetXSize;scrollXStore.visibleSize=visibleXSize;scrollXStore.endIndex=Math.max(scrollXStore.startIndex+scrollXStore.visibleSize+offsetXSize,scrollXStore.endIndex);scrollXStore.visibleStartIndex=Math.max(scrollXStore.startIndex,toXVisibleIndex);scrollXStore.visibleEndIndex=Math.min(scrollXStore.endIndex,toXVisibleIndex+visibleXSize);$xeTable.updateScrollXData().then(()=>{loadScrollXData($xeTable);});}else{$xeTable.updateScrollXSpace();}// 计算 Y 逻辑
6398
6402
  const rowHeight=computeRowHeight($xeTable);scrollYStore.rowHeight=rowHeight;// 已废弃
6399
6403
  reactData.rowHeight=rowHeight;const{toVisibleIndex:toYVisibleIndex,visibleSize:visibleYSize}=handleVirtualYVisible($xeTable);if(scrollYLoad){const offsetYSize=Math.max(0,virtualYOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.oSize):0);scrollYStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.preSize);scrollYStore.offsetSize=offsetYSize;scrollYStore.visibleSize=visibleYSize;scrollYStore.endIndex=Math.max(scrollYStore.startIndex+visibleYSize+offsetYSize,scrollYStore.endIndex);scrollYStore.visibleStartIndex=Math.max(scrollYStore.startIndex,toYVisibleIndex);scrollYStore.visibleEndIndex=Math.min(scrollYStore.endIndex,toYVisibleIndex+visibleYSize);$xeTable.updateScrollYData().then(()=>{loadScrollYData($xeTable);});}else{$xeTable.updateScrollYSpace();}});}function calcScrollbar($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{scrollXWidth,scrollYHeight}=reactData;const{elemStore}=internalData;const scrollbarOpts=$xeTable.computeScrollbarOpts;const bodyWrapperElem=getRefElem(elemStore['main-body-wrapper']);const headerTableElem=getRefElem(elemStore['main-header-table']);const footerTableElem=getRefElem(elemStore['main-footer-table']);const xHandleEl=$xeTable.$refs.refScrollXHandleElem;const yHandleEl=$xeTable.$refs.refScrollYHandleElem;let overflowY=false;let overflowX=false;if(bodyWrapperElem){overflowY=scrollYHeight>bodyWrapperElem.clientHeight;if(yHandleEl){reactData.scrollbarWidth=scrollbarOpts.width||yHandleEl.offsetWidth-yHandleEl.clientWidth||14;}reactData.overflowY=overflowY;overflowX=scrollXWidth>bodyWrapperElem.clientWidth;if(xHandleEl){reactData.scrollbarHeight=scrollbarOpts.height||xHandleEl.offsetHeight-xHandleEl.clientHeight||14;}reactData.overflowX=overflowX;const hHeight=headerTableElem?headerTableElem.clientHeight:0;const fHeight=footerTableElem?footerTableElem.clientHeight:0;internalData.tableHeight=bodyWrapperElem.offsetHeight;internalData.tHeaderHeight=hHeight;internalData.tFooterHeight=fHeight;reactData.overflowX=overflowX;reactData.parentHeight=Math.max(hHeight+fHeight+20,$xeTable.getParentHeight());}if(overflowX){$xeTable.checkScrolling();}}function handleRecalculateStyle($xeTable,reFull,reWidth,reHeight){const internalData=$xeTable;const el=$xeTable.$refs.refElem;internalData.rceRunTime=Date.now();if(!el||!el.clientWidth){return $xeTable.$nextTick();}const varEl=$xeTable.$refs.refVarElem;if(varEl){const[defEl,mediumEl,smallEl,miniEl]=varEl.children;calcVarRowHeightConfig($xeTable,'default',defEl);calcVarRowHeightConfig($xeTable,'medium',mediumEl);calcVarRowHeightConfig($xeTable,'small',smallEl);calcVarRowHeightConfig($xeTable,'mini',miniEl);}if(reWidth){calcCellWidth($xeTable);}if(reFull){autoCellWidth($xeTable);}calcScrollbar($xeTable);updateStyle($xeTable);updateRowExpandStyle($xeTable);if(reFull){updateTreeLineStyle($xeTable);}return computeScrollLoad($xeTable).then(()=>{// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
6400
- if(reWidth){calcCellWidth($xeTable);}if(reFull){autoCellWidth($xeTable);}if(reHeight){calcCellHeight($xeTable);}updateStyle($xeTable);calcScrollbar($xeTable);if(reFull){updateRowOffsetTop($xeTable);}updateRowExpandStyle($xeTable);if(reFull){updateTreeLineStyle($xeTable);}if(reFull){return computeScrollLoad($xeTable);}});}function handleLazyRecalculate($xeTable,reFull,reWidth,reHeight){const internalData=$xeTable;return new Promise(resolve=>{const{rceTimeout,rceRunTime}=internalData;const $xeGanttView=internalData.xeGanttView;const resizeOpts=$xeTable.computeResizeOpts;const refreshDelay=resizeOpts.refreshDelay||20;const el=$xeTable.$refs.refElem;if(el&&el.clientWidth){autoCellWidth($xeTable);updateRowExpandStyle($xeTable);}if(rceTimeout){clearTimeout(rceTimeout);if(rceRunTime&&rceRunTime+(refreshDelay-5)<Date.now()){resolve(handleRecalculateStyle($xeTable,reFull,reWidth,reHeight));}else{$xeTable.$nextTick(()=>{resolve();});}}else{resolve(handleRecalculateStyle($xeTable,reFull,reWidth,reHeight));}if($xeGanttView&&$xeGanttView.handleLazyRecalculate){$xeGanttView.handleLazyRecalculate();}internalData.rceTimeout=setTimeout(()=>{internalData.rceTimeout=undefined;handleRecalculateStyle($xeTable,reFull,reWidth,reHeight);},refreshDelay);});}function handleResizeEvent($xeTable){handleLazyRecalculate($xeTable,true,true,true);}function handleUpdateAggValues($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{visibleColumn}=internalData;const aggCols=[];visibleColumn.forEach(column=>{if(column.aggFunc){aggCols.push(column);}});reactData.aggHandleAggColumns=aggCols;}function handleUpdateRowGroup($xeTable,groupFields){const reactData=$xeTable;const aggGroupFields=[];const aggGroupConfs=[];if(groupFields){(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)?groupFields:[groupFields]).forEach(field=>{aggGroupFields.push(field);aggGroupConfs.push({field});});}reactData.rowGroupList=aggGroupConfs;reactData.aggHandleFields=aggGroupFields;handleUpdateAggValues($xeTable);}function handleeGroupSummary($xeTable,aggList){const internalData=$xeTable;const{fullColumnFieldData}=internalData;const aggregateOpts=$xeTable.computeAggregateOpts;const aggFuncColumns=$xeTable.computeAggFuncColumns;const{mapChildrenField}=aggregateOpts;const aggCalcMethod=aggregateOpts.calcValuesMethod||aggregateOpts.countMethod||aggregateOpts.aggregateMethod;if(mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{let count=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(aggRow[mapChildrenField],row=>{if(row.isAggregate){count+=row.childCount||0;}else{count++;}});aggRow.childCount=count;});if($xeTable.handlePivotTableAggregateData){$xeTable.handlePivotTableAggregateData(aggList);}else{external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{const aggDtObj={};const aggData=aggRow.aggData;const groupField=aggRow.groupField;const groupContent=aggRow.groupContent;const childList=mapChildrenField?aggRow[mapChildrenField]||[]:[];const childCount=aggRow.childCount;const colRest=fullColumnFieldData[groupField]||{};aggFuncColumns.forEach(column=>{const{field}=column;const currAggData=aggData?aggData[field]:null;const ctParams={$table:$xeTable,groupField,groupColumn:colRest?colRest.column:null,column,groupValue:groupContent,childList,childCount,aggValue:currAggData?currAggData.value:0,/**
6404
+ if(reWidth){calcCellWidth($xeTable);}if(reFull){autoCellWidth($xeTable);}if(reHeight){calcCellHeight($xeTable);}updateStyle($xeTable);calcScrollbar($xeTable);if(reFull){updateRowOffsetTop($xeTable);}updateRowExpandStyle($xeTable);if(reFull){updateTreeLineStyle($xeTable);}if(reFull){return computeScrollLoad($xeTable);}});}function handleLazyRecalculate($xeTable,reFull,reWidth,reHeight){const reactData=$xeTable;const internalData=$xeTable;return new Promise(resolve=>{const{customStore}=reactData;const{rceTimeout,rceRunTime}=internalData;const $xeGanttView=internalData.xeGanttView;const resizeOpts=$xeTable.computeResizeOpts;const refreshDelay=resizeOpts.refreshDelay||20;const el=$xeTable.$refs.refElem;if(el&&el.clientWidth){autoCellWidth($xeTable);updateRowExpandStyle($xeTable);}if(customStore.visible&&$xeTable.handleCustomStyle){$xeTable.handleCustomStyle();}if(rceTimeout){clearTimeout(rceTimeout);if(rceRunTime&&rceRunTime+(refreshDelay-5)<Date.now()){resolve(handleRecalculateStyle($xeTable,reFull,reWidth,reHeight));}else{$xeTable.$nextTick(()=>{resolve();});}}else{resolve(handleRecalculateStyle($xeTable,reFull,reWidth,reHeight));}if($xeGanttView&&$xeGanttView.handleLazyRecalculate){$xeGanttView.handleLazyRecalculate();}internalData.rceTimeout=setTimeout(()=>{internalData.rceTimeout=undefined;handleRecalculateStyle($xeTable,reFull,reWidth,reHeight);},refreshDelay);});}function handleResizeEvent($xeTable){handleLazyRecalculate($xeTable,true,true,true);}function handleUpdateAggValues($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{visibleColumn}=internalData;const aggCols=[];visibleColumn.forEach(column=>{if(column.aggFunc){aggCols.push(column);}});reactData.aggHandleAggColumns=aggCols;}function handleUpdateRowGroup($xeTable,groupFields){const reactData=$xeTable;const aggGroupFields=[];const aggGroupConfs=[];if(groupFields){(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(groupFields)?groupFields:[groupFields]).forEach(field=>{aggGroupFields.push(field);aggGroupConfs.push({field});});}reactData.rowGroupList=aggGroupConfs;reactData.aggHandleFields=aggGroupFields;handleUpdateAggValues($xeTable);}function handleeGroupSummary($xeTable,aggList){const internalData=$xeTable;const{fullColumnFieldData}=internalData;const aggregateOpts=$xeTable.computeAggregateOpts;const aggFuncColumns=$xeTable.computeAggFuncColumns;const{mapChildrenField}=aggregateOpts;const aggCalcMethod=aggregateOpts.calcValuesMethod||aggregateOpts.countMethod||aggregateOpts.aggregateMethod;if(mapChildrenField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{let count=0;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(aggRow[mapChildrenField],row=>{if(row.isAggregate){count+=row.childCount||0;}else{count++;}});aggRow.childCount=count;});if($xeTable.handlePivotTableAggregateData){$xeTable.handlePivotTableAggregateData(aggList);}else{external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(aggList,aggRow=>{const aggDtObj={};const aggData=aggRow.aggData;const groupField=aggRow.groupField;const groupContent=aggRow.groupContent;const childList=mapChildrenField?aggRow[mapChildrenField]||[]:[];const childCount=aggRow.childCount;const colRest=fullColumnFieldData[groupField]||{};aggFuncColumns.forEach(column=>{const{field}=column;const currAggData=aggData?aggData[field]:null;const ctParams={$table:$xeTable,groupField,groupColumn:colRest?colRest.column:null,column,groupValue:groupContent,childList,childCount,aggValue:currAggData?currAggData.value:0,/**
6401
6405
  * 已废弃
6402
6406
  * @deprecated
6403
6407
  */children:childList,/**
@@ -6476,7 +6480,7 @@ if(expandColumn&&rowExpandedMaps[rowid]){offsetTop+=rowRest.expandHeight||expand
6476
6480
  * 更新展开行样式
6477
6481
  */function updateRowExpandStyle($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{expandColumn,scrollYLoad,scrollYTop,isScrollYBig}=reactData;const expandOpts=$xeTable.computeExpandOpts;const rowOpts=$xeTable.computeRowOpts;const cellOpts=$xeTable.computeCellOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const{mode}=expandOpts;if(expandColumn&&mode==='fixed'){const{elemStore,fullAllDataRowIdData}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){let isUpdateHeight=false;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(rowExpandEl.children,reEl=>{const expandEl=reEl;const rowid=expandEl.getAttribute('rowid')||'';const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const expandHeight=expandEl.offsetHeight;const trEl=bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);let offsetTop=0;if(scrollYLoad){if(isScrollYBig&&trEl){offsetTop=trEl.offsetTop+trEl.offsetHeight;}else{offsetTop=rowRest.oTop+(rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight);}}else{if(trEl){offsetTop=trEl.offsetTop+trEl.offsetHeight;}}if(isScrollYBig){offsetTop+=scrollYTop;}expandEl.style.top=toCssUnit(offsetTop);if(!isUpdateHeight){if(rowRest.expandHeight!==expandHeight){isUpdateHeight=true;}}rowRest.expandHeight=expandHeight;}});if(isUpdateHeight){reactData.rowExpandHeightFlag++;$xeTable.$nextTick(()=>{updateRowOffsetTop($xeTable);});}}}}/**
6478
6482
  * 更新树连接线样式
6479
- */function updateTreeLineStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;if(!treeConfig){return;}const{tableData}=reactData;const{fullAllDataRowIdData,treeExpandedMaps}=internalData;const cellOpts=$xeTable.computeCellOpts;const rowOpts=$xeTable.computeRowOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const{handleGetRowId}=createHandleGetRowId($xeTable);const expParentList=[];const handleNodeRow=(row,rIndex,rows)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};const childList=row[transform?mapChildrenField:childrenField];const prevRow=rows[rIndex-1]||null;const nextRow=rows[rIndex+1]||null;if(childList&&childList.length&&treeExpandedMaps[rowid]){expParentList.push({row,prevRow,nextRow});childList.forEach((childRow,crIndex)=>{const childRowid=handleGetRowId(childRow);if(treeExpandedMaps[childRowid]){handleNodeRow(childRow,crIndex,childList);}});}else{if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);rowRest.oHeight=currCellHeight;rowRest.lineHeight=Math.floor(currCellHeight/2+nextCellHeight/2);}else{rowRest.oHeight=0;rowRest.lineHeight=0;}}};tableData.forEach((row,rIndex)=>{handleNodeRow(row,rIndex,tableData);});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastArrayEach(expParentList,({row,nextRow})=>{const rowid=handleGetRowId(row);const childList=row[transform?mapChildrenField:childrenField];const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);let countOffsetHeight=currCellHeight;let countLineHeight=0;childList.forEach(childRow=>{const childRowid=handleGetRowId(childRow);const childRowRest=fullAllDataRowIdData[childRowid]||{};const childList=childRow[transform?mapChildrenField:childrenField];if(treeExpandedMaps[childRowid]&&childList&&childList.length){countOffsetHeight+=childRowRest.oHeight||0;countLineHeight+=childRowRest.oHeight||0;}else{const cellHeight=getCellRestHeight(childRowRest,cellOpts,rowOpts,defaultRowHeight);childRowRest.oHeight=cellHeight;childRowRest.lineHeight=cellHeight;countOffsetHeight+=cellHeight;countLineHeight+=cellHeight;}});if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);countOffsetHeight+=currCellHeight;countLineHeight+=Math.floor(currCellHeight/2+nextCellHeight/2);}rowRest.lineHeight=countLineHeight;rowRest.oHeight=countOffsetHeight;}});}function handleRowExpandScroll($xeTable){const internalData=$xeTable;const{elemStore}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){rowExpandEl.scrollTop=bodyScrollElem.scrollTop;}}function handleColumnVisible(visible){return function(fieldOrColumn){const $xeTable=this;let status=false;const cols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumn)?fieldOrColumn:[fieldOrColumn];cols.forEach(item=>{const column=handleFieldOrColumn($xeTable,item);if(column){if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column],item=>{item.visible=visible;item.renderVisible=visible;});}else{column.visible=visible;column.renderVisible=visible;}if(!status){status=true;}}});if(status){return $xeTable.handleCustom();}return $xeTable.$nextTick();};}const tableMethods={callSlot(slotFunc,params,h,vNodes){const $xeTable=this;// const slots = $xeTable.$scopedSlots
6483
+ */function updateTreeLineStyle($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;if(!treeConfig){return;}const{tableData}=reactData;const{fullAllDataRowIdData,treeExpandedMaps}=internalData;const cellOpts=$xeTable.computeCellOpts;const rowOpts=$xeTable.computeRowOpts;const defaultRowHeight=$xeTable.computeDefaultRowHeight;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const{handleGetRowId}=createHandleGetRowId($xeTable);const expParentList=[];const handleNodeRow=(row,rIndex,rows)=>{const rowid=handleGetRowId(row);const rowRest=fullAllDataRowIdData[rowid]||{};const childList=row[transform?mapChildrenField:childrenField];const prevRow=rows[rIndex-1]||null;const nextRow=rows[rIndex+1]||null;if(childList&&childList.length&&treeExpandedMaps[rowid]){expParentList.push({row,prevRow,nextRow});childList.forEach((childRow,crIndex)=>{const childRowid=handleGetRowId(childRow);if(treeExpandedMaps[childRowid]){handleNodeRow(childRow,crIndex,childList);}});}else{if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);rowRest.oHeight=currCellHeight;rowRest.lineHeight=Math.floor(currCellHeight/2+nextCellHeight/2);}else{rowRest.oHeight=0;rowRest.lineHeight=0;}}};tableData.forEach((row,rIndex)=>{handleNodeRow(row,rIndex,tableData);});external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastArrayEach(expParentList,({row,nextRow})=>{const rowid=handleGetRowId(row);const childList=row[transform?mapChildrenField:childrenField];const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);let countOffsetHeight=currCellHeight;let countLineHeight=0;childList.forEach(childRow=>{const childRowid=handleGetRowId(childRow);const childRowRest=fullAllDataRowIdData[childRowid]||{};const childList=childRow[transform?mapChildrenField:childrenField];if(treeExpandedMaps[childRowid]&&childList&&childList.length){countOffsetHeight+=childRowRest.oHeight||0;countLineHeight+=childRowRest.oHeight||0;}else{const cellHeight=getCellRestHeight(childRowRest,cellOpts,rowOpts,defaultRowHeight);childRowRest.oHeight=cellHeight;childRowRest.lineHeight=cellHeight;countOffsetHeight+=cellHeight;countLineHeight+=cellHeight;}});if(nextRow){const nextRowid=handleGetRowId(nextRow);const nextRowRest=fullAllDataRowIdData[nextRowid]||{};const currCellHeight=getCellRestHeight(rowRest,cellOpts,rowOpts,defaultRowHeight);const nextCellHeight=getCellRestHeight(nextRowRest,cellOpts,rowOpts,defaultRowHeight);countOffsetHeight+=currCellHeight;countLineHeight+=Math.floor(currCellHeight/2+nextCellHeight/2);}rowRest.lineHeight=countLineHeight;rowRest.oHeight=countOffsetHeight;}});}function handleRowExpandScroll($xeTable){const internalData=$xeTable;const{elemStore}=internalData;const rowExpandEl=$xeTable.$refs.refRowExpandElem;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(rowExpandEl&&bodyScrollElem){rowExpandEl.scrollTop=bodyScrollElem.scrollTop;}}function handleColumnVisible(visible){return function(fieldOrColumn){const $xeTable=this;let status=false;const cols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrColumn)?fieldOrColumn:[fieldOrColumn];cols.forEach(item=>{const column=handleFieldOrColumn($xeTable,item);if(column){if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column],item=>{item.visible=visible;item.renderVisible=visible;});}else{column.visible=visible;column.renderVisible=visible;}if(!status){status=true;}}});if(status){return $xeTable.handleCustom();}return $xeTable.$nextTick();};}function reUpdateCustomStyleEvent($xeTable,evnt){const reactData=$xeTable;const{customStore}=reactData;const customOpts=$xeTable.computeCustomOpts;const{popupOptions}=customOpts;const{transfer}=popupOptions||{};if(transfer&&customStore.visible){const tableCustom=$xeTable.$refs.refTableCustom;if(tableCustom&&$xeTable.handleCustomStyle&&!checkTargetElement(evnt.target,[tableCustom.$el],evnt.currentTarget)){$xeTable.handleCustomStyle().then(()=>{$xeTable.handleCustomStyle();});}}}const tableMethods={callSlot(slotFunc,params,h,vNodes){const $xeTable=this;// const slots = $xeTable.$scopedSlots
6480
6484
  const $xeGrid=$xeTable.$xeGrid;const $xeGantt=$xeTable.$xeGantt;const $xeGGWrapper=$xeGrid||$xeGantt;if(slotFunc){if($xeGGWrapper){return $xeGGWrapper.callSlot(slotFunc,params,h);}// if (XEUtils.isString(slotFunc)) {
6481
6485
  // slotFunc = slots[slotFunc] || null
6482
6486
  // }
@@ -6720,9 +6724,9 @@ if(ctxMenuStore.visible&&tableMenu&&!getEventTargetNode(evnt,tableMenu.$el).flag
6720
6724
  if(!isActivated&&editRules&&validOpts.autoClear){reactData.validErrorMaps={};}// 最后激活的表格
6721
6725
  internalData.isActivated=isActivated;}},/**
6722
6726
  * 窗口失焦事件处理
6723
- */handleGlobalBlurEvent(){const $xeTable=this;$xeTable.closeFilter();$xeTable.closeMenu();},/**
6727
+ */handleGlobalBlurEvent(){const $xeTable=this;$xeTable.closeFilter();$xeTable.closeMenu();},handleGlobalScrollEvent(evnt){const $xeTable=this;reUpdateCustomStyleEvent($xeTable,evnt);},/**
6724
6728
  * 全局滚动事件
6725
- */handleGlobalMousewheelEvent(){const $xeTable=this;$xeTable.closeTooltip();$xeTable.closeMenu();},/**
6729
+ */handleGlobalMousewheelEvent(){const $xeTable=this;$xeTable.closeTooltip();if($xeTable.closeMenu){$xeTable.closeMenu();}},/**
6726
6730
  * 表格键盘事件
6727
6731
  */keydownEvent(evnt){const $xeTable=this;const{filterStore,ctxMenuStore,editStore,keyboardConfig,mouseConfig,mouseOpts,keyboardOpts}=this;const{actived}=editStore;const{keyCode}=evnt;const isEsc=keyCode===27;if(isEsc){this.preventEvent(evnt,'event.keydown',null,()=>{$xeTable.dispatchEvent('keydown-start',{},evnt);if(keyboardConfig&&mouseConfig&&mouseOpts.area&&this.handleKeyboardCellAreaEvent){this.handleKeyboardCellAreaEvent(evnt);}else if(actived.row||filterStore.visible||ctxMenuStore.visible){evnt.stopPropagation();// 如果按下了 Esc 键,关闭快捷菜单、筛选
6728
6732
  this.closeFilter();this.closeMenu();if(keyboardConfig&&keyboardOpts.isEsc){// 如果是激活编辑状态,则取消编辑
@@ -6730,7 +6734,7 @@ if(actived.row){const params=actived.args;this.handleClearEdit(evnt);// 如果
6730
6734
  if(mouseConfig&&mouseOpts.selected){this.$nextTick(()=>this.handleSelected(params,evnt));}}}}$xeTable.dispatchEvent('keydown',{},evnt);$xeTable.dispatchEvent('keydown-end',{},evnt);});}},contextMenuEvent(evnt){const $xeTable=this;$xeTable.dispatchEvent('context-menu',{},evnt);},/**
6731
6735
  * 全局键盘事件
6732
6736
  */handleGlobalKeydownEvent(evnt){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const reactData=$xeTable;const $xeGrid=$xeTable.$xeGrid;const $xeGantt=$xeTable.$xeGantt;// 该行为只对当前激活的表格有效
6733
- if(internalData.isActivated){$xeTable.preventEvent(evnt,'event.keydown',null,()=>{const{mouseConfig,keyboardConfig,treeConfig,editConfig,highlightCurrentRow,highlightCurrentColumn}=props;const{ctxMenuStore,editStore,currentRow}=reactData;const{afterFullData,visibleColumn}=internalData;const isContentMenu=$xeTable.computeIsContentMenu;const bodyMenu=$xeTable.computeBodyMenu;const keyboardOpts=$xeTable.computeKeyboardOpts;const mouseOpts=$xeTable.computeMouseOpts;const editOpts=$xeTable.computeEditOpts;const treeOpts=$xeTable.computeTreeOpts;const menuList=$xeTable.computeMenuList;const rowOpts=$xeTable.computeRowOpts;const columnOpts=$xeTable.computeColumnOpts;const{isLastEnterAppendRow,beforeEnterMethod,enterMethod,isLastTabAppendRow,beforeTabMethod,tabMethod}=keyboardOpts;const{selected,actived}=editStore;const{keyCode}=evnt;const hasBackspaceKey=keyCode===8;const isTab=keyCode===9;const isEnter=keyCode===13;const isEsc=keyCode===27;const isSpacebar=keyCode===32;const isLeftArrow=keyCode===37;const isUpArrow=keyCode===38;const isRightArrow=keyCode===39;const isDwArrow=keyCode===40;const hasDeleteKey=keyCode===46;const isF2=keyCode===113;const isContextMenu=keyCode===93;const isControlKey=hasControlKey(evnt);const hasShiftKey=evnt.shiftKey;const hasAltKey=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 childrenField=treeOpts.children||treeOpts.childrenField;const beforeEditMethod=editOpts.beforeEditMethod||editOpts.activeMethod;if(operCtxMenu){// 如果配置了右键菜单; 支持方向键操作、回车
6737
+ if(internalData.isActivated){$xeTable.preventEvent(evnt,'event.keydown',null,()=>{const{mouseConfig,keyboardConfig,treeConfig,editConfig,highlightCurrentRow,highlightCurrentColumn}=props;const{ctxMenuStore,editStore}=reactData;const{afterFullData,visibleColumn,currentRow}=internalData;const isContentMenu=$xeTable.computeIsContentMenu;const bodyMenu=$xeTable.computeBodyMenu;const keyboardOpts=$xeTable.computeKeyboardOpts;const mouseOpts=$xeTable.computeMouseOpts;const editOpts=$xeTable.computeEditOpts;const treeOpts=$xeTable.computeTreeOpts;const menuList=$xeTable.computeMenuList;const rowOpts=$xeTable.computeRowOpts;const columnOpts=$xeTable.computeColumnOpts;const{isLastEnterAppendRow,beforeEnterMethod,enterMethod,isLastTabAppendRow,beforeTabMethod,tabMethod}=keyboardOpts;const{selected,actived}=editStore;const{keyCode}=evnt;const hasBackspaceKey=keyCode===8;const isTab=keyCode===9;const isEnter=keyCode===13;const isEsc=keyCode===27;const isSpacebar=keyCode===32;const isLeftArrow=keyCode===37;const isUpArrow=keyCode===38;const isRightArrow=keyCode===39;const isDwArrow=keyCode===40;const hasDeleteKey=keyCode===46;const isF2=keyCode===113;const isContextMenu=keyCode===93;const isControlKey=hasControlKey(evnt);const hasShiftKey=evnt.shiftKey;const hasAltKey=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 childrenField=treeOpts.children||treeOpts.childrenField;const beforeEditMethod=editOpts.beforeEditMethod||editOpts.activeMethod;if(operCtxMenu){// 如果配置了右键菜单; 支持方向键操作、回车
6734
6738
  evnt.preventDefault();if(ctxMenuStore.showChild&&hasChildrenList(ctxMenuStore.selected)){$xeTable.moveCtxMenu(evnt,ctxMenuStore,'selectChild',isLeftArrow,false,ctxMenuStore.selected.children);}else{$xeTable.moveCtxMenu(evnt,ctxMenuStore,'selected',isRightArrow,true,menuList);}}else if(keyboardConfig&&mouseConfig&&mouseOpts.area&&$xeTable.handleKeyboardCellAreaEvent){$xeTable.handleKeyboardCellAreaEvent(evnt);}else if(isEsc){// 如果按下了 Esc 键,关闭快捷菜单、筛选
6735
6739
  if($xeTable.closeMenu){$xeTable.closeMenu();}$xeTable.closeFilter();if(keyboardConfig&&keyboardOpts.isEsc){// 如果是激活编辑状态,则取消编辑
6736
6740
  if(actived.row){const params=actived.args;$xeTable.handleClearEdit(evnt);// 如果配置了选中功能,则为选中状态
@@ -6831,7 +6835,7 @@ if(!isSelected&&!halfSelect&&showReserveStatus){halfSelect=!external_root_XEUtil
6831
6835
  */clearCheckboxRow(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{tableFullData}=internalData;const treeOpts=$xeTable.computeTreeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const checkboxOpts=$xeTable.computeCheckboxOpts;const{checkField,reserve}=checkboxOpts;// indeterminateField 仅支持读取
6832
6836
  const indeterminateField=checkboxOpts.indeterminateField||checkboxOpts.halfField;if(checkField){const handleClearChecked=item=>{if(treeConfig&&indeterminateField){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item,indeterminateField,false);}external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item,checkField,false);};if(treeConfig){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullData,handleClearChecked,{children:childrenField});}else{tableFullData.forEach(handleClearChecked);}}if(reserve){tableFullData.forEach(row=>this.handleCheckboxReserveRow(row,false));}reactData.isAllSelected=false;reactData.isIndeterminate=false;internalData.selectCheckboxMaps={};internalData.treeIndeterminateRowMaps={};reactData.updateCheckboxFlag++;return this.$nextTick();},/**
6833
6837
  * 单选,行选中事件
6834
- */triggerRadioRowEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{selectRadioRow:oldValue}=reactData;const{row}=params;const radioOpts=$xeTable.computeRadioOpts;const{trigger,strict,checkMethod}=radioOpts;if(trigger==='manual'){return;}evnt.stopPropagation();if(!checkMethod||checkMethod({$table:$xeTable,row})){let newValue=row;let isChange=oldValue!==newValue;if(strict){handleCheckedRadioRow($xeTable,newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){handleCheckedRadioRow($xeTable,newValue);}else{newValue=null;$xeTable.clearRadioRow();}}if(isChange){$xeTable.dispatchEvent('radio-change',{oldValue,newValue,selected:!!newValue,...params},evnt);}}},triggerCurrentColumnEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{currentColumn:oldValue}=reactData;const columnOpts=$xeTable.computeColumnOpts;const currentColumnOpts=$xeTable.computeCurrentColumnOpts;const beforeRowMethod=currentColumnOpts.beforeSelectMethod||columnOpts.currentMethod;let newValue=params.column;const{trigger,strict}=currentColumnOpts;if(trigger==='manual'){return;}let isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({column:newValue,$table:$xeTable})){if(strict){$xeTable.setCurrentColumn(newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){$xeTable.setCurrentColumn(newValue);}else{newValue=null;$xeTable.clearCurrentColumn();}}if(isChange){$xeTable.dispatchEvent('current-column-change',{oldValue,newValue,selected:!!newValue,...params},evnt);}}else{$xeTable.dispatchEvent('current-column-disabled',params,evnt);}},triggerCurrentRowEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{currentRow:oldValue}=reactData;const rowOpts=$xeTable.computeRowOpts;const currentRowOpts=$xeTable.computeCurrentRowOpts;const beforeRowMethod=currentRowOpts.beforeSelectMethod||rowOpts.currentMethod;let{row:newValue}=params;const{trigger,strict}=currentRowOpts;if(trigger==='manual'){return;}let isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({row:newValue,$table:$xeTable})){if(strict){$xeTable.setCurrentRow(newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){$xeTable.setCurrentRow(newValue);}else{newValue=null;$xeTable.clearCurrentRow();}}if(isChange){$xeTable.dispatchEvent('current-row-change',{oldValue,newValue,selected:!!newValue,...params},evnt);// 已废弃
6838
+ */triggerRadioRowEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{selectRadioRow:oldValue}=reactData;const{row}=params;const radioOpts=$xeTable.computeRadioOpts;const{trigger,strict,checkMethod}=radioOpts;if(trigger==='manual'){return;}evnt.stopPropagation();if(!checkMethod||checkMethod({$table:$xeTable,row})){let newValue=row;let isChange=oldValue!==newValue;if(strict){handleCheckedRadioRow($xeTable,newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){handleCheckedRadioRow($xeTable,newValue);}else{newValue=null;$xeTable.clearRadioRow();}}if(isChange){$xeTable.dispatchEvent('radio-change',{oldValue,newValue,selected:!!newValue,...params},evnt);}}},triggerCurrentColumnEvent(evnt,params){const $xeTable=this;const reactData=$xeTable;const{currentColumn:oldValue}=reactData;const columnOpts=$xeTable.computeColumnOpts;const currentColumnOpts=$xeTable.computeCurrentColumnOpts;const beforeRowMethod=currentColumnOpts.beforeSelectMethod||columnOpts.currentMethod;let newValue=params.column;const{trigger,strict}=currentColumnOpts;if(trigger==='manual'){return;}let isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({column:newValue,$table:$xeTable})){if(strict){$xeTable.setCurrentColumn(newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){$xeTable.setCurrentColumn(newValue);}else{newValue=null;$xeTable.clearCurrentColumn();}}if(isChange){$xeTable.dispatchEvent('current-column-change',{oldValue,newValue,selected:!!newValue,...params},evnt);}}else{$xeTable.dispatchEvent('current-column-disabled',params,evnt);}},triggerCurrentRowEvent(evnt,params){const $xeTable=this;const internalData=$xeTable;const{currentRow:oldValue}=internalData;const rowOpts=$xeTable.computeRowOpts;const currentRowOpts=$xeTable.computeCurrentRowOpts;const beforeRowMethod=currentRowOpts.beforeSelectMethod||rowOpts.currentMethod;let{row:newValue}=params;const{trigger,strict}=currentRowOpts;if(trigger==='manual'){return;}let isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({row:newValue,$table:$xeTable})){if(strict){$xeTable.setCurrentRow(newValue);}else{if(oldValue===newValue){newValue=null;}isChange=oldValue!==newValue;if(isChange&&newValue){$xeTable.setCurrentRow(newValue);}else{newValue=null;$xeTable.clearCurrentRow();}}if(isChange){$xeTable.dispatchEvent('current-row-change',{oldValue,newValue,selected:!!newValue,...params},evnt);// 已废弃
6835
6839
  $xeTable.dispatchEvent('current-change',{oldValue,newValue,...params},evnt);}}else{$xeTable.dispatchEvent('current-row-disabled',params,evnt);}},/**
6836
6840
  * 用于当前行,设置某一行为高亮状态
6837
6841
  * @param {Row} row 行对象
@@ -6844,11 +6848,11 @@ this.currentRow=row;if(rowOpts.isCurrent||this.highlightCurrentRow){if(el){exter
6844
6848
  * @param key 行主键
6845
6849
  */setRadioRowKey(rowid){const $xeTable=this;const internalData=$xeTable;const{fullAllDataRowIdData}=internalData;const rowRest=fullAllDataRowIdData[rowid];if(rowRest){return handleCheckedRadioRow($xeTable,rowRest.row,true);}return $xeTable.$nextTick();},/**
6846
6850
  * 用于当前行,手动清空当前高亮的状态
6847
- */clearCurrentRow(){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const $xeGanttView=internalData.xeGanttView;const el=$xeTable.$refs.refElem;reactData.currentRow=null;internalData.hoverRow=null;if(el){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll('.row--current'),elem=>removeClass(elem,'row--current'));}if($xeGanttView&&$xeGanttView.handleUpdateCurrentRow){$xeGanttView.handleUpdateCurrentRow();}return $xeTable.$nextTick();},/**
6851
+ */clearCurrentRow(){const $xeTable=this;const internalData=$xeTable;const $xeGanttView=internalData.xeGanttView;const el=$xeTable.$refs.refElem;internalData.currentRow=null;internalData.hoverRow=null;if(el){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll('.row--current'),elem=>removeClass(elem,'row--current'));}if($xeGanttView&&$xeGanttView.handleUpdateCurrentRow){$xeGanttView.handleUpdateCurrentRow();}return $xeTable.$nextTick();},/**
6848
6852
  * 用于单选行,手动清空用户的选择
6849
6853
  */clearRadioRow(){this.selectRadioRow=null;return this.$nextTick();},/**
6850
6854
  * 用于当前行,获取当前行的数据
6851
- */getCurrentRecord(isFull){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{currentRow}=reactData;const{fullDataRowIdData,afterFullRowMaps}=internalData;const rowOpts=$xeTable.computeRowOpts;if(rowOpts.isCurrent||props.highlightCurrentRow){const rowid=getRowid($xeTable,currentRow);if(isFull){if(fullDataRowIdData[rowid]){return currentRow;}}else{if(afterFullRowMaps[rowid]){return currentRow;}}}return null;},/**
6855
+ */getCurrentRecord(isFull){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{fullDataRowIdData,afterFullRowMaps,currentRow}=internalData;const rowOpts=$xeTable.computeRowOpts;if(rowOpts.isCurrent||props.highlightCurrentRow){const rowid=getRowid($xeTable,currentRow);if(isFull){if(fullDataRowIdData[rowid]){return currentRow;}}else{if(afterFullRowMaps[rowid]){return currentRow;}}}return null;},/**
6852
6856
  * 用于单选行,获取当已选中的数据
6853
6857
  */getRadioRecord(isFull){const{selectRadioRow,fullDataRowIdData,afterFullRowMaps}=this;if(selectRadioRow){const rowid=getRowid(this,selectRadioRow);if(isFull){if(fullDataRowIdData[rowid]){return selectRadioRow;}}else{if(afterFullRowMaps[rowid]){return selectRadioRow;}}}return null;},/**
6854
6858
  * 行 hover 事件
@@ -7022,13 +7026,11 @@ updateScrollYSpace(){const $xeTable=this;const reactData=$xeTable;const internal
7022
7026
  if(rHeight){sYHeight=(rowRest.oTop||0)+rHeight;// 是否展开行
7023
7027
  if(expandColumn&&rowExpandedMaps[rowid]){sYHeight+=rowRest.expandHeight||expandOpts.height||0;}}}if(sYHeight>maxYHeight){isScrollYBig=true;}}else{sYHeight=bodyTableElem?bodyTableElem.clientHeight:0;}}}else{if(bodyTableElem){sYHeight=bodyTableElem.clientHeight;}}let clientHeight=0;if(bodyScrollElem){clientHeight=bodyScrollElem.clientHeight;}// 虚拟渲染
7024
7028
  let ySpaceHeight=sYHeight;let scrollYTop=ySpaceTop;if(isScrollYBig){// 触底
7025
- if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHeight){scrollYTop=maxYHeight-bodyTableElem.clientHeight;}else{scrollYTop=(maxYHeight-clientHeight)*(ySpaceTop/(scrollYHeight-clientHeight));}ySpaceHeight=maxYHeight;}if(!(scrollYLoad&&overflowY)){scrollYTop=0;}if(methods_getConfig().scrollMarginStyle){if(leftBodyTableElem){leftBodyTableElem.style.marginTop=`${scrollYTop}px`;}if(bodyTableElem){bodyTableElem.style.marginTop=`${scrollYTop}px`;}if(rightbodyTableElem){rightbodyTableElem.style.marginTop=`${scrollYTop}px`;}}else{if(leftBodyTableElem){leftBodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}if(bodyTableElem){bodyTableElem.style.transform=`translate(${reactData.scrollXLeft||0}px, ${scrollYTop}px)`;}if(rightbodyTableElem){rightbodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}}containerList.forEach(name=>{const layoutList=['header','body','footer'];layoutList.forEach(layout=>{const ySpaceElem=getRefElem(elemStore[`${name}-${layout}-ySpace`]);if(ySpaceElem){ySpaceElem.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}});});const scrollYSpaceEl=$xeTable.$refs.refScrollYSpaceElem;if(scrollYSpaceEl){scrollYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}const rowExpandYSpaceEl=$xeTable.$refs.refRowExpandYSpaceElem;if(rowExpandYSpaceEl){rowExpandYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}reactData.scrollYTop=scrollYTop;reactData.scrollYHeight=ySpaceHeight;reactData.isScrollYBig=isScrollYBig;calcScrollbar($xeTable);if(isScrollYBig&&mouseOpts.area){errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSYSpace){$xeGanttView.handleUpdateSYSpace();}return $xeTable.$nextTick().then(()=>{return updateStyle($xeTable);});},updateScrollYStatus(){const $xeTable=this;return updateScrollYStatus($xeTable);},/**
7029
+ if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHeight){scrollYTop=maxYHeight-bodyTableElem.clientHeight;}else{scrollYTop=(maxYHeight-clientHeight)*(ySpaceTop/(scrollYHeight-clientHeight));}ySpaceHeight=maxYHeight;}if(!(scrollYLoad&&overflowY)){scrollYTop=0;}if(methods_getConfig().scrollMarginStyle){if(leftBodyTableElem){leftBodyTableElem.style.marginTop=`${scrollYTop}px`;}if(bodyTableElem){bodyTableElem.style.marginTop=`${scrollYTop}px`;}if(rightbodyTableElem){rightbodyTableElem.style.marginTop=`${scrollYTop}px`;}}else{if(leftBodyTableElem){leftBodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}if(bodyTableElem){bodyTableElem.style.transform=`translate(${reactData.scrollXLeft||0}px, ${scrollYTop}px)`;}if(rightbodyTableElem){rightbodyTableElem.style.transform=`translate(0px, ${scrollYTop}px)`;}}containerList.forEach(name=>{const layoutList=['header','body','footer'];layoutList.forEach(layout=>{const ySpaceElem=getRefElem(elemStore[`${name}-${layout}-ySpace`]);if(ySpaceElem){ySpaceElem.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}});});const scrollYSpaceEl=$xeTable.$refs.refScrollYSpaceElem;if(scrollYSpaceEl){scrollYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}const rowExpandYSpaceEl=$xeTable.$refs.refRowExpandYSpaceElem;if(rowExpandYSpaceEl){rowExpandYSpaceEl.style.height=ySpaceHeight?`${ySpaceHeight}px`:'';}reactData.scrollYTop=scrollYTop;reactData.scrollYHeight=isScrollYBig?sYHeight:ySpaceHeight;reactData.isScrollYBig=isScrollYBig;calcScrollbar($xeTable);if(isScrollYBig&&mouseOpts.area){errLog('vxe.error.notProp',['mouse-config.area']);}if($xeGanttView&&$xeGanttView.handleUpdateSYSpace){$xeGanttView.handleUpdateSYSpace();}return $xeTable.$nextTick().then(()=>{return updateStyle($xeTable);});},updateScrollYStatus(){const $xeTable=this;return updateScrollYStatus($xeTable);},/**
7026
7030
  * 如果有滚动条,则滚动到对应的位置
7027
7031
  */scrollTo(scrollLeft,scrollTop){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{elemStore}=internalData;const headerScrollElem=getRefElem(elemStore['main-header-scroll']);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const footerScrollElem=getRefElem(elemStore['main-footer-scroll']);const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);const xHandleEl=$xeTable.$refs.refScrollXHandleElem;const yHandleEl=$xeTable.$refs.refScrollYHandleElem;internalData.intoRunScroll=true;if(scrollLeft){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)){scrollTop=scrollLeft.top;scrollLeft=scrollLeft.left;}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)){setScrollLeft(xHandleEl,scrollLeft);setScrollLeft(bodyScrollElem,scrollLeft);setScrollLeft(headerScrollElem,scrollLeft);setScrollLeft(footerScrollElem,scrollLeft);if(reactData.scrollXLoad){loadScrollXData($xeTable);}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollTop)){setScrollTop(yHandleEl,scrollTop);setScrollTop(bodyScrollElem,scrollTop);setScrollTop(leftScrollElem,scrollTop);setScrollTop(rightScrollElem,scrollTop);if(reactData.scrollYLoad){loadScrollYData($xeTable);}}return new Promise(resolve=>{setTimeout(()=>{$xeTable.$nextTick(()=>{internalData.intoRunScroll=false;resolve();});},reactData.scrollXLoad||reactData.scrollYLoad?30:0);});},/**
7028
7032
  * 如果有滚动条,则滚动到对应的行
7029
- * @param {Row} row 行对象
7030
- * @param {ColumnInfo} column 列配置
7031
- */scrollToRow(row,fieldOrColumn,options){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{_sToTime}=internalData;const rest=[];if(row){if(props.treeConfig){rest.push($xeTable.scrollToTreeRow(row));}else{rest.push(rowToVisible($xeTable,row));}}if(fieldOrColumn){rest.push(handleScrollToRowColumn($xeTable,fieldOrColumn,row,options));}if(_sToTime){clearTimeout(_sToTime);}return Promise.all(rest).then(()=>{if(row){if(!isAllOverflow&&(scrollYLoad||scrollXLoad)){calcCellHeight($xeTable);calcCellWidth($xeTable);// 可视区被渲染后位置被偏移
7033
+ */scrollToRow(rowOrRowid,fieldOrColumn,options){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{fullAllDataRowIdData,_sToTime}=internalData;const rest=[];let row;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrRowid)){const rowid=rowOrRowid;const rowRest=rowid?fullAllDataRowIdData[rowid]:null;if(rowRest){row=rowRest.row;}}else{row=rowOrRowid;}if(row){if(props.treeConfig){rest.push($xeTable.scrollToTreeRow(row));}else{rest.push(rowToVisible($xeTable,row));}}if(fieldOrColumn){rest.push(handleScrollToRowColumn($xeTable,fieldOrColumn,row,options));}if(_sToTime){clearTimeout(_sToTime);}return Promise.all(rest).then(()=>{if(row){if(!isAllOverflow&&(scrollYLoad||scrollXLoad)){calcCellHeight($xeTable);calcCellWidth($xeTable);// 可视区被渲染后位置被偏移
7032
7034
  internalData._sToTime=setTimeout(()=>{internalData._sToTime=undefined;if(scrollYLoad){if(props.treeConfig){$xeTable.scrollToTreeRow(row);}else{rowToVisible($xeTable,row);}}if(scrollXLoad&&fieldOrColumn){handleScrollToRowColumn($xeTable,fieldOrColumn,row,options);}},350);}return $xeTable.$nextTick();}});},/**
7033
7035
  * 如果有滚动条,则滚动到第一行
7034
7036
  */scrollToStartRow(fieldOrColumn,options){const $xeTable=this;const internalData=$xeTable;const{afterFullData}=internalData;return $xeTable.scrollToRow(afterFullData[0],fieldOrColumn,options);},/**
@@ -7515,6 +7517,16 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
7515
7517
  if (treeConfig) {
7516
7518
  tdVNs.push(...renderLine(h, $xeTable, rowid, cellParams, cellHeight));
7517
7519
  }
7520
+ const clVNs = [];
7521
+ if (!isVNPreEmptyStatus) {
7522
+ clVNs.push(h('div', {
7523
+ attrs: {
7524
+ colid,
7525
+ rowid
7526
+ },
7527
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
7528
+ }, column.renderCell(h, cellParams)));
7529
+ }
7518
7530
  tdVNs.push(h('div', {
7519
7531
  key: 'tc',
7520
7532
  class: ['vxe-cell', {
@@ -7526,13 +7538,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
7526
7538
  attrs: {
7527
7539
  title: showTitle ? $xeTable.getCellLabel(row, column) : null
7528
7540
  }
7529
- }, isVNPreEmptyStatus ? [] : [h('div', {
7530
- attrs: {
7531
- colid,
7532
- rowid
7533
- },
7534
- class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
7535
- }, column.renderCell(h, cellParams))]));
7541
+ }, clVNs));
7536
7542
  if (showValidTip && errorValidItem) {
7537
7543
  const errRule = errorValidItem.rule;
7538
7544
  const validSlot = slots ? slots.valid : null;
@@ -7627,7 +7633,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7627
7633
  const {
7628
7634
  hasFixedColumn,
7629
7635
  treeExpandedFlag,
7630
- scrollXLoad,
7631
7636
  scrollYLoad,
7632
7637
  isAllOverflow,
7633
7638
  rowExpandedFlag,
@@ -7642,7 +7647,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7642
7647
  fullColumnIdData,
7643
7648
  treeExpandedMaps,
7644
7649
  pendingRowMaps,
7645
- rowExpandedMaps
7650
+ rowExpandedMaps,
7651
+ currentRow
7646
7652
  } = tableInternalData;
7647
7653
  const checkboxOpts = $xeTable.computeCheckboxOpts;
7648
7654
  const radioOpts = $xeTable.computeRadioOpts;
@@ -7739,7 +7745,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7739
7745
  'row--radio': radioOpts.highlight && selectRadioRow === row,
7740
7746
  'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
7741
7747
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
7742
- 'row--group': hasRowGroupAggregate
7748
+ 'row--group': hasRowGroupAggregate,
7749
+ 'row--current': currentRow && rowid === getRowid($xeTable, currentRow)
7743
7750
  }, rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowClassName) ? rowClassName(params) : rowClassName : ''];
7744
7751
  const tdVNs = tableColumn.map((column, $columnIndex) => {
7745
7752
  return renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
@@ -7750,7 +7757,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7750
7757
  rowid
7751
7758
  },
7752
7759
  style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : undefined,
7753
- key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
7760
+ key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
7754
7761
  on: trOn
7755
7762
  }, tdVNs));
7756
7763
  // 如果行被展开了
@@ -9573,10 +9580,19 @@ function panel_hideDropTip($xeTableCustomPanel) {
9573
9580
  },
9574
9581
  sortDragstartEvent(evnt) {
9575
9582
  const $xeTableCustomPanel = this;
9583
+ const $xeTable = $xeTableCustomPanel.$xeTable;
9584
+ const tableReactData = $xeTable;
9576
9585
  const customPanelInternalData = $xeTableCustomPanel.internalData;
9586
+ const {
9587
+ customDragTime
9588
+ } = customPanelInternalData;
9577
9589
  if (evnt.dataTransfer) {
9578
9590
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
9579
9591
  }
9592
+ if (customDragTime) {
9593
+ clearTimeout(customDragTime);
9594
+ }
9595
+ tableReactData.isCustomDragStatus = true;
9580
9596
  customPanelInternalData.prevDragGroupField = null;
9581
9597
  customPanelInternalData.prevDragAggFnColid = null;
9582
9598
  },
@@ -9776,6 +9792,10 @@ function panel_hideDropTip($xeTableCustomPanel) {
9776
9792
  tableReactData.customColumnList = collectColumn.slice(0);
9777
9793
  $xeTable.handleColDragSwapColumn();
9778
9794
  }
9795
+ customPanelInternalData.customDragTime = setTimeout(() => {
9796
+ tableReactData.isCustomDragStatus = false;
9797
+ customPanelInternalData.customDragTime = undefined;
9798
+ }, 350);
9779
9799
  }).catch(() => {});
9780
9800
  }
9781
9801
  }
@@ -9881,7 +9901,8 @@ function panel_hideDropTip($xeTableCustomPanel) {
9881
9901
  } = tableProps;
9882
9902
  const {
9883
9903
  isCustomStatus,
9884
- customColumnList
9904
+ customColumnList,
9905
+ isCustomDragStatus
9885
9906
  } = tableReactData;
9886
9907
  const customOpts = $xeTable.computeCustomOpts;
9887
9908
  const {
@@ -9889,8 +9910,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
9889
9910
  } = customOpts;
9890
9911
  const columnDragOpts = $xeTable.computeColumnDragOpts;
9891
9912
  const {
9892
- maxHeight,
9893
- popupTop
9913
+ popupStyle
9894
9914
  } = customStore;
9895
9915
  const {
9896
9916
  checkMethod,
@@ -9902,6 +9922,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
9902
9922
  placement
9903
9923
  } = customOpts;
9904
9924
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
9925
+ const vSize = $xeTable.computeSize;
9905
9926
  const {
9906
9927
  isCrossDrag
9907
9928
  } = columnDragOpts;
@@ -10040,20 +10061,14 @@ function panel_hideDropTip($xeTableCustomPanel) {
10040
10061
  })]) : panel_renderEmptyElement($xeTable)]));
10041
10062
  }
10042
10063
  });
10043
- const popupStys = {};
10044
- if (maxHeight && !['left', 'right'].includes(placement || '')) {
10045
- if (popupTop) {
10046
- popupStys.top = toCssUnit(popupTop);
10047
- }
10048
- popupStys.maxHeight = toCssUnit(maxHeight);
10049
- }
10050
10064
  return h('div', {
10051
10065
  ref: 'refElem',
10052
10066
  key: 'simple',
10053
10067
  class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
10068
+ [`size--${vSize}`]: vSize,
10054
10069
  'is--active': customStore.visible
10055
10070
  }],
10056
- style: popupStys
10071
+ style: popupStyle
10057
10072
  }, customStore.visible ? [h('div', {
10058
10073
  ref: 'refBodyWrapperElem',
10059
10074
  class: 'vxe-table-custom-simple--body-wrapper'
@@ -10096,7 +10111,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
10096
10111
  }, $xeTable.callSlot(defaultSlot, params, h)) : h('transition-group', {
10097
10112
  class: 'vxe-table-custom--panel-list',
10098
10113
  props: {
10099
- name: 'vxe-table-custom--list',
10114
+ name: isCustomDragStatus ? 'vxe-table-custom--list' : '',
10100
10115
  tag: 'ul'
10101
10116
  },
10102
10117
  on: customWrapperOns
@@ -16527,16 +16542,13 @@ function handleCheckboxRangeEvent($xeTable, evnt, params) {
16527
16542
  moveCurrentRow(isUpArrow, isDwArrow, evnt) {
16528
16543
  const $xeTable = this;
16529
16544
  const props = $xeTable;
16530
- const reactData = $xeTable;
16531
16545
  const internalData = $xeTable;
16532
16546
  const {
16533
16547
  treeConfig
16534
16548
  } = props;
16535
16549
  const {
16550
+ afterFullData,
16536
16551
  currentRow
16537
- } = reactData;
16538
- const {
16539
- afterFullData
16540
16552
  } = internalData;
16541
16553
  const treeOpts = $xeTable.computeTreeOpts;
16542
16554
  const childrenField = treeOpts.children || treeOpts.childrenField;
@@ -17408,6 +17420,7 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
17408
17420
 
17409
17421
 
17410
17422
 
17423
+
17411
17424
  function updatePopupStyle($xeTable) {
17412
17425
  const $xeGrid = $xeTable.$xeGrid;
17413
17426
  const $xeGantt = $xeTable.$xeGantt;
@@ -17417,24 +17430,35 @@ function updatePopupStyle($xeTable) {
17417
17430
  customStore
17418
17431
  } = reactData;
17419
17432
  const customOpts = $xeTable.computeCustomOpts;
17420
- const customSimpleMode = $xeTable.computeCustomSimpleMode;
17421
- const showCustomSimpleOutside = customSimpleMode === 'outside';
17422
17433
  const {
17434
+ mode,
17435
+ placement,
17423
17436
  popupOptions
17424
17437
  } = customOpts;
17438
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
17425
17439
  const {
17440
+ transfer,
17426
17441
  maxHeight
17427
17442
  } = popupOptions || {};
17443
+ const customSimpleMode = $xeTable.computeCustomSimpleMode;
17444
+ const showCustomSimpleOutside = customSimpleMode === 'outside';
17445
+ const bodyEl = document.documentElement;
17428
17446
  let wrapperEl = $xeTable.$refs.refElem;
17429
17447
  let popupTop = 0;
17430
17448
  let popupMaxHeight = 0;
17449
+ const popupStys = {};
17431
17450
  if ($xeGantt) {
17432
17451
  const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
17433
17452
  if (ganttContainerElem) {
17434
17453
  wrapperEl = ganttContainerElem;
17435
17454
  }
17436
17455
  }
17437
- if (showCustomSimpleOutside) {
17456
+ const tableRect = wrapperEl.getBoundingClientRect();
17457
+ // 多种模式,指定元素插入
17458
+ if (showSimple && transfer) {
17459
+ popupTop = tableRect.top + bodyEl.scrollTop;
17460
+ popupMaxHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(maxHeight) ? 360 : maxHeight;
17461
+ } else if (showCustomSimpleOutside) {
17438
17462
  if ($xeGGWrapper && wrapperEl) {
17439
17463
  popupTop = wrapperEl.offsetTop;
17440
17464
  }
@@ -17446,8 +17470,31 @@ function updatePopupStyle($xeTable) {
17446
17470
  }
17447
17471
  popupMaxHeight = Math.max(88, popupMaxHeight);
17448
17472
  }
17449
- customStore.popupTop = popupTop;
17450
- customStore.maxHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(maxHeight) ? popupMaxHeight : maxHeight;
17473
+ let popupMxHeight = 0;
17474
+ if (!(placement === 'left' || placement === 'right')) {
17475
+ popupMxHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(maxHeight) ? popupMaxHeight : maxHeight;
17476
+ }
17477
+ if (!placement || !['left', 'right', 'bottom-left', 'bottom-right'].includes(placement)) {
17478
+ if (popupTop) {
17479
+ popupStys.top = toCssUnit(popupTop);
17480
+ }
17481
+ }
17482
+ if (showSimple && transfer) {
17483
+ if (placement === 'bottom-left' || placement === 'bottom-right') {
17484
+ popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
17485
+ }
17486
+ if (placement === 'top-left' || placement === 'bottom-left') {
17487
+ popupStys.left = toCssUnit(tableRect.left);
17488
+ } else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
17489
+ popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
17490
+ }
17491
+ }
17492
+ if (popupMxHeight) {
17493
+ popupStys.maxHeight = toCssUnit(popupMxHeight);
17494
+ }
17495
+ customStore.popupStyle = popupStys;
17496
+ customStore.maxHeight = popupMxHeight;
17497
+ return $xeTable.$nextTick();
17451
17498
  }
17452
17499
  function emitCustomEvent($xeTable, type, evnt) {
17453
17500
  const $xeGrid = $xeTable.$xeGrid;
@@ -17470,10 +17517,47 @@ function emitCustomEvent($xeTable, type, evnt) {
17470
17517
  _openCustom() {
17471
17518
  const $xeTable = this;
17472
17519
  const reactData = $xeTable;
17520
+ const internalData = $xeTable;
17521
+ const $xeGrid = $xeTable.$xeGrid;
17522
+ const $xeGantt = $xeTable.$xeGantt;
17523
+ const $xeGGWrapper = $xeGrid || $xeGantt;
17473
17524
  const {
17474
17525
  initStore,
17475
17526
  customStore
17476
17527
  } = reactData;
17528
+ const customOpts = $xeTable.computeCustomOpts;
17529
+ const {
17530
+ mode,
17531
+ popupOptions
17532
+ } = customOpts;
17533
+ const showSimple = !(mode === 'modal' || mode === 'drawer');
17534
+ const {
17535
+ transfer
17536
+ } = popupOptions || {};
17537
+ const customSimpleMode = $xeTable.computeCustomSimpleMode;
17538
+ const showCustomSimpleOutside = customSimpleMode === 'outside';
17539
+ let cpToElem = $xeTable.$refs.refCustomContainerElem;
17540
+ // 多种模式,指定元素插入
17541
+ if (showSimple && transfer) {
17542
+ cpToElem = document.body;
17543
+ } else {
17544
+ if (showCustomSimpleOutside && $xeGGWrapper) {
17545
+ const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem;
17546
+ if (popupContainerElem) {
17547
+ cpToElem = popupContainerElem;
17548
+ }
17549
+ }
17550
+ }
17551
+ if (cpToElem) {
17552
+ const customPopupToElem = $xeTable.$refs.refCustomPopupToElem;
17553
+ if (customPopupToElem && customPopupToElem.parentElement !== cpToElem) {
17554
+ cpToElem.appendChild(customPopupToElem);
17555
+ }
17556
+ }
17557
+ if (internalData.customPopupToElem !== cpToElem) {
17558
+ reactData.ctPopupFlag++;
17559
+ }
17560
+ internalData.customPopupToElem = cpToElem;
17477
17561
  customStore.visible = true;
17478
17562
  initStore.custom = true;
17479
17563
  $xeTable.handleUpdateCustomColumn();
@@ -17850,6 +17934,10 @@ function emitCustomEvent($xeTable, type, evnt) {
17850
17934
  customStore.oldVisibleMaps = visibleMaps;
17851
17935
  reactData.customColumnList = collectColumn.slice(0);
17852
17936
  }
17937
+ },
17938
+ handleCustomStyle() {
17939
+ const $xeTable = this;
17940
+ return updatePopupStyle($xeTable);
17853
17941
  }
17854
17942
  }
17855
17943
  });
@@ -19834,6 +19922,7 @@ function renderBody(h, $xeTable) {
19834
19922
  table_globalEvents.on($xeTable, 'mousewheel', this.handleGlobalMousewheelEvent);
19835
19923
  table_globalEvents.on($xeTable, 'keydown', this.handleGlobalKeydownEvent);
19836
19924
  table_globalEvents.on($xeTable, 'resize', this.handleGlobalResizeEvent);
19925
+ table_globalEvents.on($xeTable, 'scroll', this.handleGlobalScrollEvent);
19837
19926
  table_globalEvents.on($xeTable, 'contextmenu', this.handleGlobalContextmenuEvent);
19838
19927
  $xeTable.preventEvent(null, 'created');
19839
19928
  },
@@ -19970,6 +20059,10 @@ function renderBody(h, $xeTable) {
19970
20059
  if (popupWrapperEl && popupWrapperEl.parentElement) {
19971
20060
  popupWrapperEl.parentElement.removeChild(popupWrapperEl);
19972
20061
  }
20062
+ const customPopupToElem = $xeTable.$refs.refCustomPopupToElem;
20063
+ if (customPopupToElem && customPopupToElem.parentElement) {
20064
+ customPopupToElem.parentElement.removeChild(customPopupToElem);
20065
+ }
19973
20066
  const tableViewportEl = $xeTable.$refs.refTableViewportElem;
19974
20067
  if (tableViewportEl) {
19975
20068
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
@@ -19988,6 +20081,7 @@ function renderBody(h, $xeTable) {
19988
20081
  table_globalEvents.off($xeTable, 'mousewheel');
19989
20082
  table_globalEvents.off($xeTable, 'keydown');
19990
20083
  table_globalEvents.off($xeTable, 'resize');
20084
+ table_globalEvents.off($xeTable, 'scroll');
19991
20085
  table_globalEvents.off($xeTable, 'contextmenu');
19992
20086
  $xeTable.preventEvent(null, 'beforeDestroy');
19993
20087
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, createReactData());
@@ -20070,8 +20164,6 @@ function renderBody(h, $xeTable) {
20070
20164
  const columnDragOpts = $xeTable.computeColumnDragOpts;
20071
20165
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
20072
20166
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
20073
- const customSimpleMode = $xeTable.computeCustomSimpleMode;
20074
- const showCustomSimpleOutside = customSimpleMode === 'outside';
20075
20167
  const {
20076
20168
  isCrossTableDrag
20077
20169
  } = rowDragOpts;
@@ -20193,16 +20285,6 @@ function renderBody(h, $xeTable) {
20193
20285
  }, resizableOpts.showDragTip ? [h('div', {
20194
20286
  class: 'vxe-table--resizable-number-tip'
20195
20287
  })] : []),
20196
- /**
20197
- * 自定义列
20198
- */
20199
- !showCustomSimpleOutside && initStore.custom ? h(panel, {
20200
- key: 'cs',
20201
- ref: 'refTableCustom',
20202
- props: {
20203
- customStore
20204
- }
20205
- }) : table_renderEmptyElement($xeTable),
20206
20288
  /**
20207
20289
  * 加载中
20208
20290
  */
@@ -20236,20 +20318,25 @@ function renderBody(h, $xeTable) {
20236
20318
  * 拖拽提示
20237
20319
  */
20238
20320
  renderDragTip(h, this)])]), h('div', {
20239
- key: 'tpw'
20321
+ key: 'fpw',
20322
+ ref: 'refCustomContainerElem'
20240
20323
  }, [h('div', {
20241
- ref: 'refPopupWrapperElem'
20324
+ ref: 'refCustomPopupToElem'
20242
20325
  }, [
20243
20326
  /**
20244
20327
  * 自定义列
20245
20328
  */
20246
- showCustomSimpleOutside && initStore.custom ? h(panel, {
20329
+ initStore.custom ? h(panel, {
20247
20330
  key: 'cs',
20248
20331
  ref: 'refTableCustom',
20249
20332
  props: {
20250
20333
  customStore
20251
20334
  }
20252
- }) : table_renderEmptyElement($xeTable),
20335
+ }) : table_renderEmptyElement($xeTable)])]), h('div', {
20336
+ key: 'tpw'
20337
+ }, [h('div', {
20338
+ ref: 'refPopupWrapperElem'
20339
+ }, [
20253
20340
  /**
20254
20341
  * 筛选
20255
20342
  */
@@ -20315,7 +20402,10 @@ function renderBody(h, $xeTable) {
20315
20402
  minWidth: tableTipConfig.minWidth,
20316
20403
  minHeight: tableTipConfig.minHeight,
20317
20404
  maxWidth: tableTipConfig.maxWidth,
20318
- maxHeight: tableTipConfig.maxHeight
20405
+ maxHeight: tableTipConfig.maxHeight,
20406
+ placement: tableTipConfig.placement,
20407
+ defaultPlacement: tableTipConfig.defaultPlacement,
20408
+ popupClassName: tableTipConfig.popupClassName
20319
20409
  },
20320
20410
  scopedSlots: currTooltipSlot ? {
20321
20411
  content: () => {