vxe-table 4.17.6 → 4.17.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/src/body.js +12 -20
- package/es/table/src/cell.js +41 -35
- package/es/table/src/footer.js +3 -12
- package/es/table/src/header.js +4 -12
- package/es/table/src/table.js +122 -58
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +56 -75
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +10 -23
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +8 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +4 -15
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +5 -14
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +30 -19
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/src/body.ts +8 -20
- package/packages/table/src/cell.ts +41 -35
- package/packages/table/src/footer.ts +3 -11
- package/packages/table/src/header.ts +4 -12
- package/packages/table/src/table.ts +122 -57
- /package/es/{iconfont.1761877377602.ttf → iconfont.1762324094489.ttf} +0 -0
- /package/es/{iconfont.1761877377602.woff → iconfont.1762324094489.woff} +0 -0
- /package/es/{iconfont.1761877377602.woff2 → iconfont.1762324094489.woff2} +0 -0
- /package/lib/{iconfont.1761877377602.ttf → iconfont.1762324094489.ttf} +0 -0
- /package/lib/{iconfont.1761877377602.woff → iconfont.1762324094489.woff} +0 -0
- /package/lib/{iconfont.1761877377602.woff2 → iconfont.1762324094489.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
exports.version = exports.validators = exports.use = exports.t = exports.setup = exports.setTheme = exports.setLanguage = exports.setIcon = exports.setI18n = exports.setConfig = exports.saveFile = exports.renderer = exports.readFile = exports.print = exports.modal = exports.menus = exports.log = exports.interceptor = exports.hooks = exports.globalResize = exports.globalEvents = exports.getTheme = exports.getIcon = exports.getI18n = exports.getConfig = exports.formats = exports.default = exports.config = exports.commands = exports.clipboard = exports._t = void 0;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.17.
|
|
16
|
+
const version = exports.version = "4.17.8";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.17.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.17.8",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},headerTooltipConfig:{enterable:!0},footerTooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{autoOptions:{isCalcHeader:!0,isCalcBody:!0,isCalcFooter:!0},maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},menuConfig:{destroyOnClose:!0},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",storeOptions:{visible:!0,resizable:!0,sort:!0,fixed:!0},modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{destroyOnClose:!0,multiple:!0,showIcon:!0},floatingFilterConfig:{},aggregateConfig:{padding:!0,rowField:"id",parentField:"_X_ROW_PARENT_KEY",childrenField:"_X_ROW_CHILDREN",mapChildrenField:"_X_ROW_CHILD_LIST",indent:20,showIcon:!0,maxGroupSize:4,showAggFuncTitle:!0},treeConfig:{padding:!0,rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0,showRootLine:!0},expandConfig:{showIcon:!0,mode:"fixed"},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isAll:!0,isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{gt:24,preSize:1,oSize:0},virtualYConfig:{gt:100,preSize:1,oSize:0},scrollbarConfig:{x:{visible:!0},y:{visible:!0}}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{},gantt:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_AGG_GROUP:iconPrefix+"grouping",TABLE_DRAG_STATUS_AGG_VALUES:iconPrefix+"values",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TABLE_ROW_GROUP_OPEN:iconPrefix+"arrow-right rotate90",TABLE_ROW_GROUP_CLOSE:iconPrefix+"arrow-right",TABLE_AGGREGATE_GROUPING:iconPrefix+"grouping",TABLE_AGGREGATE_VALUES:iconPrefix+"values",TABLE_AGGREGATE_SORT:iconPrefix+"drag-handle",TABLE_AGGREGATE_DELETE:iconPrefix+"close",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,hooks=exports.hooks=_core.VxeUI.hooks,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,i){return _core.VxeUI.modal.alert(e,o,i)},confirm(e,o,i){return _core.VxeUI.modal.confirm(e,o,i)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,i){return _core.VxeUI.modal.notification(e,o,i)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"4.17.
|
|
11
|
+
const version = `table v${"4.17.8"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.17.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.17.8",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.8",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -29,7 +29,7 @@ export default defineVxeComponent({
|
|
|
29
29
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTablePrivateMethods)
|
|
30
30
|
|
|
31
31
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
32
|
-
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts } = $xeTable.getComputeMaps()
|
|
32
|
+
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts, computeIsBodyRenderOptimize } = $xeTable.getComputeMaps()
|
|
33
33
|
|
|
34
34
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
35
35
|
const refBodyScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -729,24 +729,16 @@ export default defineVxeComponent({
|
|
|
729
729
|
const $xeGantt = $xeTable.xeGantt
|
|
730
730
|
|
|
731
731
|
const { fixedColumn, fixedType, tableColumn } = props
|
|
732
|
-
const {
|
|
733
|
-
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad,
|
|
732
|
+
const { mouseConfig } = tableProps
|
|
733
|
+
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragRow, dragCol } = tableReactData
|
|
734
734
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData
|
|
735
735
|
const emptyOpts = computeEmptyOpts.value
|
|
736
736
|
const mouseOpts = computeMouseOpts.value
|
|
737
|
-
const
|
|
737
|
+
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value
|
|
738
738
|
|
|
739
739
|
let renderDataList = tableData
|
|
740
740
|
let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
|
|
741
|
-
|
|
742
|
-
// 如果是使用优化模式
|
|
743
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
744
|
-
if ((expandColumn && expandOpts.mode !== 'fixed') || spanMethod || footerSpanMethod) {
|
|
745
|
-
// 如果不支持优化模式
|
|
746
|
-
} else {
|
|
747
|
-
isOptimizeMode = true
|
|
748
|
-
}
|
|
749
|
-
}
|
|
741
|
+
const isOptimizeMode = isBodyRenderOptimize
|
|
750
742
|
|
|
751
743
|
if (!isColLoading && (fixedType || !overflowX)) {
|
|
752
744
|
renderColumnList = visibleColumn
|
|
@@ -821,12 +813,6 @@ export default defineVxeComponent({
|
|
|
821
813
|
}
|
|
822
814
|
}
|
|
823
815
|
|
|
824
|
-
const ons: Record<string, any> = {
|
|
825
|
-
onScroll (evnt: Event) {
|
|
826
|
-
$xeTable.triggerBodyScrollEvent(evnt, fixedType)
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
816
|
return h('div', {
|
|
831
817
|
ref: refElem,
|
|
832
818
|
class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -835,7 +821,9 @@ export default defineVxeComponent({
|
|
|
835
821
|
h('div', {
|
|
836
822
|
ref: refBodyScroll,
|
|
837
823
|
class: 'vxe-table--body-inner-wrapper',
|
|
838
|
-
|
|
824
|
+
onScroll (evnt) {
|
|
825
|
+
$xeTable.triggerBodyScrollEvent(evnt, fixedType)
|
|
826
|
+
}
|
|
839
827
|
}, [
|
|
840
828
|
fixedType
|
|
841
829
|
? renderEmptyElement($xeTable)
|
|
@@ -186,7 +186,8 @@ function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams & {
|
|
|
186
186
|
const { computeHeaderTooltipOpts } = $table.getComputeMaps()
|
|
187
187
|
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps
|
|
188
188
|
const { isRowGroupStatus } = tableReactData
|
|
189
|
-
const { showHeaderOverflow } = column
|
|
189
|
+
const { showHeaderOverflow, slots } = column
|
|
190
|
+
const titleSlot = slots ? slots.title : null
|
|
190
191
|
const headerTooltipOpts = computeHeaderTooltipOpts.value
|
|
191
192
|
const showAllTip = headerTooltipOpts.showAll
|
|
192
193
|
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
|
|
@@ -222,9 +223,11 @@ function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams & {
|
|
|
222
223
|
...ons
|
|
223
224
|
}, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles
|
|
224
225
|
? $table.getPivotTableAggregateRenderColTitles(column, titleVN)
|
|
225
|
-
:
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
: titleSlot
|
|
227
|
+
? $table.callSlot(titleSlot, params)
|
|
228
|
+
: [
|
|
229
|
+
titleVN
|
|
230
|
+
])
|
|
228
231
|
]
|
|
229
232
|
}
|
|
230
233
|
|
|
@@ -1080,38 +1083,41 @@ export const Cell = {
|
|
|
1080
1083
|
const { computeSortOpts } = $table.getComputeMaps()
|
|
1081
1084
|
const sortOpts = computeSortOpts.value
|
|
1082
1085
|
const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts
|
|
1083
|
-
const { order } = column
|
|
1086
|
+
const { order, slots } = column
|
|
1084
1087
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1088
|
+
const sortSlot = slots ? slots.sort : null
|
|
1089
|
+
return sortSlot
|
|
1090
|
+
? getSlotVNs($table.callSlot(sortSlot, params)) as VNode[]
|
|
1091
|
+
: [
|
|
1092
|
+
h('span', {
|
|
1093
|
+
class: ['vxe-cell--sort', `vxe-cell--sort-${iconLayout}-layout`]
|
|
1094
|
+
}, [
|
|
1095
|
+
h('i', {
|
|
1096
|
+
class: ['vxe-sort--asc-btn', iconAsc || getIcon().TABLE_SORT_ASC, {
|
|
1097
|
+
'sort--active': order === 'asc'
|
|
1098
|
+
}],
|
|
1099
|
+
title: XEUtils.eqNull(ascTitle) ? getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`,
|
|
1100
|
+
onClick: allowBtn
|
|
1101
|
+
? (evnt: Event) => {
|
|
1102
|
+
evnt.stopPropagation()
|
|
1103
|
+
$table.triggerSortEvent(evnt, column, 'asc')
|
|
1104
|
+
}
|
|
1105
|
+
: undefined
|
|
1106
|
+
}),
|
|
1107
|
+
h('i', {
|
|
1108
|
+
class: ['vxe-sort--desc-btn', iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
1109
|
+
'sort--active': order === 'desc'
|
|
1110
|
+
}],
|
|
1111
|
+
title: XEUtils.eqNull(descTitle) ? getI18n('vxe.table.sortDesc') : `${descTitle || ''}`,
|
|
1112
|
+
onClick: allowBtn
|
|
1113
|
+
? (evnt: Event) => {
|
|
1114
|
+
evnt.stopPropagation()
|
|
1115
|
+
$table.triggerSortEvent(evnt, column, 'desc')
|
|
1116
|
+
}
|
|
1117
|
+
: undefined
|
|
1118
|
+
})
|
|
1119
|
+
])
|
|
1120
|
+
]
|
|
1115
1121
|
}
|
|
1116
1122
|
return []
|
|
1117
1123
|
},
|
|
@@ -36,7 +36,7 @@ export default defineVxeComponent({
|
|
|
36
36
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
37
37
|
|
|
38
38
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
39
|
-
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps()
|
|
39
|
+
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts, computeIsFooterRenderOptimize } = $xeTable.getComputeMaps()
|
|
40
40
|
|
|
41
41
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
42
42
|
const refFooterScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -243,20 +243,12 @@ export default defineVxeComponent({
|
|
|
243
243
|
|
|
244
244
|
const renderVN = () => {
|
|
245
245
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
246
|
-
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
247
246
|
const { visibleColumn, fullColumnIdData } = tableInternalData
|
|
248
247
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData
|
|
248
|
+
const isFooterRenderOptimize = computeIsFooterRenderOptimize.value
|
|
249
249
|
|
|
250
250
|
let renderColumnList = tableColumn
|
|
251
|
-
|
|
252
|
-
// 如果是使用优化模式
|
|
253
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
254
|
-
if (spanMethod || footerSpanMethod) {
|
|
255
|
-
// 如果不支持优化模式
|
|
256
|
-
} else {
|
|
257
|
-
isOptimizeMode = true
|
|
258
|
-
}
|
|
259
|
-
}
|
|
251
|
+
const isOptimizeMode = isFooterRenderOptimize
|
|
260
252
|
|
|
261
253
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
262
254
|
renderColumnList = visibleColumn
|
|
@@ -45,7 +45,7 @@ export default defineVxeComponent({
|
|
|
45
45
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
46
46
|
|
|
47
47
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
48
|
-
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts } = $xeTable.getComputeMaps()
|
|
48
|
+
const { computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeMouseOpts, computeHeaderCellOpts, computeDefaultRowHeight, computeVirtualXOpts, computeFloatingFilterOpts, computeIsHeaderRenderOptimize } = $xeTable.getComputeMaps()
|
|
49
49
|
|
|
50
50
|
const headerColumn = ref<VxeTableDefines.ColumnInfo[][]>([])
|
|
51
51
|
|
|
@@ -416,27 +416,19 @@ export default defineVxeComponent({
|
|
|
416
416
|
|
|
417
417
|
const renderVN = () => {
|
|
418
418
|
const { fixedType, fixedColumn, tableColumn } = props
|
|
419
|
-
const { mouseConfig
|
|
419
|
+
const { mouseConfig } = tableProps
|
|
420
420
|
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData
|
|
421
421
|
const { visibleColumn, fullColumnIdData } = tableInternalData
|
|
422
422
|
|
|
423
423
|
const mouseOpts = computeMouseOpts.value
|
|
424
|
+
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value
|
|
424
425
|
let renderHeaderList = headerColumn.value || []
|
|
425
426
|
let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
|
|
426
|
-
|
|
427
|
+
const isOptimizeMode = isHeaderRenderOptimize
|
|
427
428
|
|
|
428
429
|
if (isGroup) {
|
|
429
430
|
renderColumnList = visibleColumn
|
|
430
431
|
} else {
|
|
431
|
-
// 如果是使用优化模式
|
|
432
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
433
|
-
if (spanMethod || footerSpanMethod) {
|
|
434
|
-
// 如果不支持优化模式
|
|
435
|
-
} else {
|
|
436
|
-
isOptimizeMode = true
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
432
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
441
433
|
renderColumnList = visibleColumn
|
|
442
434
|
}
|
|
@@ -677,6 +677,77 @@ export default defineVxeComponent({
|
|
|
677
677
|
return leftWidth
|
|
678
678
|
})
|
|
679
679
|
|
|
680
|
+
const computeBodyMergeCoverFixed = computed(() => {
|
|
681
|
+
const { columnStore, mergeBodyFlag } = reactData
|
|
682
|
+
const { mergeBodyList, visibleColumn } = internalData
|
|
683
|
+
const { leftList, rightList } = columnStore
|
|
684
|
+
const rscIndex = visibleColumn.length - rightList.length
|
|
685
|
+
if (mergeBodyFlag && (leftList.length || rightList.length)) {
|
|
686
|
+
const lecIndex = leftList.length
|
|
687
|
+
for (let i = 0; i < mergeBodyList.length; i++) {
|
|
688
|
+
const { col, colspan } = mergeBodyList[i]
|
|
689
|
+
if (col < lecIndex || (col + colspan) > rscIndex) {
|
|
690
|
+
return true
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return false
|
|
695
|
+
})
|
|
696
|
+
|
|
697
|
+
const computeIsHeaderRenderOptimize = computed(() => {
|
|
698
|
+
const { spanMethod, footerSpanMethod, showHeaderOverflow: allColumnHeaderOverflow } = props
|
|
699
|
+
const { isGroup, scrollXLoad } = reactData
|
|
700
|
+
let isOptimizeMode = false
|
|
701
|
+
if (isGroup) {
|
|
702
|
+
// 分组表头
|
|
703
|
+
} else {
|
|
704
|
+
// 如果是使用优化模式
|
|
705
|
+
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
706
|
+
if (spanMethod || footerSpanMethod) {
|
|
707
|
+
// 如果不支持优化模式
|
|
708
|
+
} else {
|
|
709
|
+
isOptimizeMode = true
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
return isOptimizeMode
|
|
714
|
+
})
|
|
715
|
+
|
|
716
|
+
const computeIsBodyRenderOptimize = computed(() => {
|
|
717
|
+
const { spanMethod, footerSpanMethod } = props
|
|
718
|
+
const { scrollXLoad, scrollYLoad, isAllOverflow, expandColumn } = reactData
|
|
719
|
+
const bodyMergeCoverFixed = computeBodyMergeCoverFixed.value
|
|
720
|
+
const expandOpts = computeExpandOpts.value
|
|
721
|
+
let isOptimizeMode = false
|
|
722
|
+
// 如果是使用优化模式
|
|
723
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
724
|
+
// 如果是展开行,内联模式,不支持优化
|
|
725
|
+
// 如果是方法合并,不支持优化
|
|
726
|
+
// 如果固定列且配置式合并,不支持优化
|
|
727
|
+
if ((expandColumn && expandOpts.mode !== 'fixed') || bodyMergeCoverFixed || spanMethod || footerSpanMethod) {
|
|
728
|
+
// 如果不支持优化模式
|
|
729
|
+
} else {
|
|
730
|
+
isOptimizeMode = true
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
return isOptimizeMode
|
|
734
|
+
})
|
|
735
|
+
|
|
736
|
+
const computeIsFooterRenderOptimize = computed(() => {
|
|
737
|
+
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = props
|
|
738
|
+
const { scrollXLoad } = reactData
|
|
739
|
+
let isOptimizeMode = false
|
|
740
|
+
// 如果是使用优化模式
|
|
741
|
+
if (scrollXLoad && allColumnFooterOverflow) {
|
|
742
|
+
if (spanMethod || footerSpanMethod) {
|
|
743
|
+
// 如果不支持优化模式
|
|
744
|
+
} else {
|
|
745
|
+
isOptimizeMode = true
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return isOptimizeMode
|
|
749
|
+
})
|
|
750
|
+
|
|
680
751
|
const computeHeaderMenu = computed(() => {
|
|
681
752
|
const menuOpts = computeMenuOpts.value
|
|
682
753
|
const headerOpts = menuOpts.header
|
|
@@ -949,9 +1020,13 @@ export default defineVxeComponent({
|
|
|
949
1020
|
computeCustomOpts,
|
|
950
1021
|
computeLeftFixedWidth,
|
|
951
1022
|
computeRightFixedWidth,
|
|
1023
|
+
computeBodyMergeCoverFixed,
|
|
952
1024
|
computeFixedColumnSize,
|
|
953
1025
|
computeIsMaxFixedColumn,
|
|
954
1026
|
computeIsAllCheckboxDisabled,
|
|
1027
|
+
computeIsHeaderRenderOptimize,
|
|
1028
|
+
computeIsBodyRenderOptimize,
|
|
1029
|
+
computeIsFooterRenderOptimize,
|
|
955
1030
|
computeVirtualScrollBars,
|
|
956
1031
|
computeRowGroupFields,
|
|
957
1032
|
computeRowGroupColumns,
|
|
@@ -2080,19 +2155,28 @@ export default defineVxeComponent({
|
|
|
2080
2155
|
* 计算自适应行高
|
|
2081
2156
|
*/
|
|
2082
2157
|
const calcCellAutoHeight = (rowRest: VxeTableDefines.RowCacheItem, wrapperEl: HTMLDivElement) => {
|
|
2083
|
-
const
|
|
2158
|
+
const { scrollXLoad } = reactData
|
|
2159
|
+
const wrapperElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`)
|
|
2084
2160
|
let colHeight = rowRest.height
|
|
2085
2161
|
let firstCellStyle: CSSStyleDeclaration | null = null
|
|
2086
2162
|
let topBottomPadding = 0
|
|
2087
|
-
for (let i = 0; i <
|
|
2088
|
-
const wrapperElem =
|
|
2163
|
+
for (let i = 0; i < wrapperElemList.length; i++) {
|
|
2164
|
+
const wrapperElem = wrapperElemList[i] as HTMLElement
|
|
2089
2165
|
const cellElem = wrapperElem.parentElement as HTMLTableCellElement
|
|
2090
2166
|
if (!firstCellStyle) {
|
|
2167
|
+
const cellStyle = cellElem.style
|
|
2168
|
+
const orHeight = cellStyle.height
|
|
2169
|
+
if (!scrollXLoad) {
|
|
2170
|
+
cellStyle.height = ''
|
|
2171
|
+
}
|
|
2091
2172
|
firstCellStyle = getComputedStyle(cellElem)
|
|
2092
2173
|
topBottomPadding = firstCellStyle ? Math.ceil(XEUtils.toNumber(firstCellStyle.paddingTop) + XEUtils.toNumber(firstCellStyle.paddingBottom)) : 0
|
|
2174
|
+
if (!scrollXLoad) {
|
|
2175
|
+
cellStyle.height = orHeight
|
|
2176
|
+
}
|
|
2093
2177
|
}
|
|
2094
2178
|
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0
|
|
2095
|
-
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding))
|
|
2179
|
+
colHeight = scrollXLoad ? Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding)) : Math.ceil(cellHeight + topBottomPadding)
|
|
2096
2180
|
}
|
|
2097
2181
|
return colHeight
|
|
2098
2182
|
}
|
|
@@ -2474,8 +2558,8 @@ export default defineVxeComponent({
|
|
|
2474
2558
|
}
|
|
2475
2559
|
|
|
2476
2560
|
const updateStyle = () => {
|
|
2477
|
-
const {
|
|
2478
|
-
const { isGroup, currentRow, tableColumn,
|
|
2561
|
+
const { mouseConfig } = props
|
|
2562
|
+
const { isGroup, currentRow, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData
|
|
2479
2563
|
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData
|
|
2480
2564
|
const $xeGanttView = internalData.xeGanttView
|
|
2481
2565
|
const el = refElem.value
|
|
@@ -2483,12 +2567,15 @@ export default defineVxeComponent({
|
|
|
2483
2567
|
return
|
|
2484
2568
|
}
|
|
2485
2569
|
const containerList = ['main', 'left', 'right']
|
|
2570
|
+
const { leftList, rightList } = columnStore
|
|
2486
2571
|
let osbWidth = overflowY ? scrollbarWidth : 0
|
|
2487
2572
|
let osbHeight = overflowX ? scrollbarHeight : 0
|
|
2488
2573
|
const emptyPlaceholderElem = refEmptyPlaceholder.value
|
|
2574
|
+
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value
|
|
2575
|
+
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value
|
|
2576
|
+
const isFooterRenderOptimize = computeIsFooterRenderOptimize.value
|
|
2489
2577
|
const scrollbarOpts = computeScrollbarOpts.value
|
|
2490
2578
|
const mouseOpts = computeMouseOpts.value
|
|
2491
|
-
const expandOpts = computeExpandOpts.value
|
|
2492
2579
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper'])
|
|
2493
2580
|
const bodyTableElem = getRefElem(elemStore['main-body-table'])
|
|
2494
2581
|
if (emptyPlaceholderElem) {
|
|
@@ -2610,7 +2697,7 @@ export default defineVxeComponent({
|
|
|
2610
2697
|
let fixedColumn: VxeTableDefines.ColumnInfo[] = []
|
|
2611
2698
|
let fixedWrapperElem: HTMLDivElement
|
|
2612
2699
|
if (fixedType) {
|
|
2613
|
-
fixedColumn = isFixedLeft ?
|
|
2700
|
+
fixedColumn = isFixedLeft ? leftList : rightList
|
|
2614
2701
|
fixedWrapperElem = isFixedLeft ? refLeftContainer.value : refRightContainer.value
|
|
2615
2702
|
}
|
|
2616
2703
|
layoutList.forEach(layout => {
|
|
@@ -2621,20 +2708,11 @@ export default defineVxeComponent({
|
|
|
2621
2708
|
// 表头体样式处理
|
|
2622
2709
|
// 横向滚动渲染
|
|
2623
2710
|
let renderColumnList = tableColumn
|
|
2624
|
-
|
|
2711
|
+
const isOptimizeMode = isHeaderRenderOptimize
|
|
2625
2712
|
|
|
2626
2713
|
if (isGroup) {
|
|
2627
2714
|
renderColumnList = visibleColumn
|
|
2628
2715
|
} else {
|
|
2629
|
-
// 如果是使用优化模式
|
|
2630
|
-
if (scrollXLoad && allColumnHeaderOverflow) {
|
|
2631
|
-
if (spanMethod || footerSpanMethod) {
|
|
2632
|
-
// 如果不支持优化模式
|
|
2633
|
-
} else {
|
|
2634
|
-
isOptimizeMode = true
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
2716
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
2639
2717
|
renderColumnList = visibleColumn
|
|
2640
2718
|
}
|
|
@@ -2691,16 +2769,7 @@ export default defineVxeComponent({
|
|
|
2691
2769
|
}
|
|
2692
2770
|
|
|
2693
2771
|
let renderColumnList = tableColumn
|
|
2694
|
-
|
|
2695
|
-
let isOptimizeMode = false
|
|
2696
|
-
// 如果是使用优化模式
|
|
2697
|
-
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
2698
|
-
if ((expandColumn && expandOpts.mode !== 'fixed') || spanMethod || footerSpanMethod) {
|
|
2699
|
-
// 如果不支持优化模式
|
|
2700
|
-
} else {
|
|
2701
|
-
isOptimizeMode = true
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2772
|
+
const isOptimizeMode = isBodyRenderOptimize
|
|
2704
2773
|
|
|
2705
2774
|
if (fixedType) {
|
|
2706
2775
|
renderColumnList = visibleColumn
|
|
@@ -2734,15 +2803,7 @@ export default defineVxeComponent({
|
|
|
2734
2803
|
}
|
|
2735
2804
|
} else if (layout === 'footer') {
|
|
2736
2805
|
let renderColumnList = tableColumn
|
|
2737
|
-
|
|
2738
|
-
// 如果是使用优化模式
|
|
2739
|
-
if (scrollXLoad && allColumnFooterOverflow) {
|
|
2740
|
-
if (spanMethod || footerSpanMethod) {
|
|
2741
|
-
// 如果不支持优化模式
|
|
2742
|
-
} else {
|
|
2743
|
-
isOptimizeMode = true
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2806
|
+
const isOptimizeMode = isFooterRenderOptimize
|
|
2746
2807
|
|
|
2747
2808
|
if (!isOptimizeMode || (!isColLoading && (fixedType || !overflowX))) {
|
|
2748
2809
|
renderColumnList = visibleColumn
|
|
@@ -4190,6 +4251,7 @@ export default defineVxeComponent({
|
|
|
4190
4251
|
* @returns
|
|
4191
4252
|
*/
|
|
4192
4253
|
const handleVirtualTreeExpand = (rows: any[], expanded: boolean) => {
|
|
4254
|
+
const { lastScrollLeft, lastScrollTop } = internalData
|
|
4193
4255
|
return handleBaseTreeExpand(rows, expanded).then(() => {
|
|
4194
4256
|
handleVirtualTreeToList()
|
|
4195
4257
|
$xeTable.handleTableData()
|
|
@@ -4197,9 +4259,9 @@ export default defineVxeComponent({
|
|
|
4197
4259
|
updateAfterDataIndex()
|
|
4198
4260
|
return nextTick()
|
|
4199
4261
|
}).then(() => {
|
|
4200
|
-
|
|
4201
|
-
return handleLazyRecalculate(true, true, true)
|
|
4262
|
+
return handleRecalculateStyle(true, true, true)
|
|
4202
4263
|
}).then(() => {
|
|
4264
|
+
restoreScrollLocation($xeTable, lastScrollLeft, lastScrollTop)
|
|
4203
4265
|
updateTreeLineStyle()
|
|
4204
4266
|
setTimeout(() => {
|
|
4205
4267
|
$xeTable.updateCellAreas()
|
|
@@ -11879,7 +11941,7 @@ export default defineVxeComponent({
|
|
|
11879
11941
|
},
|
|
11880
11942
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
11881
11943
|
updateScrollYSpace () {
|
|
11882
|
-
const { isAllOverflow, overflowY, scrollYLoad, expandColumn } = reactData
|
|
11944
|
+
const { isAllOverflow, overflowY, scrollYLoad, scrollYHeight, expandColumn } = reactData
|
|
11883
11945
|
const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData
|
|
11884
11946
|
const $xeGanttView = internalData.xeGanttView
|
|
11885
11947
|
const { startIndex } = scrollYStore
|
|
@@ -11894,13 +11956,13 @@ export default defineVxeComponent({
|
|
|
11894
11956
|
const rightbodyTableElem = getRefElem(elemStore['right-body-table'])
|
|
11895
11957
|
const containerList = ['main', 'left', 'right']
|
|
11896
11958
|
let ySpaceTop = 0
|
|
11897
|
-
let
|
|
11959
|
+
let sYHeight = scrollYHeight
|
|
11898
11960
|
let isScrollYBig = false
|
|
11899
11961
|
if (scrollYLoad) {
|
|
11900
11962
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height
|
|
11901
11963
|
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
11902
|
-
|
|
11903
|
-
if (
|
|
11964
|
+
sYHeight = afterFullData.length * defaultRowHeight
|
|
11965
|
+
if (sYHeight > maxYHeight) {
|
|
11904
11966
|
isScrollYBig = true
|
|
11905
11967
|
}
|
|
11906
11968
|
ySpaceTop = Math.max(0, startIndex * defaultRowHeight)
|
|
@@ -11913,18 +11975,21 @@ export default defineVxeComponent({
|
|
|
11913
11975
|
const lastRow = afterFullData[afterFullData.length - 1]
|
|
11914
11976
|
rowid = getRowid($xeTable, lastRow)
|
|
11915
11977
|
rowRest = fullAllDataRowIdData[rowid] || {}
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11978
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
11979
|
+
if (rowRest.oTop) {
|
|
11980
|
+
sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight)
|
|
11981
|
+
// 是否展开行
|
|
11982
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
11983
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0
|
|
11984
|
+
}
|
|
11920
11985
|
}
|
|
11921
|
-
if (
|
|
11986
|
+
if (sYHeight > maxYHeight) {
|
|
11922
11987
|
isScrollYBig = true
|
|
11923
11988
|
}
|
|
11924
11989
|
}
|
|
11925
11990
|
} else {
|
|
11926
11991
|
if (bodyTableElem) {
|
|
11927
|
-
|
|
11992
|
+
sYHeight = bodyTableElem.clientHeight
|
|
11928
11993
|
}
|
|
11929
11994
|
}
|
|
11930
11995
|
let clientHeight = 0
|
|
@@ -11932,7 +11997,7 @@ export default defineVxeComponent({
|
|
|
11932
11997
|
clientHeight = bodyScrollElem.clientHeight
|
|
11933
11998
|
}
|
|
11934
11999
|
// 虚拟渲染
|
|
11935
|
-
let ySpaceHeight =
|
|
12000
|
+
let ySpaceHeight = sYHeight
|
|
11936
12001
|
let scrollYTop = ySpaceTop
|
|
11937
12002
|
if (isScrollYBig) {
|
|
11938
12003
|
// 触底
|
|
@@ -11976,7 +12041,7 @@ export default defineVxeComponent({
|
|
|
11976
12041
|
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : ''
|
|
11977
12042
|
}
|
|
11978
12043
|
reactData.scrollYTop = scrollYTop
|
|
11979
|
-
reactData.scrollYHeight =
|
|
12044
|
+
reactData.scrollYHeight = ySpaceHeight
|
|
11980
12045
|
reactData.isScrollYBig = isScrollYBig
|
|
11981
12046
|
|
|
11982
12047
|
calcScrollbar()
|
|
@@ -13175,12 +13240,12 @@ export default defineVxeComponent({
|
|
|
13175
13240
|
if (props.resizable) {
|
|
13176
13241
|
warnLog('vxe.error.delProp', ['resizable', 'column-config.resizable'])
|
|
13177
13242
|
}
|
|
13178
|
-
if (props.virtualXConfig && props.scrollX) {
|
|
13179
|
-
|
|
13180
|
-
}
|
|
13181
|
-
if (props.virtualYConfig && props.scrollY) {
|
|
13182
|
-
|
|
13183
|
-
}
|
|
13243
|
+
// if (props.virtualXConfig && props.scrollX) {
|
|
13244
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-x-config', 'scroll-x', 'scroll-x=null'])
|
|
13245
|
+
// }
|
|
13246
|
+
// if (props.virtualYConfig && props.scrollY) {
|
|
13247
|
+
// warnLog('vxe.error.notSupportProp', ['virtual-y-config', 'scroll-y', 'scroll-y=null'])
|
|
13248
|
+
// }
|
|
13184
13249
|
if (props.aggregateConfig && props.rowGroupConfig) {
|
|
13185
13250
|
warnLog('vxe.error.notSupportProp', ['aggregate-config', 'row-group-config', 'row-group-config=null'])
|
|
13186
13251
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|