noname/node_modules/noname-typings/HTMLDivElementEx.d.ts

79 lines
2.4 KiB
TypeScript
Raw Normal View History

//noname内扩展的一些HTMLDivElement方法
interface HTMLDivElement {
_link: any;
/**
* className动画标记
*
* @param name className
* @param time
*/
addTempClass(name: string, time?: number): HTMLDivElement;
/**
*
*/
hide(): HTMLDivElement;
unfocus(): HTMLDivElement;
refocus(): HTMLDivElement;
show(): HTMLDivElement;
/**
* div
* @param time
* @param callback
*/
delete(time: number, callback?: () => void): HTMLDivElement;
delete(): HTMLDivElement;
/**
* div移除
*
* card设置将position到destinyget.position中position目标处
* @param position
* @param time
*/
goto(position: HTMLDivElement, time?: number): HTMLDivElement;
/**
*
*/
fix(): HTMLDivElement;
/**
* /
* @param name 自定义格式名: xxx:xxxxxxxx:xx
* @param type
* @param ext :.jpg,noskin".jpg"
* @param subfolder ,
*/
setBackground(name: string, type?: string, ext?: string, subfolder?: string): HTMLDivElement;
/**
*
* @param img
*/
setBackgroundDB(img: string): HTMLDivElement;
/**
*
* @param img
*/
setBackgroundImage(img: string): HTMLDivElement;
/**
* /
* @param func
*/
listen(func: (this: HTMLDivElement, event: Event) => void): HTMLDivElement;
/**
* webkitTransitionEnd
* @param func
* @param time
*/
listenTransition(func: () => void, time: number): number;
/**
*
* @param args
*/
setPosition(...args: number[]): HTMLDivElement;
/**
* css样式
* @param style
*/
css<T extends keyof CSSStyleDeclaration>(style: {
[key in T]?: string
}): void;
}