我正在尝试实现弹出窗口,但似乎 poppers.js 不想在 bootstrap.js 之前加载。我试图将包放在引导程序之前,但它不想加载。捆绑配置:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/popper").Include(
"~/Scripts/popper.js"
));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"
));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/xbbcode.css",
"~/Content/site.css"));
}
Run Code Online (Sandbox Code Playgroud)
_布局:
@Scripts.Render("~/bundles/popper")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
Run Code Online (Sandbox Code Playgroud)
我仍然收到此错误:
jQuery.Deferred 异常:Bootstrap 的工具提示需要 Popper.js ( …