如何默认添加导出按钮及其自定义功能
$.extend($.fn.dataTable.defaults, {
language: {
"loadingRecords": "Loading. Please wait...",
"info": "Showing <span class='startPage'>START</span> to <span class='endPage'>END</span> of <span class='totalPage'>TOTAL</span> entries",
"lengthMenu": "Showing MENU entries"
},
});
答案 0 :(得分:1)
只需使用buttons
字面值扩展:
$.extend( $.fn.dataTable.defaults, {
buttons: [{
extend: 'pdfHtml5',
customize: function(doc) {
doc.defaultStyle.fontSize = 40;
}
}]
});