Skip to content

Commit e606eed

Browse files
committed
feat: 回退 offset 功能
1 parent 2ed330a commit e606eed

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/examples/expandedRowSpan.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ const columns: ColumnsType = [
1111
width: 100,
1212
onCell: (_, index) => {
1313
const props: React.TdHTMLAttributes<HTMLTableCellElement> = {};
14-
if (index === 1) {
15-
props.rowSpan = 4;
16-
} else if (index === 2) {
17-
props.rowSpan = 0;
18-
} else if (index === 3) {
19-
props.rowSpan = 0;
20-
} else if (index === 4) {
21-
props.rowSpan = 0;
22-
}
14+
if (index === 0) props.rowSpan = 1;
15+
if (index === 1) props.rowSpan = 4;
16+
if (index === 2) props.rowSpan = 0;
17+
if (index === 3) props.rowSpan = 0;
18+
if (index === 4) props.rowSpan = 0;
19+
if (index === 5) props.rowSpan = 1;
2320

2421
return props;
2522
},

0 commit comments

Comments
 (0)