框架:SAPUI5 V1.38.39
IDE:SAP WEB IDE
我想在另一个应用程序中使用 SAPUI5 应用程序,为此我找到了以下资源:https ://blogs.sap.com/2017/04/05/sapui5-how-to-reuse-parts-of- a-sapui5-application-in-othermultiple-sapui5-applications/
在 init 中的 component.js 中我使用了:
var sPath = sHostUrl.includes("webidetesting") ? "https://gtyext.net" : sHostUrl;
jQuery.sap.registerModulePath("ztntapp", `${sPath}/sap/bc/ui5_ui5/sap/ztntapp/`);
Run Code Online (Sandbox Code Playgroud)
在我看来:
<core:ComponentContainer
name="ztntapp"
manifestFirst="true"
component="ztntapp">
</core:ComponentContainer>
Run Code Online (Sandbox Code Playgroud)
并在 neo-app.json 中
{
"path": "/sap/bc/ui5_ui5/sap/ztntapp/",
"target": {
"type": "destination",
"name": "gtyext_net",
"entryPath": "/sap/bc/ui5_ui5/sap/ztntapp/"
},
"description": "namespace.tntapp Resources"
}
Run Code Online (Sandbox Code Playgroud)
在 component.js 中
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"./model/models"
], function (UIComponent, Device, models) {
"use strict";
return UIComponent.extend("TrackAndTrace.ztntapp.Component", {
metadata: {
manifest: "json"
},
init: function …Run Code Online (Sandbox Code Playgroud)