diff --git a/components/apolloTable/component/DragResized.tsx b/components/apolloTable/component/DragResized.tsx index 7820a7d3fb50f35598160963a5b2204245144acf..a4bdcc9d3f94649d8cbfc62da2927811f0b3cc6b 100644 --- a/components/apolloTable/component/DragResized.tsx +++ b/components/apolloTable/component/DragResized.tsx @@ -48,14 +48,6 @@ const DragResized = (props: any) => { } newColumns.push(item); }); - // 业务回调 - if (typeof onDragResized === 'function') { - onDragResized(newColumns); - } - // table回调 - if (typeof onDragResizedCb === 'function') { - onDragResizedCb(newColumns); - } // 缓存操作 if (cachedFeAttr) { const cachedCols = getCache({ tableId }); @@ -67,6 +59,14 @@ const DragResized = (props: any) => { saveCache({ tableId, data: cachedCols }); } } + // 业务回调 + if (typeof onDragResized === 'function') { + onDragResized(newColumns); + } + // table回调 + if (typeof onDragResizedCb === 'function') { + onDragResizedCb(newColumns); + } }; return ( diff --git a/components/apolloTable/component/DragSorted.tsx b/components/apolloTable/component/DragSorted.tsx index c0dbde148a4cf678d99af2739f2b72e8fe3e6627..7c83406bb6629ffa171add53f120eb01c821471c 100644 --- a/components/apolloTable/component/DragSorted.tsx +++ b/components/apolloTable/component/DragSorted.tsx @@ -187,9 +187,9 @@ const DragSorted = (props: any) => { if (typeof onDragSorted === 'function') { onDragSorted(newColumns); } - // if (typeof onDragSortedCb === 'function') { - // onDragSortedCb(newColumns); - // } + if (typeof onDragSortedCb === 'function') { + onDragSortedCb(newColumns); + } }, [onDragSortedCb, onDragSorted, columns]); // 监听鼠标按下 const onMouseDown = useCallback(