javascript - 为什么引导面板切换在 reactjs 构建版本中不起作用?
问题描述
我可以在我的 reactjs 开发中添加引导面板切换。但是当我部署反应构建代码时,这个面板没有扩展。而且我知道为什么它在构建代码中不起作用,因为我正在使用href="#panl"
. 那么我该如何解决这个问题呢?
render() {
return <div>
<a data-toggle="collapse" href="#panl">Testing</a>
<div className="panel-collapse collapse section-two" id="pan1">
<h1>Here is contant of the panel</h1>
</div>
</div>
}
解决方案
您可能没有正确安装引导程序。运行这些命令来安装它。
npm uninstall --save bootstrap
npm install --save bootstrap
推荐阅读
- sum - 从重复行python3中求和列的值
- java - 可以采用任何子对象的 C# 通用父对象引用
- javascript - 生产部署nestjs应用的正确方式是什么
- javascript - 快进和快退在nodejs服务器中不起作用
- ubuntu - 删除 SSL 证书并在 ubuntu 16 上使用 Letsencrypt NGINX 生成证书的建议
- java - 如何为创建表和添加值的方法编写测试用例
- python - 如何遍历 Spark RDD 以评估嵌套元组中的每个元素并将结果附加到原始 RDD?
- ios - Xcode 版本中的 lldb-rpc-server 是 10.1?
- logstash - 当日志源是文件时,Logstash 如何判断日志文件中哪一行是新的?
- laravel - 错误:流明使用本地时间,同时保存时间戳记录