$ npm install universal-device
System info.
$ npm install universal-device --save
import { platform, appName, screenWidth, screenHeight, px2rpx } from 'universal-device';
appName: string
app name or browser name
platform: string
platform: 'Android'、'iOS'、'MacIntel', etc.
screenWidth: number
Screen width in px
screenHeight: number
Screen height in px
px2rpx(val)
px to rpx method
rpx2px(val)
rpx to px method
Property | Type | Describes | Default | Supports |
---|---|---|---|---|
val | number |
px value | - |
© 2010 - cnpmjs.org x YWFE | Home | YWFE