File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -71,20 +71,20 @@ export function getCellProps<RecordType>(
71
71
) ;
72
72
}
73
73
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 ] ;
76
77
let _rowSpan = rowSpan ;
77
- const rowKey = rowKeys [ _index ] ;
78
78
if ( rowKey !== undefined ) {
79
79
// 下面如果是 0 的,增加 +1 逻辑
80
- const thisCellProps = column . onCell ( record , _index ) ;
80
+ const thisCellProps = column . onCell ( record , nextIndex ) ;
81
81
if ( thisCellProps . rowSpan === 0 ) {
82
82
const thisExpanded = expandedKeys . has ( rowKey ) ;
83
83
if ( thisExpanded ) {
84
84
_rowSpan = _rowSpan + 1 ;
85
85
}
86
86
// 继续往下找
87
- return addChildrenRowSpan ( _rowSpan , _index ) ;
87
+ return addChildrenRowSpan ( _rowSpan , nextIndex ) ;
88
88
}
89
89
}
90
90
// 找不到后返回
You can’t perform that action at this time.
0 commit comments