vue-devui
Version:
DevUI components based on Vite and Vue3
60 lines (59 loc) • 2.3 kB
TypeScript
import { EventEmitter } from './preserve-next-event-emitter';
import { DragDropService } from './drag-drop.service';
import { NgDirectiveBase, NgSimpleChanges } from './directive-base';
import { DraggableDirective } from './draggable.directive';
import { DirectiveBinding } from 'vue';
export type BatchDragStyle = 'badge' | 'stack' | string;
export interface IBatchDraggableBinding {
batchDragGroup?: string;
batchDragActive?: boolean;
batchDragLastOneAutoActiveEventKeys?: Array<string>;
batchDragStyle?: string | Array<string>;
}
export interface IBatchDraggableListener {
'@batchDragActiveEvent'?: (_: any) => void;
}
export declare class BatchDraggableDirective extends NgDirectiveBase<IBatchDraggableBinding, IBatchDraggableListener> {
private draggable;
private dragDropService;
static INSTANCE_KEY: string;
batchDragGroup: string;
batchDragActive: boolean;
batchDragLastOneAutoActiveEventKeys: string[];
batchDragStyle: Array<BatchDragStyle>;
batchDragActiveEvent: EventEmitter<any>;
dragData?: any;
needToRestore: boolean;
constructor(draggable: DraggableDirective, dragDropService: DragDropService);
ngOnInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: NgSimpleChanges): void;
ngAfterViewInit(): void;
initDragDataByIdentity(): {
identity?: any;
draggable: DraggableDirective;
dragData: any;
} | null | undefined;
registerRestoreDragDataViewAfterViewInitWhiteDragging(): void;
restoreDragDataViewAfterViewInit(): void;
allowAddToBatchGroup(): boolean;
addToBatchGroup(dragData?: any): void;
removeFromBatchGroup(dragData?: any): void;
private addToArrayIfNotExist;
private deleteFromArrayIfExist;
private findInBatchDragDataByIdentities;
active(): void;
updateDragData(): void;
}
declare const _default: {
mounted(el: HTMLElement & {
[props: string]: any;
}, binding: DirectiveBinding<IBatchDraggableBinding & IBatchDraggableListener>, vNode: any): void;
updated(el: HTMLElement & {
[props: string]: any;
}, binding: DirectiveBinding<IBatchDraggableBinding & IBatchDraggableListener>): void;
beforeUnmount(el: HTMLElement & {
[props: string]: any;
}): void;
};
export default _default;