EasyUI的datagrid中的字段内容换行显示

EasyUI的datagrid中的字段内容换行显示

$('#XXXID').datagrid({

    columns:[[
           {field:'descr_text',title:'审核意见',
                    formatter:function(value,row,index){
                        if(value != null){
                            return value.replace(/\n/g,'<br>')
                        }else{
                            return value;
                        }
                    }
           }
    ]]

}}

猜你喜欢

转载自kengun.iteye.com/blog/2378706