如何在 SAPUI5 quickview 中放置按钮?
How to put button in SAPUI5 quickview?
我有一个 sapui5 QuickView,看起来像这样:
<QuickView id="quickView">
<QuickViewPage pageId="PageId123">
<QuickViewGroup>
<QuickViewGroupElement label="Material" value="{Material}" type="{sap.m.QuickViewGroupElementType.text}"></QuickViewGroupElement>
</QuickViewGroup>
</QuickViewPage>
</QuickView>
现在,我想在 Quickview 的底部添加一个按钮。可能吗?我尝试添加
<Button icon="sap-icon://action"> </<Button>
但这不知何故不起作用。有什么办法可以添加按钮吗?提前致谢。
不可能。
The quick view is similar to a popover, but has a predefined structure, a fixed set of UI elements, and automatic UI rendering.
(...)
Do not use the quick view if:
- You want to provide information in a way other than displaying it in groups.
基本上可以通过检查以下聚合的Type
来理解:
pages
来自 class sap.m.QuickView
groups
来自 class sap.m.QuickViewPage
elements
来自 class sap.m.QuickViewGroup
最后,class sap.m.QuickViewGroupElement
不是允许您在其中添加控件(如按钮)的容器。
因此,您应该使用文档中的 Popover like in this sample
使用视图。先放一个按钮,然后添加一个 QuickView 作为片段。 UI5 Demo Kit中有一个例子。
https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.QuickViewCard/sample/sap.m.sample.QuickViewCard
我有一个 sapui5 QuickView,看起来像这样:
<QuickView id="quickView">
<QuickViewPage pageId="PageId123">
<QuickViewGroup>
<QuickViewGroupElement label="Material" value="{Material}" type="{sap.m.QuickViewGroupElementType.text}"></QuickViewGroupElement>
</QuickViewGroup>
</QuickViewPage>
</QuickView>
现在,我想在 Quickview 的底部添加一个按钮。可能吗?我尝试添加
<Button icon="sap-icon://action"> </<Button>
但这不知何故不起作用。有什么办法可以添加按钮吗?提前致谢。
不可能。
The quick view is similar to a popover, but has a predefined structure, a fixed set of UI elements, and automatic UI rendering.
(...)
Do not use the quick view if:
- You want to provide information in a way other than displaying it in groups.
基本上可以通过检查以下聚合的Type
来理解:
pages
来自 classsap.m.QuickView
groups
来自 classsap.m.QuickViewPage
elements
来自 classsap.m.QuickViewGroup
最后,class sap.m.QuickViewGroupElement
不是允许您在其中添加控件(如按钮)的容器。
因此,您应该使用文档中的 Popover like in this sample
使用视图。先放一个按钮,然后添加一个 QuickView 作为片段。 UI5 Demo Kit中有一个例子。
https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.QuickViewCard/sample/sap.m.sample.QuickViewCard