如何将 2 个参数发送到子级树视图。
样本:
var data2 = {
transport: {
read: {
url: function(options) {
console.log(options);
return kendo.format("/url2/", [options.param1, options.param2]);
},
dataType: "jsonp"
}
},
schema: {
model: {
id: "param4",
fields: {
param4: {type: "number"},
param5: {type: "string"},
},
hasChildren: "param4",
}
}
};
var data1 = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: "/url/",
dataType: "jsonp"
}
},
schema: {
model: {
id: "param1",
fields: {
param1: {type: "number"},
param2: {type: "number"},
param3: {type: "string"},
},
hasChildren: "param1",
children: data2
}
}
});
$("#treeview").kendoTreeView({
dataSource: data1,
dataTextField: ["param3", "param5"]
});
当我console.log(options);
只使用传递的参数调试代码时param1
。我怎么能得到param2
?
KendoUi Demos没有示例或文档,有没有简单的方法或者我必须为此记录所有选择路径?