答案 0 :(得分:1)
此问题是间歇性的,与Google Chrome相关。它与浏览器如何处理jQuery.sap.getModulePath()
发出的异步请求有关。
我已经在Firefox Developer Edition中测试过,它运行正常。无论如何,这是如何解决它:
如果您在控制器中注释掉该行并将JSON数据定义到变量sPath它可以工作(我已经缩短了JSON数据以保持答案干净,但现场演示已满,请参阅下面的链接)。
Page.controller.js,第12行。
//var sPath = jQuery.sap.getModulePath("sap.m.sample.TileContainer", "/data.json");
var sPath = {"TileCollection":[{"icon":"sap-icon://hint","type":"Monitor","title":"Tiles: a modern UI design pattern for overview & navigation."},{"icon":"sap-icon://inbox","number":"89","title":"Approve Leave Requests","info":"Overdue","infoState":"Error"},{"type":"Create","title":"Create Leave Requests","info":"28 Days Left","infoState":"Success"},{"icon":"sap-icon://travel-expense-report","number":"281","numberUnit":"euro","title":"Travel Reimbursement","info":"1 day ago"},{"icon":"sap-icon://loan","number":"2380","numberUnit":"euro","title":"My Salary","info":"8 days ago"}]};
工作示例: Tile Container