zhu-jiang-yi-yuan-bigscreen
Version:
南方医科大学珠江医院大屏端
43 lines (42 loc) • 1.66 kB
TypeScript
declare const BASE_WIDTH = 3840;
declare const MID_WIDTH = 1920;
declare const MIN_WIDTH = 1440;
declare const SMALL_WIDTH = 1024;
declare const BASE_HEIGHT = 2160;
declare const MID_HEIGHT = 1080;
declare const MIN_HEIGHT = 900;
declare const SMALL_HEIGHT = 768;
/**
* x < 3840;
* isHeight = true 时, x < 2160;
*/
declare const isBASE: (px: number | undefined, isHeight?: boolean | undefined) => boolean;
/**
* 1920<= x < 3840;
* isHeight = true 时, 1080<= x < 2160
*/
declare const isBIG: (px: number | undefined, isHeight?: boolean | undefined) => boolean;
/**
* 1440<= x < 1920;
* isHeight = true 时, 900<= x < 1080
*/
declare const isMID: (px: number | undefined, isHeight?: boolean | undefined) => boolean;
/**
* 1024<= x <1440;
* isHeight = true 时, 768<= x <900
*/
declare const isMIN: (px: number | undefined, isHeight?: boolean | undefined) => boolean;
/**
* x < 1024;
* isHeight = true 时, x < 768
*/
declare const isSMALL: (px: number | undefined, isHeight?: boolean | undefined) => boolean;
declare const getCalcNumH: (px: number, docPx?: number | undefined) => number;
declare const getCalcNumW: (px: number, docPx?: number | undefined) => number;
/**
* 将数值转换为比例 *vh 和 *vw
* @param px 以 BASE_HEIGHT/BASE_WIDTH 为基准的数值
* @param isHeight 是否是高度数值
*/
declare const getCalcPx: (px: number | string | undefined, isHeight?: boolean | undefined) => string | number | undefined;
export { isBASE, isBIG, isMID, isMIN, isSMALL, getCalcPx, getCalcNumH, getCalcNumW, BASE_HEIGHT, BASE_WIDTH, MIN_WIDTH, MID_WIDTH, MID_HEIGHT, MIN_HEIGHT, SMALL_WIDTH, SMALL_HEIGHT, };