Tag: bootstrap 4

我怎样才能让数字只在Swal Sweetalert

我想知道如何才能让这个部分只有数字。 { title: "Dollar Amount?", text: "How much is your Dollar Question worth?", inputPlaceholder: "Enter Amount" } 我正在使用一个Sweetalert插件。 这几天一直在困扰着我,而我只是新的前端,我真的是一个完整的后端人。 function showDollarQuestion() { if (inUserId === "" || inUserId === null) { socket.emit('stud notif', myuserid,myuserid,"noroom"); }else{ swal.setDefaults({ input: 'text', confirmButtonText: 'Next →', showCancelButton: true, animation: false, progressSteps: ['1', '2'] }) var steps = [ { title: […]

Bootstrap 4将数据传递给远程模式

我正在使用NodeJs和Express。 我需要将数据库中的一些数据(MongoDB)传递到Bootstrap 4中的远程模式。我知道Bootstrap在v4中删除了“remote”选项,但是我需要在不同的文件中有不同的内容。 现在,我可以从数据库发送数据,用远程内容打开模式,但是这个远程内容还没有收到来自数据库的数据。 这是我的代码: 触发button: <a id="btn1" data-remote="myContent.ejs" data-foo="<%=some.data1%>" data-fighter="<%=some.data2%>" data-toggle="modal" data-target="#Modal1">Click me!</a> 模式(在同一个文件中): <div class="modal fade" id="Modal1" role="dialog"> <div class="modal-dialog"> <!– Modal content–> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4>My Modal</h4> </div> <div class="modal-body" id="modalR"> <!–REMOTE CONTENT GOES HERE–> <script type="text/javascript" charset="utf-8"></script> </div> <div class="modal-footer"> <div class="form-group col-md-offset-9"> <button type="submit" class="btn […]

与Material Design Bootstrap不兼容的单位:'rem'和'px'

有没有人设法从Material Design Bootstrap中添加了Keystone.js默认模板中的SCSS? 我是新来的node.js和前端开发,所以我不知道我在做什么,但是bascially添加MDB文件夹在我的public/styles 。 之后,我修改了sites.scss ,我注释了@import "site/variables"; 和@import "site/layout"; 我添加了@import "mdb"; 但是这似乎并不奏效。 我得到的错误: in /my_path/public/styles/mdb/free/data/_variables-b4.scss:320:34 Error thrown for request: /styles/site.css Error: Incompatible units: 'rem' and 'px'. at options.error (/my_path/node_modules/node-sass/lib/index.js:291:26) 任何人的想法?

Js压缩uglify-js给错误意外的标记:名称($)

我通过uglify-js压缩我的js文件我想压缩Bootstrap 4 js文件,但它给我这样的错误。 我可以只通过uglify-js压缩所有的js文件吗? 或者我该怎么做。 Parse error at src\bootstrap\alert.js:1,7 import $ from 'jquery' ^ ERROR: Unexpected token: name ($) 我的package.json "devDependencies": { "node-sass": "^4.6.1", "nodemon": "^1.12.1" }, "dependencies": { "autoprefixer": "^7.1.6", "jquery": "^3.2.1", "postcss-cli": "^4.1.1", "uglify-js": "^3.1.9" }