Sapui5 如何将按钮添加到FeedListItem
我想向FeedListItem添加两个按钮,类似于NotificationnListItemSapui5 如何将按钮添加到FeedListItem,sapui5,Sapui5,我想向FeedListItem添加两个按钮,类似于NotificationnListItem <List headerText="Feed Entries" items="{ path : '/userFeedBack', mode : 'OneWay' }"> <FeedListItem sender="@{UserScreenname} ({UserName})" icon="{ProfileImgUrl}" senderPress=".navToU
<List headerText="Feed Entries" items="{ path : '/userFeedBack', mode : 'OneWay' }">
<FeedListItem sender="@{UserScreenname} ({UserName})"
icon="{ProfileImgUrl}" senderPress=".navToUser"
iconPress=".navToUser"
iconDensityAware="false" info="{Type}"
timestamp="{ path : 'Time', formatter : '.notificationListItemFormatted' }"
text="{TweetText} ({Total} times)">
</FeedListItem>
</List>
应该是这样的。如何使用这些按钮,或者是否有其他列表控件可以在此处使用?对于按钮,您必须使用不同类型的列表项。FeedListItem不支持任何聚合。我建议以下几种选择:
<List id="notificationList" class="sapContrast sapContrastPlus">
<NotificationListItem
description="Information of List Item 1"
showCloseButton="false"
datetime="1 hour"
unread="true"
press="onListItemPress"
authorName="Jean Doe"
authorPicture="sap-icon://globe">
<buttons>
<Button text="Accept" type="Accept" ></Button>
<Button text="Reject" type="Reject" class="sapUiLargeMarginEnd" ></Button>
<Button icon="sap-icon://thumb-up" class="sapUiLargeMarginBegin" ></Button>
</buttons>
</NotificationListItem>
<NotificationListItem
description="Information of List Item 2"
showCloseButton="false"
datetime="1 hour"
unread="true"
priority="None"
authorName="Jean Doe"
authorPicture="sap-icon://world">
<buttons>
<Button text="Accept" type="Accept" ></Button>
<Button text="Reject" type="Reject" class="sapUiLargeMarginEnd" ></Button>
<Button icon="sap-icon://thumb-down" class="sapUiLargeMarginBegin" ></Button>
</buttons>
</NotificationListItem>
</List>
第三个选项似乎不错。但我如何扩展我的控件并向其中添加button的聚合。有什么帮助吗