UNPKG

tk-eui-plus

Version:

63 lines (62 loc) 1.74 kB
import { defineComponent as p, useSlots as v, ref as _, watch as c, resolveComponent as g, openBlock as V, createElementBlock as b, createVNode as k, mergeProps as h, unref as m, isRef as C, withCtx as r, renderSlot as n, createElementVNode as w, createCommentVNode as y } from "vue"; const B = { class: "dialog-footer" }, N = /* @__PURE__ */ p({ __name: "index", props: { title: { type: String, default: "" }, visible: Boolean }, emits: ["update:visible"], setup(t, { emit: i }) { let l = t, s = v(), a = i, o = _(l.visible); return c( () => l.visible, (e) => { o.value = e; } ), c( () => o.value, (e) => { a("update:visible", e); } ), (e, d) => { const f = g("el-dialog"); return V(), b("div", null, [ k(f, h({ modelValue: m(o), "onUpdate:modelValue": d[0] || (d[0] = (u) => C(o) ? o.value = u : o = u), title: t.title, width: "500" }, e.$attrs), { header: r(() => [ n(e.$slots, "header", {}, void 0, !0) ]), footer: r(() => [ w("div", B, [ n(e.$slots, "footer", {}, void 0, !0) ]) ]), default: r(() => [ m(s).default ? n(e.$slots, "default", { key: 0 }, void 0, !0) : y("v-if", !0) ]), _: 3 /* FORWARDED */ }, 16, ["modelValue", "title"]) ]); }; } }), S = (t, i) => { const l = t.__vccOpts || t; for (const [s, a] of i) l[s] = a; return l; }, $ = /* @__PURE__ */ S(N, [["__scopeId", "data-v-3cc5024f"]]), D = { install(t) { t.component("tkDialog", $); } }; export { D as default };