Skip to content

Commit

Permalink
fix: 完善pxTransform的d.ts,增加第二个参数designWidth (#7518)
Browse files Browse the repository at this point in the history
pxTransform 函数在 H5 中运行需要把配置中的 `designWidth` 作为第二个参数传入。

Co-authored-by: chenjiajian <798095202@qq.com>
  • Loading branch information
xiaoyao96 and Chen-jj authored Sep 7, 2020
1 parent f161ced commit c462477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro/types/taro.extend.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
Expand Down

0 comments on commit c462477

Please sign in to comment.