SAPUI5中的自定义Gif加载程序
如何在自定义UI5应用程序中使用自定义.gif文件预加载程序。当点击弹出或导航延迟按钮时 下面是我的代码SAPUI5中的自定义Gif加载程序,sapui5,Sapui5,如何在自定义UI5应用程序中使用自定义.gif文件预加载程序。当点击弹出或导航延迟按钮时 下面是我的代码 <content> <Button text="Dialog" width="230px" press="onDialogPress" class="sapUiSmallMarginBottom" /> </content> onDia
<content>
<Button
text="Dialog"
width="230px"
press="onDialogPress"
class="sapUiSmallMarginBottom" />
</content>
onDialogPress: function(oEvent) {
var that = this;
if (!that.pressDialog) {
that.pressDialog = new sap.m.BusyDialog({
text: 'Loading...',
});
//to get access to the global model
this.getView().addDependent(that.pressDialog);
}
that.pressDialog.open();
},
onDialogPress:功能(oEvent){
var=这个;
如果(!that.pressDialog){
that.pressDialog=new sap.m.BusyDialog({
文本:“正在加载…”,
});
//以访问全局模型
this.getView().addDependent(that.pressDialog);
}
按dialog.open();
},
具有添加自定义图像的选项:
onDialogPress: function(oEvent) {
if (!this.pressDialog) {
this.pressDialog = new sap.m.BusyDialog({
text: 'Loading...',
customIcon: './stackoverflow/loading.gif',
customIconRotationSpeed: 0,
customIconWidth: '48px',
customIconHeight: '48px'
});
this.getView().addDependent(that.pressDialog);
}
this.pressDialog.open();
}
结果: