首先,你的問題&樣品不是你想達到什麼說清楚,所以我的答案可能是缺少了這一點:)
你基本上要一個2列布局與conditionnal顯示爲混合第一列。
列顯示將由bootstrap完全處理(並且實際上你在這裏與你的列混淆了很多),條件顯示應該通過你的組件狀態進行管理。
首先你的版面應該像這樣的財產以後:
<div className='row'>
<div className='col-sm-7'>
<div> [your chart here] </div>
</div>
<div className='col-sm-5'>
<div> [your first block here] </div>
<div> [your second block here] </div>
</div>
</div>
然後,你需要你的組件狀態裏面一個布爾值,將決定圖表中是否應該顯示。讓我們假設你存儲在this.state.showChart
<div className='row'>
{this.state.showChart ?
<div className='col-sm-7'>
<div> [your chart here] </div>
</div>
: '' }
<div className='col-sm-5'>
<div> [your first block here] </div>
<div> [your second block here] </div>
</div>
</div>
此信息。如果這是insuffisant,儘量提高你的解釋了一下,我可以在你的沙箱樣品直接工作:)