UNPKG

antd-mini

Version:

antd-mini 是支付宝小程序 UI 组件库,遵循 Ant Design 规范。

49 lines (48 loc) 1 kB
import { IBaseProps } from '../_util/base'; /** * @description 开关。 */ export interface ISwitchProps extends IBaseProps { /** * @description 是否勾选 */ checked?: boolean; /** * @description 是否加载状态 */ loading?: boolean; /** * @description 选中时的颜色 */ color?: string; /** * @description 选中时的内容 */ checkedText?: string; /** * @description 非选中时的内容 */ uncheckedText?: string; /** * @default medium * @description 尺寸 */ size?: 'medium' | 'small' | 'x-small'; /** * 是否禁用 */ disabled?: boolean; /** * 是否只读 */ readonly?: boolean; /** * 初始值 */ defaultChecked?: boolean; /** * @description 修改回调方法 */ onChange?: (checked: boolean, e: Record<string, any>) => void; } export declare const SwitchDefaultProps: Partial<ISwitchProps>;