1
我想用XTemplates創建一個動態變量列表。 unfort。你無法通過內部索引ID雖然功能的,如果,構建像sencha touch ::如何將index-id從列表傳遞到XTemplate函數
var newItemTpl = '<div class="list_websites_item"><div class="' + cmp.id + '">' + orgItemTpl + '</div>' + '<div class="iconset">' +
'<tpl if="Ext.getCmp(\'' + cmp.id + '\').plugins[0].isPendingItem({[xindex-1]})">'+
'<p>IS PENDING</p>'+
'</tpl>' +
'</div></div>';
當我打電話isPendingItem({[xindex-1]})與參數我得到的錯誤
SyntaxError: Parse error
那麼我怎麼能在這裏傳遞參數呢?
thnx !!!
沒有測試它,因爲我在我的案例中找到了一個很好的解決方法。但你的解決方案似乎是正確的。所以thanx! – headkit