UNPKG

snowy-designer

Version:

基于Epic-Designer-Pro版本的设计器,可视化开发页面表单

40 lines (39 loc) 1.13 kB
import { Ref } from 'vue'; /** * 是否按住键盘状态 * @returns * pressSpace: Ref<boolean>; * pressShift: Ref<boolean>; * pressCtrl: Ref<boolean>; */ export declare function useKeyPress(): { pressCtrl: Ref<boolean, boolean>; pressShift: Ref<boolean, boolean>; pressSpace: Ref<boolean, boolean>; }; /** * 拖拽元素 * @param editScreenContainer */ export declare function useElementDrag(editScreenContainer: Ref<HTMLDivElement | null>): { handleElementDrag: (event: DragEvent, draggable?: boolean) => void; handleElementDragEnd: () => void; handleElementDragStart: (event: DragEvent, draggable?: boolean) => void; }; /** * 缩放元素 * @param draggableElRef */ export declare function useElementZoom(draggableElRef: Ref<HTMLDivElement | null>): { canvasScale: Ref<number, number>; handleZoom: (event: WheelEvent) => void; }; /** * 创建定时任务hooks * @param handler 任务函数 * @param timeout 任务间隔 */ export declare function useTimedQuery(handler: () => void, timeout?: number): { startTimedQuery: () => void; stopTimedQuery: () => void; };