fix(family): Modal 内联 width 默认值改 rpx——内联样式不走 pxtransform,px 会与 scss 量纲不一致
This commit is contained in:
parent
288e681cca
commit
576bb7f5a8
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue