pm1*_*m13 1 css grid icons extjs toolbar
我的gridPanel工具栏上没有显示图标 - 只显示文本.
我应该使用特定的CSS课程吗?我尝试使用button.print和.print但都没有工作.
,tbar: [
{
text : 'Print',
iconCls: 'print',
handler: function() {
Ext.ux.Printer.BaseRenderer.prototype.stylesheetPath = 'css/DETR_WEB.print.css';
var grid = Ext.getCmp("outstandingGrid");
alert(grid.title);
Ext.ux.Printer.print(grid);
}
}]
.print{
background-image: url(../images/print.png);
background-repeat: no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
我曾经遇到过同样的问题,我发现Ext中的一个样式覆盖了我的图像.因此,在处理工具栏时,我总是将其添加!important到background-image:
background-image: url(../images/print.png) !important;
Run Code Online (Sandbox Code Playgroud)
我已经添加了这个答案,以澄清这个问题已经得到了一个似乎有助于OP的解决方案.