Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.warn在dist build中仍然提示 #190

Open
AndyRightNow opened this issue Aug 16, 2017 · 1 comment
Open

console.warn在dist build中仍然提示 #190

AndyRightNow opened this issue Aug 16, 2017 · 1 comment

Comments

@AndyRightNow
Copy link

 s.log("the computed '" + t + "' don't define the get function,  get data." + t + " altnately", "warn")

如上是在dist build里的警告消息,如果一个组件里有比较多的computed properties,并且基本上只是作为pure functional computed getters来用的话,如果不明确写setter,整个console就会被这个警告消息占满了,开发的时候不方便,production之后显示这些也不好,不太明白为什么没有根据development build和production build来开关警告提示?这样的话为了抑制这些消息就只能给那些computed properties一个个写空的setter。

@fengzilong
Copy link
Member

整个console就会被这个警告消息占满了,开发的时候不方便

可以试着设置log过滤级别

根据development build和production build来开关警告提示

我觉得是可以的,可以考虑来个pr

为了抑制这些消息就只能给那些computed properties一个个写空的setter

这个是为了提示你setter被触发了,注意下代码是不是漏处理set的逻辑了,warning还是有必要的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants