Following the previous article introduced the specific steps and advantages and disadvantages of the Jayrock component development interface, what we bring to you today is how to fix these shortcomings.
Let's start by reviewing the shortcomings of the fix:
1, each interface can only write approximate comments, can not be separated to write, such as the main function of the interface, input parameters are what meaning, the output of the field is what meaning.
2, the test page, for each interface function comment is not, this is very inconvenient, because more interfaces, developers can not quickly locate the interface to use.
3, the test page, the selection of the drop-down box can not enter the search, only one choice, the interface a lot, is definitely a tragic life.
So here's how I fix these drawbacks:
1, let each interface can write function comments, input parameter comments, output parameter comments, the effect is as follows:
The development is written like this:
2, let the test page also has the above comments appear, the effect is as follows:
All of a sudden clear a lot!
3, the interface selection list dropdown can be blurred search, the effect is as follows:
The effect is basically finished, then I will share how to follow the idea of foreigners to increase the function.
In terms of annotations, I just need to add the attribute tag header and add the read code to the Help's entry class:
Two added feature marker header
Entry Code Changes
The approximate steps are also on these two, specific details, if interested can be traced to the code to refine.
As for the drop-down search, the idea is to introduce someone else's JS, and then call.
Say so much, it's better to come up with some code actually, the following is a revised component source code: Click to download
Let the Jayrock into the wings (add input and output parameter comments, test page has comments, drop-down box can be searched)