gpt4 book ai didi

javascript - Ui5 标题中的右键(XML View )

转载 作者:行者123 更新时间:2023-11-30 12:41:46 26 4
gpt4 key购买 nike

如何在 SAP Ui5 View 中的标题右侧添加按钮。 View 采用 XML 格式。另一个 View 在 JavaScript 中。

代码是:

return new sap.m.Page({
enableScrolling: false,
showHeader: true,
headerContent: [
],
headerContent : new sap.m.Button({
icon: "sap-icon://sys-help-2",
press : function() {
app.to("idVersion", {id:"initial"});
}
}),
title: "Application Test",
content: [oTileContainer]
});

XML View 是:

  <Page
showHeader="true"
id="idPage"
title="Personal Information"
showNavButton="true"
navButtonTap="actBack"
class="sapUiFioriObjectPage" >
<!-- this CSS class add a standard spacing to all the page content -->
<headerContent>
.......
</headerContent>

如何在 <headerContent> 中添加按钮以在 Javascript 中显示标签。

我不能使用 CustomHeader,因为其他页面将获得此内容并且可能会影响它们。请提出建议。

最佳答案

太棒了...我认为没有 :D

但这是我的解决方案:

  <Page
title="....."
showNavButton="true"
navButtonTap="actBack"
class="sapUiFioriObjectPage" >
<!-- this CSS class add a standard spacing to all the page content -->
<headerContent>
</headerContent>
<headerContent>
<Button
icon="sap-icon://sys-help-2"
press="handleNavToInfo" />
</headerContent>
<content>
.......

关于javascript - Ui5 标题中的右键(XML View ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24185476/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com