From b80b0f91f3d16097d2932d25f2ac38cb13a45799 Mon Sep 17 00:00:00 2001 From: js-newbee Date: Mon, 11 Feb 2019 10:38:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(taro-rn):=20pxTransform=20=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-rn/src/native-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {