0
我有一个基本的Ext.list.Tree
这样的: https://fiddle.sencha.com/#fiddle/134p如何修改Ext.list.Tree项目模板ExtJS6
我想修改其子项模板所以不是他们的div被渲染为链接。
默认情况下,每个项目将呈现为:
<li class="x-treelist-item x-treelist-item-leaf x-treelist-item-with-icon" data-componentid="ext-treelistitem-11" id="ext-treelistitem-11" data-recordid="4">
<div class="x-treelist-row" id="ext-element-63">
<div class="x-treelist-item-wrap" id="ext-element-59" style="margin-left: 0px;">
<div class="x-treelist-item-icon x-fa fa-group" id="ext-element-61"></div>
<div class="x-treelist-item-text" id="ext-element-60">Groups</div>
<div class="x-treelist-item-expander"></div>
</div>
</div>
<ul class="x-treelist-container"></ul>
</li>
我需要更换此:
<div class="x-treelist-item-text" id="ext-element-60">Groups</div>
有:
<a class="x-treelist-item-text" id="ext-element-60" href="groups">Groups</a>
(对href的值是从存储未来记录)
谢谢,但我不知道如何去重写treeitem从treelist。还有没有办法告诉它使用记录值作为href? – serg