@@ -43,7 +43,7 @@ import { useLocaleReceiver } from '../locale-provider/LocaleReceiver';
43
43
import classNames from '../_util/classNames' ;
44
44
import omit from '../_util/omit' ;
45
45
import { initDefaultProps } from '../_util/props-util' ;
46
- import { useProvideSlots } from './context' ;
46
+ import { useProvideSlots , useProvideTableContext } from './context' ;
47
47
import type { ContextSlots } from './context' ;
48
48
import useColumns from './hooks/useColumns' ;
49
49
import { convertChildrenToColumns } from './util' ;
@@ -195,7 +195,10 @@ export const tableProps = () => {
195
195
> ,
196
196
default : undefined ,
197
197
} ,
198
-
198
+ onResizeColumn : {
199
+ type : Function as PropType < ( w : number , col : ColumnsType ) => void > ,
200
+ default : undefined ,
201
+ } ,
199
202
rowSelection : { type : Object as PropType < TableRowSelection > , default : undefined } ,
200
203
getPopupContainer : { type : Function as PropType < GetPopupContainer > , default : undefined } ,
201
204
scroll : {
@@ -243,15 +246,19 @@ const InteralTable = defineComponent<
243
246
'customFilterIcon' ,
244
247
'customFilterDropdown' ,
245
248
] ,
246
- setup ( props , { attrs, slots, expose } ) {
249
+ setup ( props , { attrs, slots, expose, emit } ) {
247
250
devWarning (
248
251
! ( typeof props . rowKey === 'function' && props . rowKey . length > 1 ) ,
249
252
'Table' ,
250
253
'`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.' ,
251
254
) ;
252
255
253
256
useProvideSlots ( computed ( ( ) => props . contextSlots ) ) ;
254
-
257
+ useProvideTableContext ( {
258
+ onResizeColumn : ( w , col ) => {
259
+ emit ( 'resizeColumn' , w , col ) ;
260
+ } ,
261
+ } ) ;
255
262
const screens = useBreakpoint ( ) ;
256
263
257
264
const mergedColumns = computed ( ( ) => {
0 commit comments