Notes for using EasyUI: Use EasyUI
Some time ago I made a system server management system and used EasyUI. The following are some special features in EasyUI.
I would like to share with you the hope that it will be helpful for beginners.
Notes for using EasyUI:
1. When using href to introduce code from outside the body tag, you need to write all the code in the body tag. All content except the body tag can be omitted. You can use functions to modify the Loading Method of html parsing. ,
There is also an extractor attribute in EasyUI that can be used to define rules for href data acquisition. This attribute has never been used, however, I personally feel that some systems with many similar interfaces can be used to simplify the design of some systems.
2. function call method: var pp = $ ('# tt'). tabs ('getselected ').
This call method is indeed used for the first time. It is also a way of thinking. It calls a method by taking the object attribute of a string. In some special cases, it can also simplify the operation and enhance cohesion.
3. The href method is used to render the interface. After loading the home page, the get method is used to asynchronously request the corresponding page and then perform rendering. That is to say, the operations on the referenced page should still be written in the reference page, which should be handled by itself.
4. grid formater plays an amazing role. The reason is that you cannot use the same name in the front.
Here is a negligible test problem. If formater is used before, what will happen later? If you are interested, you can test it. I guess it will follow the first setting.
5. The format of data returned by the datagrid request is {total: 12, rows: [{id: 1, text: 2},...]}, which is not described in this document.
6. When the datagrid uses pagination, two parameters are automatically transmitted: page: 1 rows: 30.
7. After the easyui control is used, you cannot use the jquery value method. You can only use the method provided by easyui to obtain the value.
Of course, if easyUI is used, you can directly find the element of the actual value, and then the value is OK. This statement only applies to values with the same id.
8. layout is full of browsers and iframe, that is, the parent element of the layout.
9. When using the load method to add a value to a form, it must be consistent with the field in the form, and there must be no extra fields. Otherwise, the corresponding html element cannot be found.
10. The DataGrid column is an array object. This element is also an array object. The element in the element array is a configuration object used to define each column field.
This setting should be used to adapt to the tree table.
11. combobox: $ ('# id'). combobox ('setvalues', 'key1, key2, key3'. split (',')).
When EasyUI is used for the first time, some of the summary items are personal opinions and may have some incorrect ideas. If you have any incorrect ideas, please correct them and study them on your own, to avoid misunderstanding of others. Thank you in advance.
Author: moonlight @ LTGK
Time: Wednesday