UNPKG

t-fighting-design

Version:

Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.

47 lines (46 loc) 1.24 kB
import { defineComponent as p, reactive as f, toRefs as _, provide as g, computed as a, openBlock as G, createElementBlock as h, normalizeClass as v, unref as n, normalizeStyle as y, renderSlot as z } from "vue"; import { Props as R, Emits as C, RadioGroupPropsKey as E } from "./index3.js"; import { sizeChange as s } from "../../_utils/index3.js"; const b = p({ name: "FRadioGroup" }), L = /* @__PURE__ */ p({ ...b, props: R, emits: C, setup(c, { emit: i }) { const r = c, l = (o) => { i("update:modelValue", o), r.change && r.change(o); }, d = f({ ..._(r), changeEvent: l }); g(E, d); const u = a(() => { const { vertical: o, border: e, size: t } = r; return [ "f-radio-group", { "f-radio-group__vertical": o, "f-radio-group__border": e, [`f-radio-group__${t}`]: t && e } ]; }), m = a(() => { const { columnGap: o, rowGap: e } = r; return { columnGap: s(o), rowGap: s(e) }; }); return (o, e) => (G(), h("div", { role: "radiogroup", class: v(n(u)), style: y(n(m)) }, [ z(o.$slots, "default") ], 6)); } }); export { L as default };