-
Notifications
You must be signed in to change notification settings - Fork 321
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
组件编码风格讨论 #18
Comments
我在这里有个疑问:为何通过mixin混入的组件不应该有构造函数,是不是可以认为mixin只能混入对象? |
@mui-lychi 如果有构造函数也会被组件本身覆盖吧。 |
不错,混入类的constructor确实会覆盖本身的constructor,但是假如需要混入的类有constructor的话,而且我一定需要混入它的话,该怎么处理啊?如果这个类没有constructor当然是不存在问题的。 |
我觉得混入的类最好不要这样写,因为使用的人可能不清楚。如果一定要用,widget需要处理下这个问题 @kangpangpang |
重新命名为 组件编码风格 组件开发过程的编码约定,大家想到的,可以先记录到这里 |
关闭先,具体问题具体分析,等到一定阶段再沉淀总结 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
之前在wiki建了,后来被合并到编码规范中。不过编码规范主要是js写法上的,还有一部分是类库的一个约定,先记录在这里,方便讨论
The text was updated successfully, but these errors were encountered: