@@ -471,6 +471,16 @@ const InteralTable = defineComponent<
471
471
return mergedData . value . slice ( ( current - 1 ) * pageSize , current * pageSize ) ;
472
472
} ) ;
473
473
474
+ const expandIconColumnIndex = computed ( ( ) => {
475
+ // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
476
+ if ( expandType . value === 'nest' && props . expandIconColumnIndex === undefined ) {
477
+ return props . rowSelection ? 1 : 0 ;
478
+ } else if ( props . expandIconColumnIndex ! > 0 && props . rowSelection ) {
479
+ return props . expandIconColumnIndex - 1 ;
480
+ }
481
+ return props . expandIconColumnIndex ;
482
+ } ) ;
483
+
474
484
// ========================== Selections ==========================
475
485
const [ transformSelectionColumns , selectedKeySet ] = useSelection (
476
486
computed ( ( ) => props . rowSelection ) ,
@@ -483,7 +493,7 @@ const InteralTable = defineComponent<
483
493
expandType,
484
494
childrenColumnName,
485
495
locale : tableLocale ,
486
- expandIconColumnIndex : computed ( ( ) => props . expandIconColumnIndex ) ,
496
+ expandIconColumnIndex,
487
497
getPopupContainer : computed ( ( ) => props . getPopupContainer ) ,
488
498
} ,
489
499
) ;
@@ -509,15 +519,6 @@ const InteralTable = defineComponent<
509
519
expose ( {
510
520
selectedKeySet,
511
521
} ) ;
512
- const expandIconColumnIndex = computed ( ( ) => {
513
- // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
514
- if ( expandType . value === 'nest' && props . expandIconColumnIndex === undefined ) {
515
- return props . rowSelection ? 1 : 0 ;
516
- } else if ( props . expandIconColumnIndex ! > 0 && props . rowSelection ) {
517
- return props . expandIconColumnIndex - 1 ;
518
- }
519
- return props . expandIconColumnIndex ;
520
- } ) ;
521
522
522
523
const indentSize = computed ( ( ) => {
523
524
// Indent size
0 commit comments