1.在vue 项目里面使用
//导入安装包,安装在devDependencies配置里面 只是开发环境用
npm install vconsole -D
//页面引入
import Vconsole from 'vconsole';
//在created 或者mounted 初始化
this.vConsole = new VConsole();
2.原生html 代码
//引入
<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
<script>
//初始化
let vConsole = new VConsole();
</script>
附:https://blog.csdn.net/u011590754/article/details/116271255