fast-vue3-ui
Version:
<h1 align="center"> fast-ui </h1>
44 lines (43 loc) • 1.24 kB
JavaScript
import "./style/index.css";
import { defineComponent as i, onMounted as l, computed as e, openBlock as t, createElementBlock as n, normalizeStyle as d, createElementVNode as m, normalizeClass as f, toDisplayString as u, createCommentVNode as p } from "vue";
import { iconProps as _ } from "./types.mjs";
import g from "../../_virtual/plugin-vue_export-helper.mjs";
const h = i({
name: "k-icon",
props: _,
setup(o) {
l(() => {
import("./font/iconfont.mjs");
});
const r = e(() => `#fast-${o.name}`), s = e(() => ({
["fast-dot"]: o.dot && !o.badge
})), a = e(() => o.badge), c = e(() => ({
color: o.color
}));
return {
iconName: r,
styleDot: s,
badge: a,
iconColor: c
};
}
}), k = { class: "fast-icon" }, y = ["xlink:href"];
function C(o, r, s, a, c, $) {
return t(), n("div", k, [
(t(), n("svg", {
class: "icon",
style: d(o.iconColor),
"aria-hidden": "true"
}, [
m("use", { "xlink:href": o.iconName }, null, 8, y)
], 4)),
o.dot ? (t(), n("div", {
key: 0,
class: f(["fast-info", o.styleDot])
}, u(o.badge), 3)) : p("", !0)
]);
}
const z = /* @__PURE__ */ g(h, [["render", C]]);
export {
z as default
};