@@ -13,7 +13,7 @@ const { renderer, renderEmptyElement } = VxeUI
1313const sourceType = 'table'
1414const renderType = 'header'
1515
16- function renderRows ( h : CreateElement , _vm : any , isGroup : boolean , isOptimizeMode : boolean , headerGroups : VxeTableDefines . ColumnInfo [ ] [ ] , $rowIndex : number , cols : VxeTableDefines . ColumnInfo [ ] ) {
16+ function renderRows ( h : CreateElement , _vm : any , isGroup : boolean , isOptimizeMode : boolean , headerGroups : VxeTableDefines . ColumnInfo [ ] [ ] , _rowIndex : number , cols : VxeTableDefines . ColumnInfo [ ] ) {
1717 const props = _vm
1818 const $xeTable = _vm . $parent as VxeTableConstructor & VxeTablePrivateMethods
1919 const $xeGrid = $xeTable . $xeGrid
@@ -34,7 +34,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
3434 const headerCellOpts = $xeTable . computeHeaderCellOpts
3535 const currCellHeight = getCalcHeight ( headerCellOpts . height ) || defaultRowHeight
3636 const { disabledMethod : dragDisabledMethod , isCrossDrag, isPeerDrag } = columnDragOpts
37- const isLastRow = $rowIndex === headerGroups . length - 1
37+ const isLastRow = _rowIndex === headerGroups . length - 1
3838
3939 return cols . map ( ( column , $columnIndex ) => {
4040 const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column
@@ -66,7 +66,9 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
6666 $table : $xeTable ,
6767 $grid : $xeGrid ,
6868 $gantt : $xeGantt ,
69- $rowIndex,
69+ rowIndex : _rowIndex ,
70+ _rowIndex,
71+ $rowIndex : _rowIndex ,
7072 column,
7173 columnIndex,
7274 $columnIndex,
@@ -88,7 +90,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
8890 thAttrs . rowspan = column . rowSpan > 1 ? column . rowSpan : null
8991 }
9092 if ( mergeHeadFlag && mergeHeaderList . length && ( showCustomHeader || isLastRow ) ) {
91- const spanRest = mergeHeaderCellMaps [ `${ $rowIndex } :${ showCustomHeader ? $columnIndex : _columnIndex } ` ]
93+ const spanRest = mergeHeaderCellMaps [ `${ _rowIndex } :${ showCustomHeader ? $columnIndex : _columnIndex } ` ]
9294 if ( spanRest ) {
9395 const { rowspan, colspan } = spanRest
9496 if ( ! rowspan || ! colspan ) {
@@ -339,16 +341,16 @@ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMo
339341
340342 const { headerRowClassName, headerRowStyle } = tableProps
341343 const floatingFilterOpts = $xeTable . computeFloatingFilterOpts
342- const rowVNs = headerGroups . map ( ( cols , $rowIndex ) => {
343- const params = { $table : $xeTable , $rowIndex, fixed : fixedType , type : renderType }
344+ const rowVNs = headerGroups . map ( ( cols , _rowIndex ) => {
345+ const params = { $table : $xeTable , rowIndex : _rowIndex , _rowIndex , $rowIndex : _rowIndex , fixed : fixedType , type : renderType }
344346 return h ( 'tr' , {
345- key : $rowIndex ,
347+ key : _rowIndex ,
346348 class : [
347349 'vxe-header--row' ,
348350 headerRowClassName ? XEUtils . isFunction ( headerRowClassName ) ? headerRowClassName ( params ) : headerRowClassName : ''
349351 ] ,
350352 style : headerRowStyle ? ( XEUtils . isFunction ( headerRowStyle ) ? headerRowStyle ( params ) : headerRowStyle ) as VxeComponentStyleType : undefined
351- } , renderRows ( h , _vm , isGroup , isOptimizeMode , headerGroups , $rowIndex , cols ) )
353+ } , renderRows ( h , _vm , isGroup , isOptimizeMode , headerGroups , _rowIndex , cols ) )
352354 } )
353355
354356 if ( floatingFilterOpts . enabled ) {
0 commit comments