customers
来自查询data.results
ids
是guid)
selectedIds
是来自guid的数组。
function selectedMap(selectedIds) {
var items = [];
for (var i = 0; i < selectedIds.length; i++) {
var match = ko.utils.arrayFirst(customers, function (item) { //-
return selectedIds[i] === item.id();
// or item.entityAspect.setDeteted(); if true
});
items.push(match);
}
return items;
还有更好的东西吗?
答案 0 :(得分:0)
微风1.5.1
var countries = ['Austria', 'Italy', 'Norway']
var query = EntityQuery.from("Customers")
.where("country", 'in', countries);