UNPKG

yk-element-components-v2

Version:

84 lines (83 loc) 2.35 kB
function g(t, e, a, f, s, l, r, u) { var n = typeof t == "function" ? t.options : t; e && (n.render = e, n.staticRenderFns = a, n._compiled = !0), f && (n.functional = !0), l && (n._scopeId = "data-v-" + l); var o; if (r ? (o = function(i) { i = i || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !i && typeof __VUE_SSR_CONTEXT__ < "u" && (i = __VUE_SSR_CONTEXT__), s && s.call(this, i), i && i._registeredComponents && i._registeredComponents.add(r); }, n._ssrRegister = o) : s && (o = u ? function() { s.call( this, (n.functional ? this.parent : this).$root.$options.shadowRoot ); } : s), o) if (n.functional) { n._injectStyles = o; var p = n.render; n.render = function(y, _) { return o.call(_), p(y, _); }; } else { var d = n.beforeCreate; n.beforeCreate = d ? [].concat(d, o) : [o]; } return { exports: t, options: n }; } const h = { name: "yk-button", props: { category: { type: String, default: "full" }, type: { type: String, default: "primary" }, size: { type: String, default: "large" }, icon: { type: String, default: "" }, loading: Boolean, disabled: Boolean, circle: Boolean }, methods: { handleClick(t) { this.disabled || this.loading || this.$emit("click", t); } } }; var k = function() { var e = this, a = e._self._c; return a("button", { staticClass: "yk-button", class: [ e.type ? "yk-button--" + e.type : "", e.size ? "yk-button--" + e.size : "", e.category ? "yk-button--" + e.category + "_look" : "", e.circle ? "is-circle--" + e.size : "", e.disabled || e.loading ? "yk-button--" + e.category + "_look" + e.type : "" ], attrs: { disabled: e.disabled || e.loading }, on: { click: e.handleClick } }, [e.loading ? a("i", { staticClass: "yk-icon yk-loading-icon" }) : e._e(), e.icon && !e.loading ? a("i", { class: "yk-icon " + e.icon }) : e._e(), e.$slots.default && !e.circle ? a("span", [e._t("default")], 2) : e._e()]); }, v = [], b = /* @__PURE__ */ g( h, k, v, !1, null, "5d658939", null, null ); const c = b.exports, m = { install(t) { t.component(c.name, c); } }; export { m as default };