sard-uniapp
Version:
sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
31 lines (30 loc) • 948 B
TypeScript
import { type StyleValue } from 'vue';
import { type DefaultProps } from '../config';
export interface SwitchProps {
rootStyle?: StyleValue;
rootClass?: string;
modelValue?: any;
disabled?: boolean;
readonly?: boolean;
loading?: boolean;
size?: string;
checkedColor?: string;
uncheckedColor?: string;
checkedValue?: any;
uncheckedValue?: any;
beforeUpdate?: (value: any) => Promise<any>;
validateEvent?: boolean;
checkedText?: string;
uncheckedText?: string;
}
export declare const defaultSwitchProps: () => DefaultProps<SwitchProps>;
export interface SwitchSlots {
'checked-text'?(props: Record<string, never>): any;
'unchecked-text'?(props: Record<string, never>): any;
}
export interface SwitchEmits {
(e: 'click', event: any): void;
(e: 'update:model-value', value: any): void;
(e: 'change', value: any): void;
(e: 'update:loading', loading: boolean): void;
}