@easyui/element-plus-pro
Version:
This is an extended ui components library for element-plus
34 lines (33 loc) • 830 B
JavaScript
import { l as u } from "../_dependencies/lodash.js";
import { ElNotification as l } from "element-plus";
import { MessageType as i } from "../types/propsDefine.d.js";
const s = (r, t, o) => {
const n = o || {}, { colorful: e, customClass: a } = n, c = a ? [a] : [];
return e && c.unshift("notification-colorful"), l(Object.assign({
type: r,
message: t,
duration: 3e3,
customClass: c.join(" ")
}, u.omit(n, ["type", "title", "message", "colorful", "customClass"])));
};
class f {
static success(t, o) {
return s(i.SUCCESS, t, o);
}
static warning(t, o) {
return s(i.WARNING, t, o);
}
static error(t, o) {
return s(i.ERROR, t, o);
}
static info(t, o) {
return s(i.INFO, t, o);
}
static alert(t, o) {
return s("", t, o);
}
}
const C = () => f;
export {
C as default
};