UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

15 lines (14 loc) 616 B
import type { RefObject } from 'react'; import type { Option } from 'jamis-core'; import type { IDropIndicator, TreeCompProps } from './types'; export declare const useDragDrop: (config: { containerRef: RefObject<HTMLDivElement>; draggable?: boolean; onMove: TreeCompProps["onMove"]; dragStartHook?: (node: Option) => void; }) => { dropIndicator: IDropIndicator | null; onDragStart: (node: Option) => (e: React.DragEvent<Element>) => void; onDragEnd: (dragNode: Option) => (e: React.DragEvent<Element>) => void; onDragOver: (node: Option) => (e: React.DragEvent<Element>) => void; };