以下是我使用JSON数据的tpl。我只是想检查“ Key”是否==“ something”,并显示相应的“ Value”作为链接。
谢谢
this.tpl = new Ext.XTemplate(
'<div class="blah" style="padding-bottom:3px;float:left;">Details</div>',
'<hr style="clear:left;"/>',
'<tpl for=".">',
'<span class="blah"><b>{Key}:</b> {Value}</span>',
'</tpl>',
'</div>',
'<br>'
);
'<span class="blah"><b>{Key}:</b>',
'<tpl if="Key==\'something\'"><p><a herf="#">{Value}</a></tpl>',
'<tpl if="Key!=\'something\'"><p>{Value}</tpl>',
'</span>',
在extjs3.3中测试
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句