@easyui/element-plus-pro
Version:
This is an extended ui components library for element-plus
41 lines (40 loc) • 1.05 kB
JavaScript
import { l as i } from "../_dependencies/lodash.js";
import { ElMessageBox as o } from "element-plus";
import { MessageType as r } from "../types/propsDefine.d.js";
const a = (n, e, t) => o(Object.assign({
type: n,
message: e
}, i.omit(t || {}, ["type", "message"])));
class u {
static success(e, t) {
const s = { title: "操作成功", ...t || {} };
return a(r.SUCCESS, e, s);
}
static warning(e, t) {
const s = { title: "操作警告", ...t || {} };
return a(r.WARNING, e, s);
}
static error(e, t) {
const s = { title: "操作失败", ...t || {} };
return a(r.ERROR, e, s);
}
static info(e, t) {
const s = { title: "温馨提示", ...t || {} };
return a(r.INFO, e, s);
}
static alert(e, t, s) {
return o.alert(e, t, s);
}
static confirm(e, t, s) {
const c = { type: r.WARNING, ...s || {} };
return o.confirm(e, t, c);
}
static prompt(e, t) {
const s = t == null ? void 0 : t.message;
return o.prompt(s, e, t);
}
}
const g = () => u;
export {
g as default
};