[英]How can i replace icons from tree.store with glyphs in Extjs 4.2?
Can someone give me an ideea how can i change default icons from tree.store extjs with glyphs dynamicaly? 有人可以给我一个想法,我如何动态更改带有字形的tree.store extjs中的默认图标? PS i`m taking data ( root , leafs ) from json and i have a "type" property that could help.
PS我从json获取数据(root,leafs),并且我有一个“ type”属性可以提供帮助。
Following worked for me. 以下对我有用。 Tested on latest Chrome & Firefox, I think on IE it will not work as img content is not supported in IE.
我在最新的Chrome和Firefox上进行了测试,我认为在IE上将无法使用,因为IE中不支持img内容。
1) Add font-awesome to your project 1)添加真棒字体到您的项目
2) Sample iconCls for a node: 2)节点的样例iconCls:
iconCls: 'fa fa-th icon-content'
In your application's css: 在应用程序的CSS中:
.icon-content {
content: "";
background-image: none !important;
margin-top: auto !important;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.