sap-ui5 walkthrough step6 Modules

泠之屋

关注

阅读 47

2022-01-13

call the message toast from sap.m library

and add the new module SAP/M/MSGTOAST

pass it to the constructor

then get rid of the alert

and put MT show(text)

App.contorller.js

sap.ui.define([

    "sap/ui/core/mvc/Controller",

    "sap/m/MessageToast"

],function(Controller,MessageToast){

    "use strict"

    return Controller.extend("sap.ui.demo.walkthrough.App",{

        onShowHello : function(){

            //show a native or vanailla JS alert

            MessageToast.show("Hello Msg Toast There!")

        }

    });

});

精彩评论(0)

0 0 举报