卡片内容创建组件失败

问题描述 投票:0回答:1

我正在尝试在 Plnkr 中设置一个最小的 SAP UI 集成卡

Component
设置(以说明问题),但我无法加载该卡:

Unable to load data
Card content failed to create component

https://plnkr.co/edit/xK8FQdx2QBZpn4wE

这里缺少什么或设置不正确?

也许缺少资源根声明,但我不知道是否需要以及如何为 UI 集成卡设置它。

sapui5
1个回答
0
投票

在 /Component.js 中搜索组件文件,在本例中是

https://run.plnkr.co/Component.js
,但它应该是
https://run.plnkr.co/preview/xK8FQdx2QBZpn4wE/Component.js
。 避免绝对路径问题的一个简单解决方案是将所有卡代码放在其自己的文件夹中https://plnkr.co/edit/GARaxLwFYbUIAkSe

project
    card
        manifest.json
        Component.js
        ...
    index.html
© www.soinside.com 2019 - 2024. All rights reserved.