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

extension/ui.js的疑似bug #36

Closed
Jeffersondyj opened this issue Aug 18, 2014 · 2 comments
Closed

extension/ui.js的疑似bug #36

Jeffersondyj opened this issue Aug 18, 2014 · 2 comments
Assignees

Comments

@Jeffersondyj
Copy link

4个Rule:MaxRule/MinRule/MaxLengthRule/MinLengthRule
的prototype.getErrorMessage,第一行都是control.get('maxErrorMessage')
这个maxErrorMessage是否是copy手误?

另外4个getErrorMessage比较一致,是否可以抽取成一个,比如:
MaxRule.prototype.getErrorMessage = someMethod(control, 'maxErrorMessage');
MinRule.prototype.getErrorMessage = someMethod(control, 'minErrorMessage');
someMethod里面会return一个function。

函数内:
var getErrorMessage = Rule.prototype.getErrorMessage;
getErrorMessage.apply(this, arguments);
这个apply出来的,并没有赋给局部变量...是否可以存下来,最后一行return的时候,return此变量即可

@chestnutchen
Copy link
Member

额这个确实是我copy的时候手误了,下个版本顺便重构一下,这块好久没动了。

@chestnutchen chestnutchen self-assigned this Aug 18, 2014
@Jeffersondyj
Copy link
Author

了解了,多谢!

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

No branches or pull requests

2 participants