UNPKG

vue-msg-njj

Version:

35 lines (34 loc) 827 B
import { openBlock as a, createElementBlock as c, normalizeClass as r, createElementVNode as _, toDisplayString as m } from "vue"; const p = (t, e) => { const o = t.__vccOpts || t; for (const [n, s] of e) o[n] = s; return o; }, i = { name: "vue-msg", data() { return { msgStatus: !1, text: "" }; }, methods: { msgPlugin(t, e = 2e3) { this.text = t, this.msgStatus = !0, setTimeout(() => this.msgStatus = !1, e); } } }, l = { class: "msg-wrapper" }; function u(t, e, o, n, s, f) { return a(), c("div", { class: r(["msg", { active: s.msgStatus }]), ref: "msg" }, [ _("div", l, m(s.text), 1) ], 2); } const g = /* @__PURE__ */ p(i, [["render", u], ["__scopeId", "data-v-a50ff231"]]), v = (t) => { app.component("vue-msg", g); }; export { v as default };