UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

68 lines (67 loc) 1.59 kB
import { RoundT } from '../_utils/types'; import { ExtractPropTypes, PropType } from 'vue'; export declare const SwitchSizeTypes: readonly ["medium", "small"]; export type SwitchSizeT = (typeof SwitchSizeTypes)[number]; export declare const switchProps: { /** * 双向绑定值 */ modelValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[]; }; /** * 非受控状态时,默认是否选中 */ defaultChecked: { type: BooleanConstructor; default: boolean; }; /** * 选中状态对应值 */ checkedValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[]; default: boolean; }; /** * 未选中状态对应值 */ uncheckedValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[]; default: boolean; }; /** * 开关尺寸 SwitchSizeT */ size: { type: PropType<SwitchSizeT>; default: string; }; /** * 圆角值 RoundT */ round: { type: PropType<RoundT>; }; /** * 是否禁用 */ disabled: { type: BooleanConstructor; default: boolean; }; /** * 是否加载中 */ loading: { type: BooleanConstructor; default: boolean; }; /** * 状态改变前的钩子函数 */ beforeChange: { type: PropType<(val: boolean) => Promise<boolean> | boolean>; }; }; export type SwitchPropsT = ExtractPropTypes<typeof switchProps>;