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

79 lines
2.3 KiB
TypeScript
Raw Normal View History

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