[英]sencha touch :: adding badgeText to list items
将一些badgeText添加到List-Panel的项目的最佳方法是什么?
ok, so one way to add badge text to a list item is to add the following code to the xtemplate/itemTpl: 好的,所以将徽章文本添加到列表项的一种方法是将以下代码添加到xtemplate / itemTpl:
...
'<span class="x-badge ">4</span>',
...
Sencha Touch 2.1 Sencha Touch 2.1
xtype: 'list',
itemId: 'listMainMenu',
store: 'storeMainMenu',
fullscreen: false,
itemTpl: '<span class="x-badge ">{BadgeText}</span>'
and it's not working. 它不起作用。
DOM result: DOM结果:
<div class="x-innerhtml " id="ext-element-104"><span class="x-badge ">1</span></div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.