File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,20 +71,20 @@ export function getCellProps<RecordType>(
7171 ) ;
7272 }
7373
74- const addChildrenRowSpan = ( rowSpan : number , index2 : number ) => {
75- const _index = index2 + 1 ;
74+ const addChildrenRowSpan = ( rowSpan : number , idx : number ) => {
75+ const nextIndex = idx + 1 ;
76+ const rowKey = rowKeys [ nextIndex ] ;
7677 let _rowSpan = rowSpan ;
77- const rowKey = rowKeys [ _index ] ;
7878 if ( rowKey !== undefined ) {
7979 // 下面如果是 0 的,增加 +1 逻辑
80- const thisCellProps = column . onCell ( record , _index ) ;
80+ const thisCellProps = column . onCell ( record , nextIndex ) ;
8181 if ( thisCellProps . rowSpan === 0 ) {
8282 const thisExpanded = expandedKeys . has ( rowKey ) ;
8383 if ( thisExpanded ) {
8484 _rowSpan = _rowSpan + 1 ;
8585 }
8686 // 继续往下找
87- return addChildrenRowSpan ( _rowSpan , _index ) ;
87+ return addChildrenRowSpan ( _rowSpan , nextIndex ) ;
8888 }
8989 }
9090 // 找不到后返回
You can’t perform that action at this time.
0 commit comments