我想更改标准的“笔”图标
DetailAndActive 类型的 StandardListItem
. 有没有办法这样做?
到目前为止我的 XML:
<List
id="master1List"
items="{/path}"
mode="{device>/listMode}"
select="onSelect"
itemPress="showDetail"
growing="true"
growingScrollToLoad="true">
<items>
<StandardListItem
type="DetailAndActive"
activeIcon="sap-icon://message-information"
id="master1ListItem"
press="onSelect"
title="{title}">
</StandardListItem>
</items>
</List>
据我所知,只有属性“icon”(我不需要)和“activeIcon”(我设置但也没有显示在 itemPress/tab 上)。我以为我可以通过 css 更改它,但它是在数据属性中设置的(图标字体,不是我可以覆盖的 uri),然后应用:
.sapUiIcon:before {
content: attr(data-sap-ui-icon-content);
...
谢谢..
[编辑:]我接受以下答案是正确的,因为它有效。但是正如您在我的评论中看到的那样,我想通过使用这里描述的聚合元数据来接受控件:
metadata: {
aggregations: {
"Button" : {type : "sap.m.Button", multiple : false, visibility: "public"}
},
defaultAggregation: "Button"
},
到目前为止,这有效,以至于我现在可以在我的 XML 视图中向 ListItem 添加一个 Button 控件,但它没有被渲染:-) 还有什么我在这里想念的想法吗?