摘要:
看了很多资料,都说是关闭热更新要么注释掉代码完美解决。我寻思这不就没有热更新功能了吗。 不妨试试检查下项目端口是否一致,然后查看下请求地址是否是本地地址。有可能是因为被shadowsocket代理了 解决方案:没断网的情况下 shadowsocket里面设置绕过本地服务器 阅读全文
摘要:
导航不允许导航到当前位置https://stackoverflow.com/questions/57837758/navigationduplicated-navigating-to-current-location-search-is-not-allowed 最简单方法 :push后面加个异常捕获 阅读全文
摘要:
解决方案:参考 https://stackoverflow.com/questions/37986800/node-sass-couldnt-find-a-binding-for-your-current-environment 我遇到这个问题是下载sass-loader node-sass时遇到的 阅读全文
摘要:
// 引入mongoose模块 const mongoose = require('mongoose'); // 链接数据库 mongoose.set('useCreateIndex', true) //加上这个 mongoose.connect('mongodb://localhost/xxxxx 阅读全文
摘要:
setting.json文件中 增加 "files.associations": { "*.art": "html" } 即可 "files.associations": { "*.art": "html" } 即可 阅读全文
摘要:
执行default任务时,依次执行以下任务 gulp.task('default', ['htmlmin', 'cssmin', 'jsmin', 'copy']); 执行default任务时,依次执行以下任务 gulp.task('default', ['htmlmin', 'cssmin', ' 阅读全文
摘要:
代码如下: 报错: [01:26:16] The following tasks did not complete: first[01:26:16] Did you forget to signal async completion? 原因: 这是gulp4.0版本使用task时,回调函数使用匿名函 阅读全文
摘要:
setTimeout(回调函数,延迟时间) 回调函数要用匿名函数,且里面不能输参数,可以写成这样的形式 setTimeout(function(){ fn(a); },1000) 不能这么写: setTimeout(fn(a),1000) 阅读全文
摘要:
var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var dates = date.getDate(); var day = date.getDay(); var arr = 阅读全文
摘要:
//网课还没学到函数,不知道有没有更好的方法唉,这么写好麻烦 var num = prompt('输入一个整数我来判断奇数偶数'); num = num - '0'; //先把num转换为数字型 /* if(num%2 == 0){偶数}else if(num%2 == 1){奇数}else{输入数 阅读全文