我在调用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. 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">×</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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.