easyUI中combobox的下拉框数据背景颜色设置

"easyui-combobox" id="approvalOrder" style="width:100px" data-options="
                    valueField:'id',
                    textField:'name',
                    editable:false,
                    value:'-5',
                    formatter: function(row){
                        var opts = $(this).combobox('options');
                        if(row[opts.textField]=='已提交'){
                            return ''+row[opts.textField]+'<\/span>';
                        }else if(row[opts.textField]=='审批中'){
                            return ''+row[opts.textField]+'<\/span>';
                        }else if(row[opts.textField]=='已退回'){
                            return ''+row[opts.textField]+'<\/span>';
                        }else if(row[opts.textField]=='已归档'){
                            return ''+row[opts.textField]+'<\/span>';
                        }else if(row[opts.textField]=='全部'){
                            return ''+row[opts.textField]+'<\/span>';
                        }
                    },
                    data:[
                        {id:'-1',name:'已提交'},
                        {id:'-4',name:'审批中'},
                        {id:'-2',name:'已退回'},
                        {id:'-3',name:'已归档'},
                        {id:'-5',name:'全部'}
                    ]
                "> 

效果如下:
easyUI中combobox的下拉框数据背景颜色设置_第1张图片

你可能感兴趣的:(前端,easyui,combo)