react-app-shell
Version:
react打包脚本和example, 这里的版本请忽略
24 lines (21 loc) • 638 B
JavaScript
import notice from '../components/toast';
/**
* 自定义toast
*/
export default {
info(content, duration, onClose) {
return notice('info', content, duration, onClose);
},
success(content, duration, onClose) {
return notice('success', content, duration, onClose);
},
warning(content, duration, onClose) {
return notice('warning', content, duration, onClose);
},
error(content, duration, onClose) {
return notice('error', content, duration, onClose);
},
loading(content, duration = 0, onClose) {
return notice('loading', content, duration, onClose);
}
};