如何在sapui5中设计消息Toast



我想用2行而不是1行显示一条消息toast,我该怎么做?此外,我需要设计的不透明度,具体的颜色和大小?知道吗?‏var消息=这个_oBundle.getText("Paymentreduced"(;sap.m.MessageToast.show(message(;

为了在新行中显示文本,您可以在需要换行符的地方包含换行符(\n(。为了更改MessageToast的不透明度和颜色,您需要应用自定义CSS。示例:-

sap.m.MessageToast.show('Lorem n ipsum n dolor sit amet', {
duration: 3000, 
width: "15rem", // default max width supported 
});
/* width properties are required only if the width required is more than 15rem*/
.sapMMessageToast{
background : #629192 !important;
width:25rem !important;
max-width : 25rem !important;
opacity: 0.5 !important;
}

但请记住,这将应用于所有MessageToast祝酒词。

最新更新