1

我在我的 wordpress 博客和列出钛移动应用程序中获得 5 个类别数据

这是我的正常表视图屏幕 http://i.hizliresim.com/EqR4l8.png

这里我添加了 row.backgroundImage 屏幕 http://i.hizliresim.com/VLM12r.png

我的类别 .JS

$.init = function() {

var rows = [];  
getCategories(function(_data) {

for (var x = 0; x < _data.length; x++) {

    rows.push(Alloy.createController('category-item', {
        data : _data[x]
    }).getView());

}

$.categories_table.setData(rows);

APP.Loading.hide();
});

这是我的categries-items.js

$.c_title.text = args.data.name  ; 
$.c_counts.text = args.data.count  ; 
$.row.Item = args.data;
$.row.backgroundImage = 'durum.png';
4

2 回答 2

0

与您传递所需的 args.anyParam 的方式相同。

所以基本上:

$.row.backgroundImage = args.data.bckImg; // which is different for each data obj you pass to your controller
于 2015-08-22T03:10:30.690 回答
0

利用 $.row.backgroundImage = args.data.bgImg;

并将 bgImg 添加到您的数据对象(您在其中设置namecount)。

于 2015-08-22T10:28:18.440 回答