PrimeFaces 5.3.5 - treeNode 自定义图标是不可见的而不是它。有^

PrimeFaces 5.3.5 - treeNode custom icons are invisible instead of it. There is ^

<p:tree value="#{userFiltersBean.objectsTreeModel}" var="node" hideRootNode="true" styleClass="filtersTree">    
    <p:treeNode icon="#{node.leafIcon}" styleClass="myIconsSize">

它可以工作,但我没有看到我的自定义图标。我只看到^。请参阅此屏幕截图。 ^ PrimeFaces 3.0 - How can I set a TreeNode icon programmatically from backing bean?

第一种方法 这不起作用

.ui-menu .ui-icon {
  top: .2em;
  left: .2em;
}

第二种方法 我减小了图标的大小,但没有任何反应。我也只看到^.

.myIconsSize {
    width:8px;
    height:8px;
}

第三种方法效果很好,但它只将树组件 var (var="node") 的最后一个图标放在每个节点树上。看我的截图here

.ui-treenode .ui-treenode-content .ui-treenode-icon{
    background: url("#{node.leafIcon}") no-repeat top !important;
}

还有我生成的 HTML 输出。

<span class="ui-tree-toggler ui-icon ui-icon-triangle-1-e"></span>
<span class="ui-treenode-icon ui-icon /images/tree-icons/18a6803865043ax59011635600000a0a0a0.png"></span>
<span class="ui-treenode-label ui-corner-all" tabindex="-1" role="treeitem">Property</span>

我不确定它是否重要,但我在 web.xml 中启用了 FONT_AWESOME。

<context-param>
    <param-name>primefaces.FONT_AWESOME</param-name>
    <param-value>true</param-value>
</context-param>

这是@YagamiLight 提到的问题

"the mark that you found "^" 表示图标未被接受或路径错误,根据我的经验,我知道 TreeNode 不接受带有您自己的图标的个人路径,我希望对您有所帮助"

我用第三种方法解决了。