0
我設法在extjs組合選擇列表中添加圖像,但是在選擇某個項目後,無法在摺疊組合中顯示相同的圖像。我嘗試通過添加一些自定義HTML來更改模板(displayTpl),但它會被轉義。任何幫助,將不勝感激。如何在Extjs中將圖像添加到組合中?
感謝
this.chartCombo = Ext.create('Ext.form.field.ComboBox', {
height: '20',
fieldLabel: 'Chart Type',
displayField: 'chartLabel',
valueField: 'chartValue',
store: chartComboDataSource,
queryMode: 'local',
listConfig: {
getInnerTpl: function() {
this.cls = 'option-list-chart-img';
return "<img class='{cssClassName}'/> {chartLabel}";
}
}
});
你在CSS類中指定了寬度和高度嗎?嘗試更改顯示屬性以阻止。 – Krzysztof
對於ExtJS4請參閱以下答案: http://stackoverflow.com/a/14434708/1749200 –