前端:移动端如何看控制台

方法一:

在项目的index.html的<head></head>里面写上下面的代码:

<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>

方法二:

用vconsole(项目地址:https://github.com/Tencent/vConsole/blob/dev/doc/tutorial_CN.md)

(1)npm install vconsole

(2)在main.js(vue项目的话):

  import Vconsole from 'vconsole'

  const vConsole = new Vconsole();

猜你喜欢

转载自www.cnblogs.com/nuonuo-D/p/10945236.html
今日推荐