Bootstrap 对话框在 Jquery 3.3.1 的 Bootstrap 4 中不起作用

BootstrapDailog is not working in Bootstrap4 with Jquery 3.3.1

当我调用 BootstrapDialog.confirm 时,我将 BootstrapDialog 与 Bootstrap4 和 Jquery3.3.1 一起使用,然后它会在旧版本的 chrome 中抛出错误 "Uncaught TypeError: Object.keys called on non-object"。我还添加了 Jquery-migrate3.0.0 但没有添加 work.But BootstrapDialog 与 Bootstrap3 和 jquery-2.2.3

一起工作正常

Bootstrap 4 对话框或模式有点奇怪。但试试这个解决方案,希望它对你有用。

    <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>