react-bootstrap列内的行/列

时间:2019-12-20 19:31:41

标签: reactjs react-bootstrap

在我的reactjs项目中,我在一列中有一行。在该行中,我需要添加2列。

这是我的代码

chart.js

import React from 'react';
import { Row, Col } from 'react-bootstrap';

export default function(props){
    return(
        <row>        
            <Col lg={1}>                  
            Chart1
            </Col>            
            <Col lg={1}>                  
            Chart2
            </Col>            
        </row>
    )
} 

wrapper.js

export default function(props){
    return(
        <Row>        
            <Col lg={1}>                  
            </Col>            
            <Col lg={4} style={{'overflowX': 'auto'}}>
                <EmployeeList data={props.data}></EmployeeList>
            </Col>            
            <Col lg={6} style={{'overflowX': 'scroll'}}>              
                <Charts></Charts>
            </Col>                        
        </Row>
    )
}

在我的wrapper.js中,我包括了图表组件。图表组件正确显示,但其中的列彼此不相邻。

enter image description here

0 个答案:

没有答案