首页 > SAP > FIORI > ObjectListItem与NotificationListItem的比较
2019
08-27

ObjectListItem与NotificationListItem的比较

这两天做一个LIST相关的功能,学习LIST的用法,使用了SAPUI的几个LIST对像,对比如下:
CustomListItem       这个使用时用户可以自己定义要显示的样式,使用自由,但需要学习FlexBox,包括VBOX,HBOX等的使用;
ObjectListItem 这个是标准的细节最多的一个LIST功能,功能多多,可实现多种样式,但一直没找到放按钮的方法,只能放的
Swipe
按钮;
NotificationListItem这个样式好看,可以放按钮,但LIST的右边不可放入金额,数量等内容,就差了一点点,所以我只能换了方式来放,



如下两图分别是:ObjectListItemNotificationListItem


一、对Objectlistitem的来说放可见按钮没找到方法,所以使用了Swipe的按钮来显示,但这样显示里LIST里的按钮不是随时可见的,需要操作时需要在LIST的一行上滑动鼠标,按钮才会显示出来,这样对用户的操作就不是很方便了,但此LIST的可放的内容多,并且在LIST的右边可显示数值,状态及颜色设置,所以此LIST是做功能时的首选;
     <List id="notificationList" mode="Delete" items="{pos>/Order_Details}" class="sapContrast sapContrastPlus">
                                                <ObjectListItem
                                                        title="{pos>ProductId}"
                                                        intro="{pos>Name}提供实时/t、快速、准确的的申通快递单号查询跟踪服务、申通快递网点分布、申通快递电话查询服务;支持手机端查询,并提供申通快递查询接口(开放API)服务"
                                                       
                                                        number="{parts:[{path:'pos>Price'},{path:'pos>CurrencyCode'}],
                                                                        type: 'sap.ui.model.type.Currency',
                                                                        formatOptions: {showMeasure: false}
                                                                        }"
                                                        press="onListItemPress"
                                                        >
                                                        <firstStatus>
                                                                <ObjectStatus title="StatusTitle" text="{pos>Status}" />
                                                                               
                                                        </firstStatus>
                                                       
                                                        <attributes>
                                                                <ObjectAttribute text="{pos>Price} / {pos>UoM}" />
                                                                <ObjectAttribute text="{pos>Width} x {pos>Depth} x {pos>Height} {pos>DimUnit}" />
                                                        </attributes>
                                                       
                                                </ObjectListItem>
                                                <swipeContent>
                                                        <SegmentedButton selectedKey="kids">
                                                                <items>
                                                                        <SegmentedButtonItem text="Kids" key="kids" />
                                                                        <SegmentedButtonItem text="Adults" />
                                                                        <SegmentedButtonItem text="Seniors" />
                                                                </items>
                                                        </SegmentedButton>
                                                </swipeContent>
                                        </List>
                                        二、对NotificationListItem的来说放可直接放按钮,并且功能外观样式好看,但在LIST的右边没有数值,状态,颜色等功能,另外可输入的内容也相对少,注颜色可使用LIST的priority属性来设置,也能达到效果。

<List id="notificationList" mode="Delete" items="{pos>/Order_Details}" class="sapContrast sapContrastPlus">
                                                <NotificationListItem
                                                        title="{pos>ProductId}    x  {pos>Quantity}{pos>UoM}"
                                                        description="{pos>Name}提供实时,快速准确的的申通快递单号查询跟踪服务、申通快递网点分布、申通快递电话查询服务;支持手机端查询,并提供申通快递查询接口(开放API)服务"
                                                        authorName="{parts:[{path:'pos>Price'},{path:'pos>CurrencyCode'}],
                                                                        formatOptions: {showMeasure: false}
                                                                        }"
                                                        datetime=""
                                                        showCloseButton="true"
                                                        unread="true"
                                                        priority="None"
                                                        close="onItemClose"
                                                        press="onListItemPress">
                                                        <buttons>
                                                                <OverflowToolbarButton text="增加数量" icon="sap-icon://drill-up"/>
                                                <OverflowToolbarButton text="减少数量" icon="sap-icon://drill-down"/>
                                                                <Button text="打折" type="Accept" press="onAcceptPress"></Button>
                                                                <Button text="实价" type="Accept" press="onRejectPress"></Button>
                                                        </buttons>
                                                </NotificationListItem>
                                               
                                        </List>

最后编辑:
作者:yangsen
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519

留下一个回复

你的email不会被公开。