美文网首页
weex中判断设备的机型

weex中判断设备的机型

作者: 异乡人_4f2a | 来源:发表于2019-03-06 14:33 被阅读0次

以下为各设备对应的deviceModel:

iPhone 5:

iPhone5,1

iPhone5,2

iPhone 5c:

iPhone5,3

iPhone5,4

iPhone 5s:

iPhone6,1

iPhone6,2

iPhone 6:

iPhone7,2

iPhone 6 Plus:

iPhone7,1

iPhone 6s:

iPhone8,1

iPhone 6s Plus:

iPhone8,2

iPhone SE:

iPhone8,4

iPhone 7:

iPhone9,1

iPhone 7 Plus:

iPhone9,2

iPhone X:

iPhone10,3

iPhone XR:

iPhone11,8

iPhone XS:

iPhone11,2

iPhone XS Max:

iPhone11,6

判断某种尺寸的设备各按如下方式,例如判断是否是iPhone 5:

weex.config.env.deviceModel == "iPhone5,1" || weex.config.env.deviceModel == "iPhone5,2"

相关文章

网友评论

      本文标题:weex中判断设备的机型

      本文链接:https://www.haomeiwen.com/subject/ocitpqtx.html