@@ -43,7 +43,7 @@ import { useLocaleReceiver } from '../locale-provider/LocaleReceiver';
4343import classNames from '../_util/classNames' ;
4444import omit from '../_util/omit' ;
4545import { initDefaultProps } from '../_util/props-util' ;
46- import { useProvideSlots } from './context' ;
46+ import { useProvideSlots , useProvideTableContext } from './context' ;
4747import type { ContextSlots } from './context' ;
4848import useColumns from './hooks/useColumns' ;
4949import { convertChildrenToColumns } from './util' ;
@@ -195,7 +195,10 @@ export const tableProps = () => {
195195 > ,
196196 default : undefined ,
197197 } ,
198-
198+ onResizeColumn : {
199+ type : Function as PropType < ( w : number , col : ColumnsType ) => void > ,
200+ default : undefined ,
201+ } ,
199202 rowSelection : { type : Object as PropType < TableRowSelection > , default : undefined } ,
200203 getPopupContainer : { type : Function as PropType < GetPopupContainer > , default : undefined } ,
201204 scroll : {
@@ -243,15 +246,19 @@ const InteralTable = defineComponent<
243246 'customFilterIcon' ,
244247 'customFilterDropdown' ,
245248 ] ,
246- setup ( props , { attrs, slots, expose } ) {
249+ setup ( props , { attrs, slots, expose, emit } ) {
247250 devWarning (
248251 ! ( typeof props . rowKey === 'function' && props . rowKey . length > 1 ) ,
249252 'Table' ,
250253 '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.' ,
251254 ) ;
252255
253256 useProvideSlots ( computed ( ( ) => props . contextSlots ) ) ;
254-
257+ useProvideTableContext ( {
258+ onResizeColumn : ( w , col ) => {
259+ emit ( 'resizeColumn' , w , col ) ;
260+ } ,
261+ } ) ;
255262 const screens = useBreakpoint ( ) ;
256263
257264 const mergedColumns = computed ( ( ) => {
0 commit comments