fix(family): Modal 内联 width 默认值改 rpx——内联样式不走 pxtransform,px 会与 scss 量纲不一致

This commit is contained in:
ozh 2026-09-09 15:04:53 +08:00
parent 288e681cca
commit 576bb7f5a8
1 changed files with 3 additions and 2 deletions

View File

@ -6,10 +6,11 @@ interface Props {
visible: boolean visible: boolean
onClose: () => void onClose: () => void
children: ReactNode 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 if (!visible) return null
const panelStyle: CSSProperties = { width } const panelStyle: CSSProperties = { width }