第一次提交
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// 显示错误
|
||||
import { ElNotification } from "element-plus";
|
||||
export function showMsg(t: string, type = "error", isCatch = true, reason?: string, duration = 2000) {
|
||||
ElNotification({
|
||||
title: t,
|
||||
type,
|
||||
duration
|
||||
});
|
||||
if (isCatch && type != "success") {
|
||||
throw Error(reason || t);
|
||||
}
|
||||
// if (isCatch && type != 'success') { return reason || t; }
|
||||
}
|
||||
Reference in New Issue
Block a user