在JSX中,有一些样式属性是不支持转为px的,比如lineHeight
<div style={
{ width: 100, lineHeight: 22 }} />
这无法被正确解析为行高值
应该这么写
<div style={
{ width: 100, lineHeight: '22px' }} />
在JSX中,有一些样式属性是不支持转为px的,比如lineHeight
<div style={
{ width: 100, lineHeight: 22 }} />
这无法被正确解析为行高值
应该这么写
<div style={
{ width: 100, lineHeight: '22px' }} />