extjs combo改变右边的箭头

比如我想把右边的箭头 改变成一个搜索的样式 怎么弄呢
2025-05-17 14:39:04
推荐回答(1个)
回答(1):

Ext.onReady(function() {
    var trigger = Ext.create('Ext.form.field.Trigger', {
        labelAlign : 'right',
        fieldLabel : '测试',
        margin : '10 0 0 0',
        triggerCls : 'x-form-search-trigger',
        onTriggerClick : function(e) {
            console.log('do something');
        },
        renderTo : Ext.getBody()
    });
});

效果图

另外 triggerCls:文本框右侧的按钮样式,主要有4种:

x-form-clear-trigger     // the X icon  

x-form-search-trigger    // the magnifying glass icon  

x-form-trigger           // the down arrow (default for combobox) icon  

x-form-date-trigger      // the calendar icon (just in case) 


基于 4.2.0