SAPUI5图标不';t显示
我将XML视图与SAPUI5一起使用,发现没有显示任何图标。下面是一些示例代码。代码生成正确数量的分幅和数据,但没有图标SAPUI5图标不';t显示,sapui5,Sapui5,我将XML视图与SAPUI5一起使用,发现没有显示任何图标。下面是一些示例代码。代码生成正确数量的分幅和数据,但没有图标 <TileContainer id="caseTiles" height="50%" tiles="{hello>/HelloCollection}"> <StandardTile id="tileId" press="doIt" icon="sap-icon://hello-world" title="{hello>Gr
<TileContainer id="caseTiles" height="50%" tiles="{hello>/HelloCollection}">
<StandardTile id="tileId" press="doIt" icon="sap-icon://hello-world"
title="{hello>Greeting}"
info="{hello>Language}" />
</TileContainer>
我使用图标的地方也是如此。我想我一定错过了什么,但我不确定是什么。任何帮助都将不胜感激。是因为hello world不是SAP字体的图标吗 有关正确的名称,请参阅。
是WalkToul。在最新的UI5版本中运行良好,请参见以下内容。但是,我试过使用1.24.3-1.26.x,但它不起作用。看起来您至少需要1.28.x(即1.28.4)。要使用不同的版本进行测试,只需将引导url从更改为(这里您可以看到可用的版本:或) 但是,我不知道为什么我可以在1.24.3的演示应用程序中看到hello world图标,请参阅
nabisoft提供的SAPUI5单文件模板
sap.ui.getCore().attachInit(函数(){
“严格使用”;
sap.ui.xmlview({
viewContent:jQuery(“#myXmlView”).html()
}).placeAt(“内容”);
});
奇怪的是,SAPUI5图标浏览器上的集合中包含了hello world,但我尝试了其他一些方法来确保,其中一些方法有效(即world和accept),而其他方法无效(即hello world和activate)。可能是图标浏览器中的集合不是最新的吗?嗨,罗斯,你能提供更多的信息吗?您正在使用WEBide吗?您是否已使用模板开始?你使用的是什么版本的UI5?我使用的是WDW内部部署。看起来是1.24.3版。嗨,罗斯,1.24已经过时了。因此,升级这一个始终是一个好主意。你的代码应该正常。可能您没有加载正确的库?尝试加载sap.m和sap.ui.core。也许您可以添加一些代码来循环浏览一些图标,看看它们是否开始显示。此链接可能有帮助:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>SAPUI5 single file template by nabisoft</title>
<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-bindingSyntax="complex"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async"></script>
<!-- template used: https://www.nabisoft.com/tutorials/sapui5/sapui5-single-file-template-using-xmlviews-controllers-fragments-and-custom-controls-for-bug-illustrations-support-requests-or-demos -->
<!-- XMLView -->
<script id="myXmlView" type="ui5/xmlview">
<mvc:View
height="100%"
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc">
<App>
<Page
enableScrolling="false"
title="Tile with Icon">
<content>
<TileContainer>
<StandardTile
icon="sap-icon://hello-world"
title="My Title"
info="My Info"/>
</TileContainer>
</content>
</Page>
</App>
</mvc:View>
</script>
<script>
sap.ui.getCore().attachInit(function () {
"use strict";
sap.ui.xmlview({
viewContent : jQuery("#myXmlView").html()
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody">
<div id="content"></div>
</body>
</html>