elementUI message used on the tips of onClose

Recently learned about elementUI this framework, practice hand when uses in onClose the message callback function, the callback function is executed after the end of the message prompt, because the document does not see the use of about onClose, and I may have missed. .. Baidu did not find a similar test this function several times, only to find its usage in inadvertently, especially to record it.

the this . $ the Message ({ 
    the Message: 'login is successful!' , // prompt information 
    of the type: 'Success' , // type is successfully 
    offset: 225 , offset from the top of the window // 
    DURATION: 800 , // display time, is set to 0 ms does not close automatically. 
    the onClose :() => {
      // write to prompt function to be executed after closing 
    } 
});

Later found actually quite simple, but the beginning of time, like the brain short-circuited, and did not think, did not start using the arrow function, I would like to achieve is closed jump to the home page when prompted to write code directly jump, resulting in no message directly to jump, then write a named function call found no use, I do not know what the problem is, just think back to use the arrow functions, this success, es6 syntax used or not used, it seems to be more with ah, otherwise it becomes obsolete.

Guess you like

Origin www.cnblogs.com/limerence-cy/p/12050401.html