1
我在鈦合金視圖它通過視頻列表循環集合中,像這樣:鈦合金過濾功能 - 如何訪問我迭代的觀點在
<View dataCollection="videos" dataFilter="recentlyAddedFilter">
<ImageView image="{img}" width="200">
<Label text="{title}"></Label>
</ImageView>
</View>
我有一個叫做recentlyAddedFilter
過濾功能,在我的控制器定義,像這樣:
function recentlyAddedFilter(collection) {
return collection.where({title:'A title'});
}
我要創建這個view
組件的多個版本,所以我想過濾功能,能夠訪問每個單獨組件它適用於,就像我可以使用012一樣裏面的過濾功能。所以,如果我可以做這樣的事情會很好:
function recentlyAddedFilter(collection) {
theComponent.width = "200dp"; // change property on component that calls this function
return collection.where({title:'A title'});
}
有沒有辦法可以做到這一點?