hongluan-ui
Version:
Hongluan Component Library for Vue 3
22 lines (21 loc) • 1.09 kB
TypeScript
import type { ExtractPropTypes, InjectionKey, Ref } from 'vue';
declare type EmptyValuesContext = ExtractPropTypes<typeof useEmptyValuesProps>;
export declare const emptyValuesContextKey: InjectionKey<Ref<EmptyValuesContext>>;
export declare const SCOPE = "use-empty-values";
export declare const DEFAULT_EMPTY_VALUES: string[];
export declare const DEFAULT_VALUE_ON_CLEAR: any;
export declare const useEmptyValuesProps: {
readonly emptyValues: ArrayConstructor;
readonly valueOnClear: {
readonly type: import("vue").PropType<import("hongluan-ui/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export declare const useEmptyValues: (props: EmptyValuesContext, defaultValue?: null | undefined) => {
emptyValues: import("vue").ComputedRef<unknown[]>;
valueOnClear: import("vue").ComputedRef<any>;
isEmptyValue: (value: any) => boolean;
};
export {};