Popper.js 不会加载 [英] Popper.js won't load
本文介绍了Popper.js 不会加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Bootstrap,我希望使用下拉菜单.当我点击它时它不起作用,控制台中出现以下消息:
I am using Bootstrap and I wish to use a dropdown menu. When I click it it does not work and the following message appears in console:
Uncaught TypeError: Bootstrap dropdown require Popper.js (https://popper.js.org)
我用谷歌搜索并找到了一种安装 popper 的方法,但是当我尝试运行安装命令时:
I googled and found a way to install popper, but when I try to run the install command:
PM> Install-Package popper.js
visual studio 包管理器显示以下消息:
The visual studio package manager shows the following message:
Package 'popper.js.1.12.9' already exists in project '<ProjectName>'
有人知道这里发生了什么吗?
Does anyone know what's going on here?
推荐答案
这一定是您所说的针对您的问题的原因.包含脚本文件的顺序应该是这样的:
This must be the reason looking to your problem you are saying . The order of including script file should be like this :
1> jquery
2> popper js
2> popper js
3> Bootstrap js
3> Bootstrap js
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
这篇关于Popper.js 不会加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文