报错
文章平均质量分 66
记录一些JS报错及处理,记录一些React报错及处理
墨语轩
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
webstorm报错cliEngineCtor is not a constructor this.options.parse is not a function at ESLintPlugin
webstorm报错cliEngineCtor is not a constructor this.options.parse is not a function at ESLintPlugin原创 2023-01-12 15:43:30 · 4298 阅读 · 2 评论 -
解决 excel 文件上传时更改选中的文件出现错误net::ERR_UPLOAD_FILE_CHANGED
net::ERR_UPLOAD_FILE_CHANGED原创 2022-07-01 10:14:59 · 4417 阅读 · 0 评论 -
has been blocked by CORS policy: Method PUT/DELETE is not allowed by Access-Control-Allow-Methods in
问题描述:当前位置需要向 B 公司某个接口对接,更改数据,但是他的请求方式是 PUT/DELETE ,然后就出现了如下这个报错: 跟后端沟通,后端说设置了如下允许所有的请求方式,但是还是跨域报错Access-Control-Allow-Methods: *headers.add("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PUT, DELETE");...原创 2020-10-30 16:47:11 · 4949 阅读 · 1 评论 -
has been blocked by CORS policy: Request header field secret is not allowed by Access-Control-Allow-
_getData({ url: 'xxxxxx', para: { DeviceName: 'test', IP: "192.168.66.99", }, contentType: 'application/json', beforeSend: function (xhr) { xhr.setRequestHeader('Secret', 'xxx'); xhr.setRequestHeader(.原创 2020-10-29 15:23:26 · 20962 阅读 · 4 评论 -
IE下 new Date().getTime() 返回NaN
问题:new Date("2020-05-06 16:37:56").getTime() 在IE下会返回NaN,而其他浏览器可以正常返回毫秒数。原因:由于毫秒数在IE浏览器下没有正确获得,所以在之后的计算中,计算结果为 undefined。没有正确获得的原因时因为参数格式在 IE 中出现问题,使用 IE 的 new Date() 方法,参数中的日期格式 必须时 YYYY/MM/DD 而不能是 YYYY-MM-DD(其他浏览器中都可以)。所以我们需要做的就是转换日期格式。解决办法:2.使用 new原创 2020-05-11 14:38:46 · 1163 阅读 · 0 评论 -
react报错:Warning: Can't perform a React state update on an unmounted component. This is a no-op, but
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in ...原创 2019-09-27 16:14:43 · 10455 阅读 · 1 评论 -
js使用async报错:Uncaught ReferenceError: regeneratorRuntime is not defined
在react hook中用async await处理请求的数据时,发现报错了,如下:Uncaught ReferenceError: regeneratorRuntime is not defined。使用时的代码:useEffect(_=>{async function fetchData(){ let res = await post('situationInde...原创 2019-09-29 09:34:56 · 5421 阅读 · 0 评论
分享