From 576bb7f5a8bf67651021dd7561e2032230a699c3 Mon Sep 17 00:00:00 2001 From: ozh Date: Wed, 9 Sep 2026 15:04:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(family):=20Modal=20=E5=86=85=E8=81=94=20wid?= =?UTF-8?q?th=20=E9=BB=98=E8=AE=A4=E5=80=BC=E6=94=B9=20rpx=E2=80=94?= =?UTF-8?q?=E2=80=94=E5=86=85=E8=81=94=E6=A0=B7=E5=BC=8F=E4=B8=8D=E8=B5=B0?= =?UTF-8?q?=20pxtransform=EF=BC=8Cpx=20=E4=BC=9A=E4=B8=8E=20scss=20?= =?UTF-8?q?=E9=87=8F=E7=BA=B2=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modal/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/modal/index.tsx b/src/components/modal/index.tsx index e6de8f7..fea6373 100644 --- a/src/components/modal/index.tsx +++ b/src/components/modal/index.tsx @@ -6,10 +6,11 @@ interface Props { visible: boolean onClose: () => void children: ReactNode - width?: string // 默认 600px(编译为 600rpx) + width?: string // 默认 600rpx。内联 style 不经过 postcss pxtransform, + // 必须直接写 rpx 才能与 scss 的 min-width: 600px(→rpx) 同量纲 } -export function Modal({ visible, onClose, children, width = '600px' }: Props) { +export function Modal({ visible, onClose, children, width = '600rpx' }: Props) { if (!visible) return null const panelStyle: CSSProperties = { width }