我工作的一個煎茶觸摸2應用程序和使用星級小部件從http://podlipensky.com/post/2012/03/20/Sencha-Touch-2-ExtuxtouchRating.aspx如何在ExtJS列表itemTpl中顯示星級評級小部件?
我想表明配置像這樣的列表內的評級爲每個項目:
Ext.define('Schneehoehen.view.LoipenUebersicht', {
extend: 'Ext.navigation.View',
xtype: 'loipenuebersicht',
config: {
items: [{
xtype: 'list',
title: 'Loipen Übersicht',
itemTpl: '{label}', // I would like to show the widget next to the label
onItemDisclosure: true,
store: Ext.create('Schneehoehen.store.LoipenUebersichtStore')
}]
}
})
現在我想知道如何在itemTpl中包含我的星級小部件。預先
new Ext.ux.touch.Rating({
itemsCount: 5,
label: 'Image less',
cls: 'x-imageless-rating',
itemCls: 'x-imageless-star',
itemHoverCls: 'x-imageless-hover'
})
感謝:
微件被另一個視圖的形式內使用以下代碼顯示! Johannes