bootstrap-4 - BootstrapDailog 在带有 Jquery 3.3.1 的 Bootstrap4 中不起作用
问题描述
我在调用 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 4 Dialog 或 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">×</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>
推荐阅读
- sql - 使用 sql server 前导零
- python - tensorflow通过元素之和(或L1范数)裁剪元素正向量
- c# - Crystal Reports 对象处置
- json - 自动从谷歌表中将数据导出为 json
- c++ - 为什么我不能在 C++ 模板中使用 std::string?
- python - Python:使用 groupby() 和 apply() 对聚集数据中的日期时间进行排序
- c# - Blazor - 在一个解决方案中重定向到另一个项目中的页面(我的意思是在一个项目空间中)
- amazon-dynamodb - AWS Java SDK - 如何通过 AppSync 连接 dynamodb
- multithreading - Go 调度器什么时候会创建一个新的 M 和 P?
- php - 在 PHP 中调用 run multirequest 需要什么类型的配置?