我已经设置了一个 XTemplate 来为不同的列表项显示不同的样式,具体取决于它们的类型。我还想为每种不同的类型设置不同的公开按钮。我可以使用以下方法将所有披露按钮设置为自定义图像:
.x-list-item .x-list-disclosure {
overflow: visible;
-webkit-mask: 0 0 url(path/to/image) no-repeat;
}
但我找不到更改单个披露按钮的方法。我尝试在 XTemplate 中定义一个自定义类,即:
var solutiontpl = new Ext.XTemplate (
"</pre>",
"<div class = 'solution-container'>",
"<div class = 'list-item-title'>",
'<tpl if = "type == \'p\'">',
"{title}<span class = 'solution-rating-text'>{rating}</span>",
"<span class = 'partner-icon'></span>",
'</tpl>',
'<tpl if = "type == \'a\'">',
"{title}<span class = 'solution-rating-text'>{rating}</span>",
'</tpl>',
'<tpl if = "type == \'s\'">',
"{title}<span class = 'solution-rating-text'>{rating}</span>",
'</tpl>',
"</div>",
"</div>",
"<pre>"
);
并尝试使用“.solution-container .x-list-item .x-list-disclosure”将公开按钮设置为无效。我怎么能这样做呢?