Javascript 如何在EXTJS中向树列表中的节点添加自定义属性

Javascript 如何在EXTJS中向树列表中的节点添加自定义属性,javascript,css,extjs,treelist,Javascript,Css,Extjs,Treelist,如何向EXTJS中的树列表节点添加自定义属性 Ext.create({ xtype: 'treelist', store: { root: { expanded: true, children: [{ text: 'detention', leaf: true, iconCls: 'x-fa fa-frown-o'

如何向EXTJS中的树列表节点添加自定义属性

Ext.create({
    xtype: 'treelist',
    store: {
        root: {
        expanded: true,
            children: [{
                text: 'detention',
                leaf: true,
                iconCls: 'x-fa fa-frown-o'
                rowCls: 'myCSS',    
            }, {
                text: 'buy lottery tickets',
                leaf: true,
                iconCls: 'x-fa fa-usd'
            }]
        }
    },
    renderTo: Ext.getBody()
});
我试过:

  autoEl: {
    'attribute1': 'foo'
  }
但是,尽管这增加了属性,但它在inspect中不可见:

我想使用此属性通过CSS
内容更改文本,如

.myclass:after {
    content: attr(attribute1);
}