运用vconsole举行挪动端调试

可运用npm举行装置

GitHub地点:https://github.com/Tencent/vC…

npm install vconsole

在项目的根html文件的<head>标签中引入dist/vconsole.min.js

<script src="path/to/vconsole.min.js"></script>
<script>
    // init vConsole
    var vConsole = new VConsole();
    console.log('Hello world');
</script>

也可运用CDN免装置

CDN地点:https://www.bootcdn.cn/vConsole/

<script src="https://cdn.bootcss.com/vConsole/3.2.2/vconsole.min.js"></script>
<script>
    var vConsole = new VConsole();
    console.log('hello world')
</script>

一样须要放在项目根html文件的<head>标签中

    原文作者:Snoopy
    原文地址: https://segmentfault.com/a/1190000018392847
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞