1、安装
npm install eruda --save
2、引入
<script src="node_modules/eruda/eruda.js"></script> <script>eruda.init();</script>
也可以在jsDelivr和cdnjs上使用
<script src="//cdn.jsdelivr.net/npm/eruda"></script> <script>eruda.init();</script>
3、写入js
;(function () { var src = '//cdn.jsdelivr.net/npm/eruda'; if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return; document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>'); document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>'); })();
标签:npm,eruda,document,write,init,工具,移动,true,调试 From: https://www.cnblogs.com/axdbk/p/17700443.html