Comments (6)
这个似乎并没有很好的办法,要接管 console.log() 行为必然会导致入侵原生设定。
在电脑上调试的时候,可以先不加载 vConsole……
from vconsole.
可以通过其他方式调试。别用console.log('test'),
1、 改为console.dir('test'),因为vconsole目前没接管console.dir。
2、临时debug的时候,可以使用console.error('test');error会出现堆栈信息,点开就能看到你代码行位置。当然,用完记得删掉,免得红色一篇。
from vconsole.
好吧,看来是不太好解决,能否给vConsole增加一个初始化方法,可以让用户根据情况比如一个url参数来决定是否要启用vConsole,因为页面JS是预先打包好的上传到CDN的
from vconsole.
我也是使用者,我之前看过代码,发现只要引用就会调用。
但我也是集成在项目中,通过模块化方式引用就好,触发条件,自己控制。如你所需,你可以每次刷新页面时候,添加个判断url,若满足条件,按需引用加载vConsole,就完事了
from vconsole.
@oliverzy 这个参数你可以自己定义,例如用php的话(其他语言同理,自己判断参数之后再输出到html里边):
from vconsole.
Chrome 设置中的 ignore List 添加配置即可,添加这一项:/vconsole\-3\.3\.4\.min\.js\b
匹配模式为你的文件名,你可以根据具体文件名来设置
https://juejin.cn/post/6974564001657143333
from vconsole.
Related Issues (20)
- uniapp的vue2不支持吗?
- 按钮文字能改吗 HOT 1
- Console.group 能否增加颜色支持?
- 可以优化 vConsole 的类型导出吗?
- 前端进行SSE流式传输数据时报错length未定义 HOT 3
- 内容UI显示不全
- 企业微信私有版中vconsole不显示response的内容。
- 开启network面板,会导致 wasm 文件加载两次, HOT 1
- nextjs的项目中使用了vConsole,在页面中导入wasm的函数页面报错 HOT 1
- 样式错乱
- PC浏览器上是不是位置无法拖动 HOT 1
- fetch.toString error Function.prototype.toString requires that 'this' be a Function in chrome 61
- 请问vConsole在uniapp的vue3+vite的cli项目中是不能用的吗?按照安装流程,走真机运行到安卓或者苹果机子的时候总是报错 HOT 2
- 使用console.timeLog('K88', i), 报找不到
- 第三方CDN被投毒 HOT 14
- npm包中缺少dist文件夹(v3.15.1版本)
- 抓取Server Sends Event就报错
- vue3引入vconsole后页面空白
- can web check websocket connection in network tab?
- 版本v3.15.1,vconsole底部ok按钮点击,样式错乱
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vconsole.