UNPKG

tk-eui-plus

Version:

57 lines (56 loc) 1.3 kB
import { defineComponent as a, resolveComponent as o, openBlock as n, createBlock as r, mergeProps as i, withCtx as d, resolveDynamicComponent as u, unref as f, createCommentVNode as c, renderSlot as m } from "vue"; const s = (e) => e.replace(/(A-Z)g/, "-$1"), y = /* @__PURE__ */ a({ __name: "index", props: { type: { type: String, default: "primary" }, underline: { type: Boolean, default: !0 }, disabled: { type: Boolean, default: !1 }, href: { type: String, default: "" }, target: { type: String, default: "" }, icon: { type: String, default: "" } }, setup(e) { return (t, p) => { const l = o("el-link"); return n(), r(l, i({ type: e.type, href: e.href, target: e.target, disabled: e.disabled, underline: e.underline }, t.$attrs), { default: d(() => [ e.icon !== "" ? (n(), r(u(`tk-icon-${f(s)(e.icon)}`), { key: 0 })) : c("v-if", !0), m(t.$slots, "default") ]), _: 3 /* FORWARDED */ }, 16, ["type", "href", "target", "disabled", "underline"]); }; } }), k = { install(e) { e.component("tkLink", y); } }; export { k as default };