首先使用npm安装bootstrap 和 JQuery
npm install bootstrap --save
npm install JQuery --save
会的到这个:
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
需要下载popper.js
npm install popper.js --save
然后使用:
bootstrap 直接从安装文件里面拿就好,地址是 ./node_modules/bootstrap/dist/css/bootstrap.min.css
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
JQuery 和相关的控件库引入是这样的:
然后得到了如下图的错误:
百度一波:引入方法修改下:
在electron的index.html中这么引入:
<script>window.$ = window.jQuery = require('jquery');</script>
就不会再报这个问题了
关于bootstrap-datepicker的使用,我从网上下载了它,引入,报错,其实可以这么用
npm install bootstrap-datepicker --save
随后引入:
<script> require('bootstrap-datepicker');</script>
就可以正常使用了
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。