tyh-ui2
Version:
The next generation ui component library of tyh-ui is based on vue3 Version, fully embrace vue3.
31 lines (30 loc) • 900 B
JavaScript
import { defineComponent as i, computed as a, openBlock as n, createElementBlock as o, normalizeClass as r, unref as p, normalizeStyle as u, createCommentVNode as c, renderSlot as h } from "vue";
import { Props as m } from "./index2.js";
const y = ["href", "target"], d = i({
name: "TyhLink"
}), b = /* @__PURE__ */ i({
...d,
props: m,
setup(l) {
const t = l, s = a(() => [
"tyh-link",
`tyh-link-${t.type}`,
{ "tyh-link-prohibit": t.prohibit }
]);
return (e, f) => (n(), o("a", {
class: r(p(s)),
style: u({ textDecoration: e.underline ? "none" : "underline" }),
href: e.prohibit ? "" : e.url,
target: e.target
}, [
e.icon ? (n(), o("i", {
key: 0,
class: r(["tyh-icon", `tyh-icon-${e.type}`, e.icon])
}, null, 2)) : c("", !0),
h(e.$slots, "default")
], 14, y));
}
});
export {
b as default
};