UNPKG

yanzhen-design-vue

Version:

32 lines (31 loc) 1.08 kB
import { defineComponent, openBlock, createBlock, unref, mergeProps, isRef } from "vue"; import { radioName, radioProps, radioEmits, radioOptions } from "./radio.mjs"; import { useRadio } from "./use-radio.mjs"; const _sfc_main = /* @__PURE__ */ defineComponent({ ...{ name: radioName }, __name: "radio", props: radioProps, emits: radioEmits, setup(__props, { expose: __expose, emit: __emit }) { const { ns } = radioOptions; const props = __props; const emit = __emit; const { _ref, checkedRef, propsRef, Radio } = useRadio(props, emit); __expose({ ref: _ref }); return (_ctx, _cache) => { return openBlock(), createBlock(unref(Radio), mergeProps({ ref_key: "_ref", ref: _ref, checked: unref(checkedRef), "onUpdate:checked": _cache[0] || (_cache[0] = ($event) => isRef(checkedRef) ? checkedRef.value = $event : null), class: [unref(ns).b()], value: props.value }, unref(propsRef)), null, 16, ["checked", "class", "value"]); }; } }); export { _sfc_main as default };