@uni/system-info
v1.0.11
Published
Readme
systemInfo
Gets system information.
Supported
Install
$ npm install @uni/system-info --saveor
$ npm install @uni/apis --saveUsage
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
| Property | Type | Description |
| --- | --- | --- |
| pixelRatio | number | Device's pixel ratio |
| screenWidth | number | Screen width in px |
| screenHeight | number | Screen height in px |
| windowWidth | number | Available window width in px |
| windowHeight | number | Available window height in px |
| language | string | Language,zh_CN 简体中文,zh_TW 繁体中文,en 英文 |
| version | string | version |
| platform | string | Client platform |
