Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/374.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript DataTables:I receive table.row不是函数,而使用meteor';s aldeed:表格_Javascript_Meteor - Fatal编程技术网

Javascript DataTables:I receive table.row不是函数,而使用meteor';s aldeed:表格

Javascript DataTables:I receive table.row不是函数,而使用meteor';s aldeed:表格,javascript,meteor,Javascript,Meteor,因此DataTables API有一个父/子方法。我的目标是尽可能把它变成流星式的方式。 这是该网页的链接-> 到目前为止,我唯一能做的就是用绿色+加号加上一个圆圈。这是一个屏幕截图-> 由于我使用的是meteor,事情可能会有点不同,所以我在单击事件上出现错误,基本上我得到的是未定义的表事件,尽管我定义了它。 下面是我试图将meteor代码转换为datatables父/子方法的要点-> /*行详细信息的格式化功能-根据需要进行修改*/ 函数格式(d){ //`d`是该行的原始数据对象 返

因此DataTables API有一个父/子方法。我的目标是尽可能把它变成流星式的方式。 这是该网页的链接->

到目前为止,我唯一能做的就是用绿色+加号加上一个圆圈。这是一个屏幕截图->

由于我使用的是meteor,事情可能会有点不同,所以我在单击事件上出现错误,基本上我得到的是未定义的表事件,尽管我定义了它。 下面是我试图将meteor代码转换为datatables父/子方法的要点->

/*行详细信息的格式化功能-根据需要进行修改*/
函数格式(d){
//`d`是该行的原始数据对象
返回“”+
''+
'全名:'+
''+d.name+''的+
''+
''+
'分机号码:'+
“+d.extn+”+
''+
''+
'额外信息:'+
'以及此处的任何进一步细节(图像等)…'+
''+
'';
}
var Tabular=null;
if(包['nicolaslopezj:tabular materialize']){
Tabular=Package['nicolaslopezj:Tabular-materialize'].Tabular;
}
if(包['aldeed:表格]){
Tabular=包装['aldeed:Tabular']。Tabular;
}
如果(!表格){
抛出新的Meteor.Error('orion','You must install tablar to use this package');
}
var table=orion.pages.TABLAR=新表格({
名称:'PagesIndex',
收藏:orion.pages.collection,
订单:[[1,“说明”]],
//自动宽度:false,
栏目:[
{
className:“详细信息控件”,
可订购:错误,
数据:空,
默认内容:“”
}, 
{data:'title',title:i18n('pages.schema.title')},
{data:'url',title:i18n('pages.schema.url'),render:function(val,type,doc){return';},
{数据:'位置',标题:'顺序',
呈现:函数(val、类型、文档){
返回“”
}
}, 
{数据:'actions',可排序:false,标题:'actions',
呈现:函数(val、类型、文档){
返回“”
},
tmpl:Meteor.isClient&&Template.actionBtns
}
]
});
Template.orionMaterializePagesIndex.onRendered(函数(){
$('.table')。在('click','td.details control',函数(){
控制台日志(表);
var tr=$(this.nexist('tr');
var行=表.行(tr);
if(row.child.isShown()){
//此行已打开-关闭它
row.child.hide();
tr.removeClass(“显示”);
}
否则{
//打开这一排
row.child(格式(row.data()).show();
tr.addClass(“显示”);
}
});

});
我记得,在使用Datatables时,在定义表时明确说明
是很重要的。记住这一点。对,但是当我用{{>Tabular}将Meteor Tabular集成到我的html中时,Meteor Tabular不是已经定义了这一点吗