代码拉取完成,页面将自动刷新
declare class MobileDetect {
static version: string;
static isPhoneSized(maxPhoneWidth?: number): boolean;
// only used internally; if necessary, one can replace, intercept or augment particular methods or values
static _impl: MobileDetect.MobileDetectImpl;
constructor(userAgent: string, maxPhoneWidth?: number);
mobile(): string|null;
phone(): string|null;
tablet(): string|null;
userAgent(): string;
userAgents(): string[];
os(): string;
version(value: string): number;
versionStr(value: string): string;
is(key: string): boolean;
match(pattern: string|RegExp): boolean;
isPhoneSized(maxPhoneWidth?: number): boolean;
mobileGrade(): string;
}
declare namespace MobileDetect {
interface MobileDetectRules {
[key: string]: string|RegExp;
}
interface MobileDetectComplexRules {
[key: string]: string|RegExp|string[]|RegExp[];
}
interface MobileDetectImpl {
mobileDetectRules: {
phones: MobileDetectRules;
tablets: MobileDetectRules;
oss: MobileDetectRules;
uas: MobileDetectRules;
props: MobileDetectComplexRules;
utils: MobileDetectRules;
};
detectMobileBrowsers: {
fullPattern: RegExp;
shortPattern: RegExp;
tabletPattern: RegExp;
};
FALLBACK_PHONE: string;
FALLBACK_TABLET: string;
FALLBACK_MOBILE: string;
findMatch(rules: MobileDetectRules, userAgent: string): string;
findMatches(rules: MobileDetectRules, userAgent: string): string[];
getVersionStr(propertyName: string, userAgent: string): string;
getVersion(propertyName: string, userAgent: string): number;
prepareVersionNo(version: string): number;
isMobileFallback(userAgent: string): boolean;
isTabletFallback(userAgent: string): boolean;
prepareDetectionCache(cache: Object, userAgent: string, maxPhoneWidth?: number): void;
mobileGrade(md: MobileDetect): string;
detectOS(userAgent: string): string;
getDeviceSmallerSide(): number;
}
}
export = MobileDetect;
export as namespace MobileDetect;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。