我想在2行中显示消息祝词,而不是1行,我怎么做?此外,我需要设计它与较少的不透明度,特定的颜色和大小?有什么想法吗?|var message=this._obundle.gettext(“PaymentDeveloped”);sap.m.messageToast.show(消息);
为了在新行中显示文本,可以在需要换行符的地方包含换行符(\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祝酒词。