在vue3.0脚手架中使用console.log却报错,why? 如何解决?


在package.json中找到 eslintConfig -->  rules --> 添加   "no-console": "off"
就ok啦

造成这个问题的原因是vue3.x脚手架使用eslint代码检测质量提醒造成的, 或者使用window.console.log(), 也可以解决问题,就不需要配置了

猜你喜欢

转载自www.cnblogs.com/big--Bear/p/12145421.html