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 }