我将关闭图标添加到组合框列表项中,点击它在关闭图标处显示撤消的cloes图标3秒钟。 3秒后,列表项应从列表中删除。如果使用者点击撤消它不应该删除。 在这里,我附上代码:
Ext.define('ezdi.view.SaveSearchComboboxView', {
extend : 'Ext.form.field.ComboBox',
alias : 'widget.saveSearchComboboxAlias',
queryMode : 'local',
id : 'saveSearchComboId',
store : 'SaveSearchComboboxStore',
emptyText : 'Saved Searches',
displayField : 'searchQueryName',
valueField : 'searchQueryId',
lazyInit: false,
listeners : {
focus : function (combo) {
combo.expand();
}
},
listConfig : {
getInnerTpl : function (displayField) {
return '<span style="float:right;"><button width:16px height:16px; class="savedSearchRemove">x</button><button width:16px height:16px; style="display:none;" class="undoSearchRemove">Undo</button></span>{' + displayField + '}';
}
}
});
为了更好地理解,我在这里附上了剪辑
答案 0 :(得分:2)