Skip to content

Commit

Permalink
Merge pull request #2123 from js-newbee/taro-rn-px-transform
Browse files Browse the repository at this point in the history
fix(taro-rn): pxTransform 计算错误
  • Loading branch information
Pines-Cheng authored Feb 14, 2019
2 parents dd6c722 + b80b0f9 commit f16f051
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 f16f051

Please sign in to comment.