模态背景div被添加,但我无法看到模态dilog。 下面是我的反应组件的代码:
var OpenModal = React.createClass({
render: function(){
return(
<div>
<button type="button" className="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<div className="modal fade" id="myModal" role="dialog">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
<button type="button" className="close" data-dismiss="modal">×</button>
<h4 className="modal-title">Modal Header</h4>
</div>
<div className="modal-body">
<p>Some text in the modal.<br/>
fnfgjdg<br/>
sbdfbsdfbdfbdfb<br/>
fgdnbndbgdbfdvfgnfbfb<br/>
gnbvvghfnbvhfnb<br/>
</p>
</div>
<div className="modal-footer">
<button type="button" className="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
)
}
});
module.exports = OpenModal;
我只想在React中打开一个bootstrap模式。如果有人有任何其他工作样本可以帮助但不使用反应引导程序。