import type { ExtractPropTypes, PropType } from 'vue'; import type { ComponentSize, IconSlotType } from '../../../types'; export declare const Props: { /** * 绑定值 */ readonly modelValue: { readonly type: PropType; readonly default: false; }; /** * 是否禁用 */ readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; /** * 是否加载态 */ readonly loading: { readonly type: BooleanConstructor; readonly default: false; }; /** * 尺寸 */ readonly size: { readonly type: PropType; }; /** * 宽度 */ readonly width: { readonly type: PropType; readonly default: ""; }; /** * 无论图标或文本是否显示在点内,只会呈现文本的第一个字符 */ readonly inlinePrompt: { readonly type: BooleanConstructor; readonly default: false; }; /** * 关闭时Icon */ readonly inactiveActionIcon: { readonly type: PropType; }; /** * 开启时Icon */ readonly activeActionIcon: { readonly type: PropType; }; /** * 开启时展示Icon,会覆盖`active-text` */ readonly activeIcon: { readonly type: PropType; }; /** * 关闭时展示Icon,会覆盖`inactive-text` */ readonly inactiveIcon: { readonly type: PropType; }; /** * 开启时,展示文本 */ readonly activeText: { readonly type: StringConstructor; readonly default: ""; }; /** * 关闭时,展示文本 */ readonly inactiveText: { readonly type: StringConstructor; readonly default: ""; }; /** * 开启时的值 */ readonly activeValue: { readonly type: PropType; readonly default: true; }; /** * 关闭时的值 */ readonly inactiveValue: { readonly type: PropType; readonly default: false; }; /** * 原生input的name */ readonly name: { readonly type: StringConstructor; readonly default: ""; }; /** * 是否触发form的校验事件 */ readonly validateEvent: { readonly type: BooleanConstructor; readonly default: true; }; /** * switch 状态改变前的钩子, 返回 false 或者返回 Promise 且被 reject 则停止切换 */ readonly beforeChange: { readonly type: PropType<() => Promise | boolean>; }; /** * id for input */ readonly id: StringConstructor; /** * tabindex for input */ readonly tabindex: { readonly type: PropType; }; }; export declare const Emits: { "update:modelValue": (val: boolean | string | number) => boolean; change: (val: boolean | string | number) => boolean; input: (val: boolean | string | number) => boolean; }; export type SwitchProps = ExtractPropTypes;