UNPKG

fine-true

Version:

A small and beautiful Vue3 version of the UI Library

41 lines (40 loc) 1.81 kB
import { InjectionKey, Ref, ComputedRef } from 'vue'; /*******common********/ export declare type FormSize = 'small' | 'default' | 'large'; /************form**********/ export declare type Model = Record<string, any>; export declare type Validation = (trigger?: 'change' | 'blur') => void; export declare type FormContextType = { collectionValidation: (validation: Validation) => void; rules?: any; model?: Model; labelWidth: Ref<string>; addField: (resetField: () => void) => void; }; export declare const FormContextKey: InjectionKey<FormContextType>; export declare const FormItemContextKey: InjectionKey<Validation>; /***********radio**********/ export declare type RadioGroupProvideType = { inGroup: boolean; rgModelValue?: Ref<string | number | boolean>; updateRgModelValue: (rgModelValue: string | number | boolean) => void; }; export declare const RADIOGROUPPROVIDEKEY: InjectionKey<RadioGroupProvideType>; export declare type ButtonTypeType = 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger'; /********checkbox*******/ export declare type CheckboxGroupProvideType = { inGroup: boolean; cgModelValue?: ComputedRef<(string | number | boolean)[]>; updateCgModelValue: (value: string | number | boolean) => void; }; export declare const CHECKBOXGROUPPROVIDEKEY: InjectionKey<CheckboxGroupProvideType>; /**select**/ export declare type SelectValueType = number | string | string[] | number[]; export declare type SelectSizeType = 'large' | 'default' | 'small'; declare type SelectProvideType = { modelValue: Ref<SelectValueType>; multiple: ComputedRef<boolean>; toggle: (value: string | number) => void; }; export declare const SELECTPROVIDEKEY: InjectionKey<SelectProvideType>; export {};