import { defineComponent, onMounted, ref } from 'vue'; import VCResizeObserver from '../../vc-resize-observer'; import type { Key } from '../interface'; export interface MeasureCellProps { columnKey: Key; onColumnResize: (key: Key, width: number) => void; } export default defineComponent({ name: 'MeasureCell', props: ['columnKey'] as any, setup(props, { emit }) { const tdRef = ref(); onMounted(() => { if (tdRef.value) { emit('columnResize', props.columnKey, tdRef.value.offsetWidth); } }); return () => { return ( { emit('columnResize', props.columnKey, offsetWidth); }} >
 
); }; }, });