tk-eui-plus
Version:
39 lines (38 loc) • 1.02 kB
JavaScript
import { defineComponent as s, useSlots as a, resolveComponent as c, openBlock as l, createBlock as p, mergeProps as d, withCtx as i, unref as u, renderSlot as _, createCommentVNode as m } from "vue";
const f = /* @__PURE__ */ s({
__name: "index",
props: {
type: {
type: String,
validator: (e) => ["primary", "success", "info", "warning", "danger"].includes(e)
}
},
setup(e) {
let o = a();
return (t, r) => {
const n = c("el-tag");
return l(), p(n, d({
type: e.type,
class: "my-tag"
}, t.$attrs), {
default: i(() => [
u(o).default ? _(t.$slots, "default", { key: 0 }, void 0, !0) : m("v-if", !0)
]),
_: 3
/* FORWARDED */
}, 16, ["type"]);
};
}
}), g = (e, o) => {
const t = e.__vccOpts || e;
for (const [r, n] of o)
t[r] = n;
return t;
}, y = /* @__PURE__ */ g(f, [["__scopeId", "data-v-578db7c4"]]), k = {
install(e) {
e.component("tkTag", y);
}
};
export {
k as default
};