-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
docs(controller): import base controller directly #1771
Conversation
2a9d870
to
6c0444f
Compare
这样啊,如果很多级的 Controller,就要写很长的相对路径,感觉挺不 egg-style 的 |
@atian25 虽然填写路径麻烦些,但是这样更灵活,不同的controller可以选择继承不同的基类,声明controller时,也更加清晰到底继承了哪些类。 |
Codecov Report
@@ Coverage Diff @@
## master #1771 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 29 29
Lines 729 729
=======================================
Hits 726 726
Misses 3 3
Continue to review full report at Codecov.
|
``` | ||
|
||
Now we can use base class' methods when defining Controllers for the application: | ||
Now we can use base class' methods by extends from `BaseController`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class'
语法错误
其他 +1 可以合并
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个就是这样的吧。其他地方语法错误更多,留待有缘人来改善吧。英语太差。
docs(controller): import base controller directly (#1771)
Checklist
npm test
passesAffected core subsystem(s)
Description of change