- 首先需要知道,树节点的图标是通过,节点的iconcls属性来配置的。
- 其次,基于(一)中所配框架,只需要将图标置于路径:/KunWeb/WebContent/static/easy_ui/themes/icons/pic下,再在/KunWeb/WebContent/static/easy_ui/themes/icon.css文件中添加样式:
.icon-kunlun-database
{
background
:
url('icons/pic/database.png')
no-repeat
center
center
;
}
- 其中url中的路径即为图表所在路径;当属节点加载进来时LoadFilter方法中的data就会根据传过来的值,给iconCls赋值:
iconCls:"icon-kunlun-database"
如图所示:
效果如图所示: