Easyui Treegrid改变默认图标的方法

网友投稿 340 2023-07-18


Easyui Treegrid改变默认图标的方法

普通情况下,treegrid的图标是默认的文件夹与文件的形式,如下图:

​​​我们可以在json文本中加入iconCls来改变默认图标,例如样例中:

​{"total":7,"rows":[

{"id":1,"name":"All Tasks","begin":"3/4/2010","end":"3/20/2010","progress":60,"iconCls":"icon-ok"},

{"id":2,"name":"Designing","begin":"3/4/2010","end":"3/10/2010","progress":100,"_parentId":1,"state":"closed"},

{"id":21,"name":"Database","persons":2,"begin":"3/4/2010lrofw","end":"3/6/2010","progress":100,"_parentId":2},

{"id":22,"name":"UML","persons":1,"begin":"3/7/2010","end":"3/8/2010","progress":100,"_parentId":2},

{"id":23,"name":"Export Document","persons":1,"begin":"3/9/2010","end":"3/10/2010","progress":100,"_parentId":2},

{"id":3,"name":"Coding","persons":2,"begin":"3/11/2010","end":"3/18/2010","progress":80},

{"id":4,"name":"Testing","persons":1,"begin":"3/19/2010","end":"3/20/2010","progress":20}

],"footer":[

{"name":"Total Persons:","persons":7,"iconCls":"icon-sum"}

]}

然后修改icon.css以及将要用到的图标放在指定的文件夹。

通常情况下,讲过这样的修改,treegrid就可以显示出你自己设计的图标了。

​如果此时还不能显示出你设定的图标,可以查看一下页面中引入icon.css以及easyui.css的顺序,要保证easyui.css在前,icon.css在后。否则,easyui.css中的样式就会将icon.css覆盖点,依旧显示默认图标。

下面给大家介绍jquery EasyUI treegrid 增删改查代码

Save

Cancel


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:一系列Bootstrap导航条使用方法分享
下一篇:Java模糊查询方法详解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~