radio/radio-group.tsx

arco-design-vue · packages/web-vue/components/radio/radio-group.tsx · typescript · MIT
ui

A Vue component that manages a group of radio or button options, allowing developers to implement single-choice selection interfaces.

// Source: https://github.com/arco-design/arco-design-vue | License: MIT | Copyright 2021 Bytedance, Inc. and its affiliates
// Provided via justclaw.it.com; keep this notice with the code.
import type { PropType } from 'vue';
import {
  defineComponent,
  provide,
  reactive,
  toRefs,
  ref,
  computed,
  watch,
} from 'vue';
import { getPrefixCls } from '../_utils/global-config';
import { Size, Direction } from '../_utils/constant';
import { radioGroupKey, RadioType } from './context';
import {
  isFunction,
  isNull,
  isNumber,
  isString,
  isUndefined,
} from '../_utils/is';
import { useFormItem } from '../_hooks/use-form-item';
import { RadioOption } from './interface';
import Radio from './radio';
import { useSize } from '../_hooks/use-size';

export default defineComponent({
  na

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key