@@ -645,14 +645,14 @@ export default {
645645 this . footerRows . splice ( rowIndex , 1 , { rowHeight : height } ) ;
646646 } ,
647647
648- // td width change
649- tdWidthChange : debounce ( function ( colWidths ) {
648+ tdWidthChange ( colWidths ) {
649+ console . log ( " colWidths::" , colWidths ) ;
650650 this . colgroups = this . colgroups . map ( ( item ) => {
651651 // map
652652 item . _realTimeWidth = colWidths . get ( item . key ) ;
653653 return item ;
654654 } ) ;
655- } , 0 ) ,
655+ } ,
656656
657657 // update colgroups by sort change
658658 updateColgroupsBySortChange ( sortColumns ) {
@@ -1958,6 +1958,10 @@ export default {
19581958 this . highlightRowKey = rowKey ;
19591959 } ,
19601960 } ,
1961+ created ( ) {
1962+ // bug fixed #467
1963+ this . debouncedTdWidthChange = debounce ( this . tdWidthChange , 0 ) ;
1964+ } ,
19611965 mounted ( ) {
19621966 this . parentRendered = true ;
19631967
@@ -2041,7 +2045,7 @@ export default {
20412045 fixedHeader,
20422046 fixedFooter,
20432047 actualRenderTableData,
2044- tdWidthChange ,
2048+ debouncedTdWidthChange ,
20452049 expandOption,
20462050 checkboxOption,
20472051 radioOption,
@@ -2105,7 +2109,7 @@ export default {
21052109 showVirtualScrollingPlaceholder,
21062110 } ,
21072111 on : {
2108- [ EMIT_EVENTS . BODY_TD_WIDTH_CHANGE ] : tdWidthChange ,
2112+ [ EMIT_EVENTS . BODY_TD_WIDTH_CHANGE ] : debouncedTdWidthChange ,
21092113 [ EMIT_EVENTS . HIGHLIGHT_ROW_CHANGE ] :
21102114 this [ INSTANCE_METHODS . SET_HIGHLIGHT_ROW ] ,
21112115 } ,
0 commit comments