ExtJS的下拉选单Combobox中空选项的高度问题

ExtJS的下拉选单组件Combobox如果有空选项时,会有空选项高度太小的问题,如下图: 

最近遇到这个问题,搜索一下找到这个解决方案:http://blog.csdn.net/stefshawn/article/details/7343178

但是我们这个项目用的是 extjs4 在我们的css文件中没有找到x-combo-list-item 这个样式,导致直接按照上面的方法处理失败。

后来将x-combo-list-item这个样式替换为x-boundlist-item 问题解决,总结一下有如下三种方法:

tpl:'<tpl for=".">' +  
            '<div class="x-boundlist-item" style="height:12px;">' +  
            '{name}'+ 
        '</div>'+
        '</tpl>'
tpl:'<tpl for=".">' +   
    '<div class="x-boundlist-item" >' +   
            '{name} ' +   
    '</div>'+   
    '</tpl>'
 .x-boundlist-item { height: 21px;}  

  

posted @ 2013-03-10 15:27  宋明浩  阅读(441)  评论(0)    收藏  举报