sapui5 - sap.ushell.ui.shell.ShellHeadItem 不显示文本
问题描述
在SAPUI5 documentation
他们有以下示例,用于将标题项添加到启动板顶部标题工具栏。
var oRenderer = sap.ushell.Container.getRenderer("fiori2");
// Create an icon button that opens a dialog
oRenderer.addHeaderEndItem({
id: "myTestButton",
icon: "sap-icon://action-settings",
tooltip: resources.i18n.getText("testButton.tooltip"),
text: resources.i18n.getText("testButton.text"),
ariaLabel: resources.i18n.getText("testButton.ariaLabel"),
ariaHaspopup: "dialog"
press: [myController.handleTestButtonPress, myController]
}, true);
// Create a temporary link
oRenderer.addHeaderEndItem({
id: "myTestLink",
ariaLabel: resources.i18n.getText("testLink.label"),
target: "#MyTestApplication-show"
icon: "sap-icon://overflow"
}, true, true);
我已经测试了这个片段,不幸的是它只显示图标并且它不显示任何文本,但是工具提示有效!
任何人都知道如何强制sap.ushell.ui.shell.ShellHeadItem
显示文本而不是图标!?或者至少显示图标和文本!
当我只设置文本而不设置图标属性时,它将显示以下结果:
解决方案
推荐阅读
- python - 用 os.getpid() 加咖啡因 pid
- google-apps-script - 无法在 Google Docs 中使用邮件合并脚本复制表属性
- business-intelligence - 商业智能阶段的加载方法
- user-agent - Wix:将用户代理重定向到特定页面?
- php - 检查日期时间是否在最后 7 分钟内发生
- javascript - 在 react.js firestore 中获取文档值
- java - Android textview宽度不一样
- java - 如何在 Java 中获取和更新 Azure 生命周期规则
- node.js - 如何处理并发请求的字段?
- reactjs - React JS 模板,config.json 不断缩小