diff --git a/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx b/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx index 749ba3c31d..2d5b5ef759 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx @@ -179,7 +179,7 @@ function calculateSizePosition (h: number, ch: number, val: string): number { if (!h || !ch) return 0 // 百分比需要单独的计算 - if (isPercent(h))) { + if (isPercent(h)) { h = ch * parseFloat(h) / 100 }