我收到此错误无法读取未定义数据表的属性“oFeatures”我正在使用数据表编辑器的气泡编辑
<script type="text/javascript">
var editor;
$(document).ready(function(){
// use a global for the submit and return data rendering in the examples
editor = new $.fn.dataTable.Editor( {
ajax: 'http://52.77.155.163/web/index.php?r=ivision/productprices/datatable',
table: '#example',
fields: [ {
label: "Id:",
name: "id"
},
],
formOptions: {
inline: {
onBlur: 'submit'
}
}
} );
$('#example').on( 'click', 'tbody td', function (e) {
var index = $(this).index();
if ( index === 0 ) {
editor.bubble( this );
}
});
var table=$('#example').DataTable( {
ajax: 'http://52.77.155.163/web/index.php?r=ivision/productprices/datatable',
dom: "Bfrtip",
scrollY: 300,
paging: false,
bSort: false,
columns: [
{ data: "id" },
{ data: "getcat(cat_id)" },
{ data: "getproduct(p_id)" },
{ data: "m_price" },
{ data: "c_price" },
{ data: "e_price" },
{
data: null,
defaultContent: '<a href="#" class="remove">Delete</a>',
orderable: false
}],
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
],
} );
});
</script>
我在控制台中收到此错误,无法读取 undefined 的属性“oFeatures”。我正在为 datatables.net 编辑器使用气泡编辑。