UNPKG

tk-eui-plus

Version:

43 lines (42 loc) 1.07 kB
import { defineComponent as u, useSlots as d, resolveComponent as m, openBlock as p, createBlock as f, mergeProps as k, unref as o, withCtx as y, renderSlot as l, createCommentVNode as s } from "vue"; const C = /* @__PURE__ */ u({ __name: "index", props: { type: { type: String, default: "default" }, size: { type: String, default: "default" } }, emits: ["click"], setup(e, { emit: i }) { let n = d(), r = i, a = () => { r("click"); }; return (t, g) => { const c = m("el-button"); return p(), f(c, k({ type: e.type, size: e.size, onClick: o(a) }, t.$attrs, { class: "my-button" }), { default: y(() => [ o(n).loading ? l(t.$slots, "loading", { key: 0 }) : s("v-if", !0), o(n).default ? l(t.$slots, "default", { key: 1 }) : s("v-if", !0) ]), _: 3 /* FORWARDED */ }, 16, ["type", "size", "onClick"]); }; } }), z = { install(e) { e.component("tkButton", C); } }; export { z as default };