1.0.11 • Published 2 years ago

@uni/system-info v1.0.11

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

systemInfo

npm

Gets system information.

Supported

Install

$ npm install @uni/system-info --save

or

$ npm install @uni/apis --save

Usage

import { getInfo, getInfoSync } from '@uni/system-info';

getInfo().then(res => console.log(res));
let res = getInfoSync();

You can also import from the big package:

import { systemInfo } from '@uni/apis';

systemInfo.getInfo().then(res => console.log(res));
let res = systemInfo.getInfoSync();

Return

PropertyTypeDescription
pixelRationumberDevice's pixel ratio
screenWidthnumberScreen width in px
screenHeightnumberScreen height in px
windowWidthnumberAvailable window width in px
windowHeightnumberAvailable window height in px
languagestringLanguage,zh_CN 简体中文,zh_TW 繁体中文,en 英文
versionstringversion
platformstringClient platform