UNPKG

yk-element-components-v2

Version:

178 lines (177 loc) 4.21 kB
function l(e, n, r, i, s, d, _, m) { var t = typeof e == "function" ? e.options : e; n && (t.render = n, t.staticRenderFns = r, t._compiled = !0), i && (t.functional = !0), d && (t._scopeId = "data-v-" + d); var a; if (_ ? (a = function(o) { o = o || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !o && typeof __VUE_SSR_CONTEXT__ < "u" && (o = __VUE_SSR_CONTEXT__), s && s.call(this, o), o && o._registeredComponents && o._registeredComponents.add(_); }, t._ssrRegister = a) : s && (a = m ? function() { s.call( this, (t.functional ? this.parent : this).$root.$options.shadowRoot ); } : s), a) if (t.functional) { t._injectStyles = a; var v = t.render; t.render = function(b, c) { return a.call(c), v(b, c); }; } else { var u = t.beforeCreate; t.beforeCreate = u ? [].concat(u, a) : [a]; } return { exports: e, options: t }; } const g = { name: "yk-radio", props: { value: {}, label: {}, disabled: Boolean, name: String, border: Boolean, size: String }, computed: { isGroup() { let e = this.$parent; for (; e; ) if (e.$options.componentName !== "ElRadioGroup") e = e.$parent; else return this._radioGroup = e, !0; return !1; }, model: { get() { return this.isGroup ? this._radioGroup.value : this.value; }, set(e) { this.isGroup ? this.dispatch("ElRadioGroup", "input", [e]) : this.$emit("input", e), this.$refs.radio && (this.$refs.radio.checked = this.model === this.label); } } }, methods: { change(e) { this.$emit("change", e); } } }; var $ = function() { var n = this, r = n._self._c; return r("el-radio", { attrs: { disabled: n.disabled, label: n.label, border: n.border, size: n.size, name: n.name }, on: { change: n.change }, model: { value: n.model, callback: function(i) { n.model = i; }, expression: "model" } }, [n._t("default")], 2); }, C = [], G = /* @__PURE__ */ l( g, $, C, !1, null, null, null, null ); const p = G.exports; const R = { name: "yk-radio-button", props: { value: {}, label: {}, disabled: Boolean, name: String, border: Boolean, size: String }, computed: { _radioGroup() { let e = this.$parent; for (; e; ) if (e.$options.componentName !== "ElRadioGroup") e = e.$parent; else return e; return !1; }, model: { get() { return this._radioGroup.value; }, set(e) { this._radioGroup.$emit("input", e); } } }, methods: { change(e) { this.$emit("change", e); } } }; var z = function() { var n = this, r = n._self._c; return r("el-radio-button", { attrs: { disabled: n.disabled, label: n.label, border: n.border, size: n.size, name: n.name }, on: { change: n.change }, model: { value: n.model, callback: function(i) { n.model = i; }, expression: "model" } }, [n._t("default")], 2); }, y = [], S = /* @__PURE__ */ l( R, z, y, !1, null, "aaaadbfb", null, null ); const f = S.exports; const k = { name: "yk-radio-group", props: { value: {}, size: String, fill: String, textColor: String, disabled: Boolean }, data() { return { editorContent: this.value }; }, watch: { value(e) { this.editorContent = e; } }, methods: { change(e) { this.$emit("input", e), this.$emit("change", e); } } }; var B = function() { var n = this, r = n._self._c; return r("el-radio-group", { attrs: { size: n.size, fill: n.fill, textColor: n.textColor, disabled: n.disabled }, on: { change: n.change }, model: { value: n.editorContent, callback: function(i) { n.editorContent = i; }, expression: "editorContent" } }, [n._t("default")], 2); }, x = [], w = /* @__PURE__ */ l( k, B, x, !1, null, "c9aa400e", null, null ); const h = w.exports, E = { install(e) { e.component(p.name, p), e.component(f.name, f), e.component(h.name, h); } }; export { E as default };