/** * Created by Jacky.gao on 2016/5/27. */ import React,{Component,PropTypes} from 'react'; import ReactDOM from 'react-dom'; export default class CommonDialog extends Component{ componentDidMount(){ const $dom=$(ReactDOM.findDOMNode(this)); $dom.on('show.bs.modal',function () { let zIndex=1050; $(document).find('.modal').each(function (index,modal) { const zindex=$(modal).css('z-index'); if(zindex && zindex!=='' && !isNaN(zindex)){ const z=parseInt(zindex); if(z>zIndex){ zIndex=z; } } }); $dom.css('z-index',zIndex+1); }); } render(){ const buttons=[]; this.props.buttons.forEach((btn,index)=>{ buttons.push() }); const large=this.props.large; const className='modal-dialog'+ (large ? ' modal-lg' : ''); return (
); } };