if (/\.djtest\.cn/.test(window.location.href)) {
// 开发和测试环境,长按页面5秒,回弹出vconsole,用于debug
let pressStart
document.addEventListener('touchstart', () => { pressStart = Date.now() }, false)
document.addEventListener('touchend', () => {
if ((Date.now() - pressStart) > 5000) {
import('vconsole').then((VConsole) => {
new VConsole()
})
}
}, false)
}
复制代码
如何引入vsconsole
最新推荐文章于 2024-07-08 10:29:00 发布