如何在 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>

但这不知何故不起作用。有什么办法可以添加按钮吗?提前致谢。

不可能。

根据Fiori Design Guidelines

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来理解:

最后,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