Skip to content

Commit

Permalink
fix(taro-rn): pxTransform 计算错误
Browse files Browse the repository at this point in the history
  • Loading branch information
js-newbee committed Feb 11, 2019
1 parent 6e6cd8f commit b80b0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-rn/src/native-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function pxTransform (size) {
if (!(designWidth in deviceRatio)) {
throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`)
}
return parseInt(size, 10) / deviceRatio[designWidth] * 2
return parseInt(size, 10) / (deviceRatio[designWidth] * 2)
}

export default function initNativeApi (taro) {
Expand Down

0 comments on commit b80b0f9

Please sign in to comment.