简体   繁体   English

BootstrapDailog在带有Jquery 3.3.1的Bootstrap4中不起作用

[英]BootstrapDailog is not working in Bootstrap4 with Jquery 3.3.1

我在调用BootstrapDialog.confirm时将BootstrapDialog与Bootstrap4和Jquery3.3.1一起使用,它将在较旧版本的chrome中抛出错误“未捕获的TypeError:Object.keys调用非对象”。我还添加了Jquery-migrate3.0.0,但没用,但是BootstrapDialog可以与Bootstrap3和jquery-2.2.3一起正常工作

Bootstrap 4 Dialog or Modals have been little weird. Bootstrap 4 Dialog或Modals有点奇怪。 But try this solution and hope it works for you. 但是请尝试此解决方案,并希望它对您有用。

    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
  Launch demo modal
</button>

<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalCenterTitle">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM