我想要使组件隐藏的时候, 下面div的高度去掉要怎么实现?

我想要使{productfobpricedom}组件隐藏的时候, 下面style={{ height:'49px'}}的高度去掉要怎么实现?

let msgdom = '';

    if (productsubjectdom || minorderunitdom || productfobpricedom || modifiershowdom || maskmoduledom) {
        msgdom = <div className={"msgbox"} style={{ backgroundColor: itemstyle.msgbgcolor, }}>
                {productfobpricedom}                <div style={{ height:'49px'}}>
                    {minorderunitdom}
                    {modifiershowdom}
                    {productsubjectdom}                </div>
            </div>
    }


郎朗坤
浏览 648回答 1
1回答

翻过高山走不出你

你可以根据控制组件隐藏与否的那个值,来绑定style啊
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

React.JS