简体   繁体   English

为什么我的引导模式弹出窗口没有关闭?

[英]Why does my bootstrap modal popup not close?

 $('#popup').modal('hide');

I am trying use this code to close my modal, but it doesn't close.我正在尝试使用此代码关闭我的模式,但它没有关闭。 I wrote this in my ts import * as bootstrap from "bootstrap";我在我的 ts import * as bootstrap from "bootstrap"; . . My Imports in html What can I do to get it working?我在 html 中的导入我该怎么做才能让它工作?

You should look at the documentation again to read the right implementation.您应该再次查看文档以阅读正确的实现。 Also, it looks like you are using Bootstrap 5. You are writing the hide() for older bootstrap versions.此外,您似乎正在使用 Bootstrap 5。您正在为较旧的引导程序版本编写hide()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM