diff --git a/src/hooks/useDragSort.tsx b/src/hooks/useDragSort.tsx index 40a1784acf..5e93275069 100644 --- a/src/hooks/useDragSort.tsx +++ b/src/hooks/useDragSort.tsx @@ -89,7 +89,7 @@ export default function useDragSort(props: any) { // 当props.theme === "normal" 会多出一个指示条为第一个dom节点,所以需要减1 const currentIndex = props.theme === 'card' ? dragIndex : dragIndex - 1; const endIndex = props.theme === 'card' ? targetIndex : targetIndex - 1; - props.onDragSort({ + props.onDragSort?.({ currentIndex, current: props.panels[currentIndex].value, targetIndex: endIndex,