dk-plus
Version:
35 lines (34 loc) • 905 B
JavaScript
import { defineComponent as k, ref as s, toRefs as A } from "vue";
import { dkAlertProps as b } from "./index3.js";
import "../../_icon/index.js";
import { getAlert as y } from "../../_hooks/get-alert/index.js";
const S = k({
name: "DkAlert",
props: b,
emits: ["close"],
setup(e, { emit: l }) {
const c = s(), t = s(!0), { type: n, title: r, description: i, center: a, closable: f, icon: p, closeIcon: m } = A(e), { isSuccess: u, styleList: v } = y(e), d = () => {
l("close", o());
}, o = () => {
t.value = !1;
};
return {
dkAlertRef: c,
type: n.value || "info",
title: r,
description: i,
center: a.value || !1,
closable: f.value,
icon: p,
closeIcon: m.value || "IconShanchu1",
EventClick: d,
alertVisible: t,
onClose: o,
isSuccess: u,
styleList: v
};
}
});
export {
S as default
};