UNPKG

fast-vue3-ui

Version:

<h1 align="center"> fast-ui </h1>

57 lines (56 loc) 1.6 kB
import "./style/index.css"; import { defineComponent as f, computed as l, useSlots as p, resolveComponent as b, openBlock as n, createElementBlock as m, normalizeClass as y, createBlock as u, createCommentVNode as t, renderSlot as F } from "vue"; import { buttonProps as $ } from "./types.mjs"; import d from "../icon/icon.mjs"; import k from "../../_virtual/plugin-vue_export-helper.mjs"; const C = f({ name: "fast-button", props: $, components: { Icon: d }, setup(o) { const e = l(() => ({ [`fast-button--${o.type}`]: o.type, "is-plain": o.plain, "is-round": o.round, "is-disabled": o.disabled, [`fast-button--${o.size}`]: o.size })), s = l(() => { const a = o.icon, c = o.iconPosition; return { iconName: a, position: c }; }), i = p(); return { styleClass: e, Icon: d, iconFont: s, slots: i }; } }), N = { key: 1, class: "fast-button-text" }; function h(o, e, s, i, a, c) { const r = b("Icon"); return n(), m("button", { class: y(["fast-button", o.styleClass]) }, [ o.iconFont.iconName && o.iconFont.position != "right" ? (n(), u(r, { key: 0, name: o.iconFont.iconName }, null, 8, ["name"])) : t("", !0), o.slots.default ? (n(), m("span", N, [ F(o.$slots, "default") ])) : t("", !0), o.iconFont.position == "right" && o.iconFont.iconName ? (n(), u(r, { key: 2, name: o.iconFont.iconName }, null, 8, ["name"])) : t("", !0) ], 2); } const P = /* @__PURE__ */ k(C, [["render", h]]); export { P as default };