UNPKG

@tplc/wot

Version:

66 lines (65 loc) 1.36 kB
import type { ExtractPropTypes, PropType } from 'vue' export type SwitchBeforeChangeOption = { value: number | string | boolean resolve: (pass: boolean) => void } export type SwitchBeforeChange = (option: SwitchBeforeChangeOption) => void export declare const switchProps: { /** * 绑定值 */ modelValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[] required: boolean default: boolean } /** * 是否禁用 */ disabled: { type: BooleanConstructor default: boolean } /** * 激活值 */ activeValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[] default: boolean } /** * 非激活值 */ inactiveValue: { type: (NumberConstructor | StringConstructor | BooleanConstructor)[] default: boolean } /** * 激活颜色 */ activeColor: StringConstructor /** * 非激活颜色 */ inactiveColor: StringConstructor /** * 大小 */ size: { type: (NumberConstructor | StringConstructor)[] default: number } /** * 在改变前执行的函数 */ beforeChange: PropType<SwitchBeforeChange> customStyle: { type: PropType<string> default: string } customClass: { type: PropType<string> default: string } } export type SwitchProps = ExtractPropTypes<typeof switchProps>