我正在尝试将图标设置为 <aui:button>
就像这个tutorial 。
但那里描述的解决方案在我的情况下效果不佳,因为我有一个表,并且在每一行上都有一个具有不同资源 URL 的按钮。像这样:
<portlet:resourceURL id="saveReport" var="saveReportURL">
<portlet:param name="reportId" value="${report.reportId}" />
</portlet:resourceURL>
<aui:button onclick="location.href = '${saveReportURL}'">
<aui:button>
可以设置图标吗不使用教程中描述的 JavaScript?
谢谢
最佳答案
您可以编写以下代码来设置liferay合金按钮中的图标
<aui:button type="cancel" cssClass="btn-info" icon="icon-upload-alt" iconAlign="right" value="upload" />
you need to use the icon attribute for this setting "Icon glyphs"
you need to use cssClass for adding extra design button class for the designing
you need to set iconAlign attribute for left or right side of the button text value
关于liferay - 如何设置<aui :button> icon in Liferay without using Javascript?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8987070/