From c46247772a7a99be3ffed3db6cfd5dfd366ac7d4 Mon Sep 17 00:00:00 2001 From: Leisure <675258207@qq.com> Date: Mon, 7 Sep 2020 15:11:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84pxTransform=E7=9A=84d.?= =?UTF-8?q?ts=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=AC=AC=E4=BA=8C=E4=B8=AA?= =?UTF-8?q?=E5=8F=82=E6=95=B0designWidth=20(#7518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pxTransform 函数在 H5 中运行需要把配置中的 `designWidth` 作为第二个参数传入。 Co-authored-by: chenjiajian <798095202@qq.com> --- packages/taro/types/taro.extend.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taro/types/taro.extend.d.ts b/packages/taro/types/taro.extend.d.ts index fe22bd7cb696..1b95152fbdac 100644 --- a/packages/taro/types/taro.extend.d.ts +++ b/packages/taro/types/taro.extend.d.ts @@ -75,7 +75,7 @@ declare namespace Taro { function atMessage(options: AtMessageOptions): void - function pxTransform(size: number): string + function pxTransform(size: number, designWidth?: number): string function initPxTransform(config: { designWidth: number; deviceRatio: object }) interface RequestParams extends request.Option {