/** * 事件绑定 * @param el * @param type * @param callback * @param options */ export declare const bindEvent: (el: EventTarget, type: string, callback: EventListenerOrEventListenerObject, options?: AddEventListenerOptions) => void; /** * 事件解绑 * @param el * @param type * @param callback * @param options */ export declare const unbindEvent: (el: EventTarget, type: string, callback: EventListenerOrEventListenerObject, options?: AddEventListenerOptions) => void; /** * 发出自定义事件 * @param el 元素 * @param eventName 事件名 * @param detail 额外数据对象 */ export declare const emitCustomEvent: (el: HTMLElement, eventName: string, detail?: ObjectType) => void; /** * 获取event对象 * @param event */ export declare const getEvent: (event: any) => any; /** * 获取目标对象 * @param event 事件对象 */ export declare const getTarget: (event: any) => any; /** * 阻止事件默认行为 * @param event 事件对象 */ export declare const preventDefault: (event: any) => void; /** * 阻止冒泡 * @param event 事件对象 */ export declare const stopPropagation: (event: any) => void; /** * 获取页面视口宽高 * @returns { pageWidth: number, pageHeight: number } */ export declare const getPageWidthAndHeight: () => { pageWidth: number; pageHeight: number; }; /** * 获取页面坐标(包含滚动部分) * @param event * @returns { pageX: number, pageY: number } */ export declare const getPageCoordinate: (event: any) => { pageX: any; pageY: any; }; /** * 全选元素内的内容 * @param node 元素 */ export declare const selectAllNodeContent: (node: Node) => void; /** * 反选已经选择的元素 */ export declare const deSelectAllNodeContent: () => void; /** * 执行富文本命令 * @param cmd 命令 value 参数 */ export declare const execCommand: ({ cmd, value, }: { cmd: string; value: string; }) => void; /** * 单区域节点拖拽排序 * @param dropZone 被拖拽元素所在的区域,必须 * @param draggedClass 允许被拖拽元素的样式 * @param draggedClass 被拖拽元素的样式 * @param dragInClass 释放目标元素的悬浮样式 * @param callback 回调函数 */ export declare const dragSort: (draggedClass: string, dragInClass: string, callback: Function) => { unbindEvents: (dropZone: HTMLElement) => void; bindEvents: (dropZone: HTMLElement) => void; }; declare class ZIndexBuilder { private seed; getValue: () => number; } export declare const zIdexBuilder: ZIndexBuilder; /** * 手动锚点跳转,scrollBy实现 * @param selectorOrOffset 元素选择器或偏移量 * @param scrollSelector 滚动容器选择器 */ export declare const goAnchor: (selectorOrOffset: string | number, scrollSelector: string) => void; /** * @deprecated * 复制至粘贴板 * @param text 复制文本 */ export declare const copyToClipboard: (text: string) => boolean; /** * 复制文本至粘贴板 * @param text 复制文本 * @returns true|false */ export declare const copyTextToClipboard: (text: string) => Promise; /** * 复制到剪切板,IE不支持 * @param data * @returns true|false */ export declare const copyItemsToClipboard: (data: ClipboardItems) => Promise; /** * * @param url 请求链接 * @param filename 文件名 */ export declare const downloadFile: (url: string, filename: String) => void; /** * 获取当前节点最近的position非static节点 * @param el * @returns 最近的相对节点 */ export declare const getRelativeParentTarget: (el: HTMLElement) => HTMLElement | null; /** * 获取非复合css属性的计算值 * @param el 元素 * @param type css属性 * @returns 字符串数值 */ export declare const getNormalComputedStyle: (el: Element, type: string) => number; export {};