UNPKG

@open-data-v/ui

Version:

OpenDataV UI基础包

37 lines (36 loc) 1.26 kB
import { defineComponent as i, openBlock as l, createElementBlock as n, Fragment as p, renderList as c, createBlock as m, withCtx as f, createTextVNode as v, toDisplayString as b } from "vue"; import g from "./Radio.vue.esm.js"; /* empty css */ const h = { class: "o-radio-group" }, C = /* @__PURE__ */ i({ __name: "RadioGroup", props: { value: { type: [String, Boolean, Number] }, options: {}, optionsKey: { default: () => ({ label: "label", value: "value" }) }, disabled: { type: Boolean, default: !1 } }, emits: ["update:value", "updateValue", "change"], setup(_, { emit: u }) { const o = u, r = (e, t) => { o("update:value", e), o("updateValue", e), o("change", e, t); }; return (e, t) => (l(), n("div", h, [ (l(!0), n(p, null, c(e.options, (a, s) => (l(), m(g, { key: s, "model-value": e.value, value: a[e.optionsKey.value], disabled: e.disabled || a.disabled, onChange: (d) => r(d, a) }, { default: f(() => [ v(b(a[e.optionsKey.label]), 1) ]), _: 2 }, 1032, ["model-value", "value", "disabled", "onChange"]))), 128)) ])); } }); export { C as default }; //# sourceMappingURL=RadioGroup.vue.esm.js.map