easyui tree js分析

easyui tree js分析

可知通过类选择器绑定事件

找入口函数,即页面加载完执行的函数

 easyui tree js分析

发现有个TAOTAO对象

哪里来?

全文搜索,在common.js

 easyui tree js分析

哪里引用这个js呢?

 easyui tree js分析

可知easyui jsp都为片段

jspIndex.jsp

其他都是index.jsp的片段

 easyui tree js分析easyui tree js分析

 

TAOTAO对象的init方法

其中functiondata是指{fun:function(node){}}}

PS:js中方法的参数多少不影响是否为同一个方法,因为所有的参数都是一个数组,只要方法名相同就是同一个方法,和参数无关,多个方法会覆盖。

接着调用initItemCat(data)方法

 easyui tree js分析easyui tree js分析easyui tree js分析

视频详解:

Video_2017-11-10_121513.wmv

Video_2017-11-10_173650.wmv