File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/vtable/src/event
self-event-listener/base-table Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1147,9 +1147,14 @@ export function endResizeCol(table: BaseTableAPI) {
1147
1147
// textStick 依赖了这个事件 所以一定要触发RESIZE_COLUMN_END
1148
1148
// if ((table as any).hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END)) {
1149
1149
// RESIZE_COLUMN_END事件触发,返回所有列宽
1150
+ const columns = [ ] ;
1151
+ // 返回所有列宽信息
1152
+ for ( let col = 0 ; col < table . colCount ; col ++ ) {
1153
+ columns . push ( table . getColWidth ( col ) ) ;
1154
+ }
1150
1155
table . fireListeners ( TABLE_EVENT_TYPE . RESIZE_COLUMN_END , {
1151
1156
col : table . stateManager . columnResize . col ,
1152
- colWidths : table . getColsWidths ( )
1157
+ colWidths : columns
1153
1158
} ) ;
1154
1159
// }
1155
1160
}
Original file line number Diff line number Diff line change @@ -39,10 +39,14 @@ export function bindDBClickAutoColumnWidthEvent(table: BaseTableAPI) {
39
39
state . columnResize . isRightFrozen
40
40
) ;
41
41
}
42
-
42
+ const colWidths = [ ] ;
43
+ // 返回所有列宽信息
44
+ for ( let col = 0 ; col < table . colCount ; col ++ ) {
45
+ colWidths . push ( table . getColWidth ( col ) ) ;
46
+ }
43
47
table . fireListeners ( TABLE_EVENT_TYPE . RESIZE_COLUMN_END , {
44
48
col : resizeCol . col ,
45
- colWidths : table . getColsWidths ( )
49
+ colWidths
46
50
} ) ;
47
51
}
48
52
}
You can’t perform that action at this time.
0 commit comments