【问题标题】:BootstrapDailog is not working in Bootstrap4 with Jquery 3.3.1Bootstrap 对话框在带有 Jquery 3.3.1 的 Bootstrap 4 中不起作用
【发布时间】:2018-12-08 14:03:09
【问题描述】:

当我调用 BootstrapDialog.confirm 时,我将 BootstrapDialog 与 Bootstrap4 和 Jquery3.3.1 一起使用,那么它会在旧版本的 chrome 中抛出错误“Uncaught TypeError: Object.keys called on non-object”。我还添加了 Jquery-migrate3 .0.0 但不起作用。但 BootstrapDialog 与 Bootstrap3 和 jquery-2.2.3 一起工作正常

【问题讨论】:

  • 请提供您的代码
  • 实际上当我将 bootstrap 更新到 bootstrap4.1 时它可以工作。谢谢您的回复

标签: bootstrap-4 android-webview jquery-3 jquery-migrate bootstrap-dialog


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-25
    • 1970-01-01
    • 1970-01-01
    • 2019-02-08
    • 1970-01-01
    • 1970-01-01
    • 2018-05-20
    • 2018-11-20
    相关资源
    最近更新 更多