开发者

Sencha Touch tabPanel tabbar dynamic images

开发者 https://www.devze.com 2023-04-10 05:13 出处:网络
In my application i am having a tabPanel. The title and icons of the tabs need to be dynamic. I am getting this data from the server. But i couldn\'t find any way which can load icons from a external

In my application i am having a tabPanel. The title and icons of the tabs need to be dynamic. I am getting this data from the server. But i couldn't find any way which can load icons from a external source URL. I used the iconCls property with my custom clas开发者_JAVA百科s as .tab{-webkit-mask-box-image: url("SomeHttpURL")} but this is also static. How do i make SomeHttpURL a placeholder which replaces with the URL i am getting from server at the runtime?

Tarun Sharma.


In your css:

.x-tab img.your_icon_name .x-button img.x-icon-mask.your_icon_name{
    -webkit-mask-image:url("SomeHttpURL");
}

In your panel code:

iconCls: 'your_icon_name',

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号