diff --git a/packages/taro-rn/src/native-api.js b/packages/taro-rn/src/native-api.js index de389af26190..9e6fe62d85f2 100644 --- a/packages/taro-rn/src/native-api.js +++ b/packages/taro-rn/src/native-api.js @@ -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) {