UNPKG

@ray-js/smart-ui

Version:

轻量、可靠的智能小程序 UI 组件库

41 lines (40 loc) 946 B
/// <reference types="react" /> /// <reference types="miniprogram-api-typings" /> import { SmartComponent, SmartEventHandler } from '../base'; export interface SmartRadioGroupProps { /** * 在表单内提交时的标识符 */ name?: string; /** * 当前选中项的标识符 */ value?: any; /** * 是否禁用所有单选框 * * @default false */ disabled?: boolean; /** * 排列方向 */ direction?: 'horizontal' | 'vertical'; /** * 子元素节点 */ children?: React.ReactNode; } /** * @deprecated */ export interface SmartRadioGroupChangeEvent extends WechatMiniprogram.BaseEvent { detail: string; } export interface SmartRadioGroupEvents { /** * 当绑定值变化时触发的事件 */ onChange?: SmartEventHandler<string>; } export type SmartRadioGroup = SmartComponent<SmartRadioGroupProps, SmartRadioGroupEvents>;