这里是所有可用 jQuery UI 图标的列表
jQueryUI Icons Cheatsheet N#1(点击Toggle text
获取所有图标名称)
jQueryUI 图标备忘单 N#2
至少在您可以使用例如<p:commandLink
应用图标(不记得尝试相同- 总是首选)styleClass
styleClass="ui-icon ui-icon-trash"
p:commandButton
<p:commandLink
顺便说一句,<p:commandButton
没有outcome
属性,<p:button
有它...
此外,从 PF v5.1.1 开始,您还可以通过将上下文参数设置为 true 来使用Font Awesome开箱即用的图标,就像这样primefaces.FONT_AWESOME
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
并像这样使用它:
<p:commandButton value="Download" icon="fa fa-download" type="button"/>
或者
<p:menuitem value="Refresh" url="#" icon="fa fa-refresh"/>
查看展示:PrimeFaces - FontAwesome - 自 v5.1.1 起