UNPKG

tyh-ui2

Version:

The next generation ui component library of tyh-ui is based on vue3 Version, fully embrace vue3.

33 lines (32 loc) 822 B
import { defineComponent as r, computed as i, openBlock as s, createElementBlock as n, normalizeClass as p, unref as m, renderSlot as u, createCommentVNode as d } from "vue"; import { Props as y } from "./index2.js"; const f = r({ name: "TyhTag" }), k = /* @__PURE__ */ r({ ...f, props: y, emits: ["close"], setup(a, { emit: l }) { const e = a, c = i(() => [ "tyh-tag", `tyh-tag-${e.type}`, { [`tyh-tag-${e.size}`]: e.size, "tyh-tag-round": e.round } ]); return (t, o) => (s(), n("span", { class: p(m(c)) }, [ u(t.$slots, "default"), t.isClose ? (s(), n("i", { key: 0, class: "tyh-icon tyh-ui-close", onClick: o[0] || (o[0] = (h) => l("close")) })) : d("", !0) ], 2)); } }); export { k as default };