Program Infrastructure for Easyui components
The writing structure of Easyui component code has good extensibility and can be used as a reference model for JavaScript component development. The code structure is roughly as follows:
Easyui Basic Function Properties list |
No |
function properties |
Description |
1 |
$.fn.< Component Name > (options, param) |
The main entrance, user component initialization, method invocation, parameter modification, common methods of component invocation are options, GetValue, SetValue, etc. Example: Initializes or modifies a parameter example: $ ("#buttonid"). LinkButton ({iconcls: ' Icon-save ', plain:true}); GetValue Example: $ (' #ss '). SearchBox (' GetValue '); SetValue Example: $ (' #ss '). SearchBox (' SetValue ', ' Wang Seal '); |
2 |
$.fn.< Component name >.parseoptions (target) |
Parameter resolution (typically inherits the parent component parameter parser), is used to parse the attributes written on the tag, and is set to the options in the component. |
3 |
$.fn.< Component Name >.defaults |
Component default properties (typically inherit the default properties of the parent component) |
4 |
$.fn.< Component Name >.methods |
Method Collection |