SafetyScreen-ui/node_modules/autofit.js/es/index.d.ts

64 lines
2.1 KiB
TypeScript
Raw Normal View History

2025-03-29 19:33:58 +08:00
export interface IgnoreOption {
el: string;
height?: string;
width?: string;
scale?: number;
fontSize?: number;
}
export interface AutofitOption {
el?: string;
dw?: number;
dh?: number;
resize?: boolean;
ignore?: (IgnoreOption | string)[];
transition?: number;
delay?: number;
limit?: number;
cssMode?: "scale" | "zoom";
allowScroll?: boolean;
}
declare interface autofit {
/**
*
*
*
* @param {AutofitOption|String|undefined} options
* @param {boolean|undefined} isShowInitTip
* -
* - el "body"
* - dw稿 1920
* - dh稿 1080
* - resizeresize事件 true
* - ignore()readme.md
* - transition 0
* - delay 0
* - limit 0.1
* - cssMode scale scale zoom, zoom
*/
init(options?: AutofitOption | string, isShowInitTip?: boolean): void;
/**
* @param {String} id
* autofit.js造成的影响
*
*/
off(id?: string): void;
/**
* autofit.js是否正在运行
*/
isAutofitRunnig: boolean;
/**
* @param {string} el -
* @param {boolean} isKeepRatio - truefalse时将充满父元素
* @param {number|undefined} level - ( 1)
*/
elRectification: typeof elRectification;
/**
*
*/
scale: number;
}
declare const autofit: autofit;
declare function elRectification(el: string, isKeepRatio?: string | boolean, level?: string | number): void;
export { elRectification };
export default autofit;