hongluan-ui
Version:
Hongluan Component Library for Vue 3
33 lines (32 loc) • 833 B
TypeScript
import type { InjectionKey } from 'vue';
import type Node from './node';
interface TreeNode {
node: Node;
$el?: HTMLElement;
}
interface DragOptions {
event: DragEvent;
treeNode: TreeNode;
}
export interface DragEvents {
treeNodeDragStart: (options: DragOptions) => void;
treeNodeDragOver: (options: DragOptions) => void;
treeNodeDragEnd: (event: DragEvent) => void;
}
export declare const dragEventsKey: InjectionKey<DragEvents>;
export declare function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }: {
props: any;
ctx: any;
el$: any;
dropIndicator$: any;
store: any;
}): {
dragState: import("vue").Ref<{
showDropIndicator: boolean;
draggingNode: any;
dropNode: any;
allowDrop: boolean;
dropType: any;
}>;
};
export {};