onOK Modal.warning iview to write a function put on, or will not be an asynchronous call, direct pop-up when he performed

export const warning = (str, callback = _ => {}, outCallback = () => {}) => {
  Modal.warning({
    // there: callback, 
    there is: () => {callback (outCallback)},
    title: ' prompt ' ,
    content: str
  })
}

 

Guess you like

Origin www.cnblogs.com/pengchenggang/p/11939887.html