1 import toastr from '../../assets/js/toastr.min.js'
\r
2 export default function(type, title, info, detail="") {
\r
3 if(typeof type == "number") {
\r
4 if(200 <= type && type < 300) {
\r
6 } else if (300 <= type && type < 500) {
\r
8 } else if (500 <= type) {
\r
15 detail = "* <strong>detail:</strong> " + detail;
\r
17 var content = "<br>* " + info + "<br><br>" + detail;
\r
18 if(type == "success"){
\r
19 toastr.success(content, title);
\r
21 else if(type == "info") {
\r
22 toastr.info(content, title);
\r
24 else if(type == "error"){
\r
25 toastr.error(content, title);
\r
28 toastr.warning(content, title);
\r