Extjs 树 如何更改子元素的文本颜色

Extjs Tree how to change text color of child elements?

本文关键字:文本 颜色 元素 何更改 Extjs      更新时间:2023-09-26

我有一棵树,我想更改子元素的文本颜色。

{
                text: "alegrbra",
                leaf: true,
                iconCls : 'button-with-icon icon-flag_green',
                style: {
                    'color': 'red'
                }
            }

我可以更改图标,但无法更改颜色。

我怎样才能给风格那个元素。

我添加了

CLS : 'Rednode'

,而 CSS 是

     .rednode{
color: red;
}

它解决了我的问题