我有一个 sapui5 QuickView,它看起来像这样:
<QuickView id="quickView">
<QuickViewPage pageId="PageId123">
<QuickViewGroup>
<QuickViewGroupElement label="Material" value="{Material}" type="{sap.m.QuickViewGroupElementType.text}"></QuickViewGroupElement>
</QuickViewGroup>
</QuickViewPage>
</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.
基本上可以通过检查以下聚合的类型
来理解:
页面
组
来自类sap.m.QuickViewPage
元素
sap.m.QuickView
类中的sap.m.QuickViewGroup
类中的最后上课sap.m.QuickViewGroupElement
不是一个允许您在其中添加控件(如按钮)的容器。
所以,你应该使用 Popover like in this sample来自文档
关于javascript - 如何在SAPUI5快速查看中放置按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56040182/