@aplus-frontend/antdv
Version:
Vue basic component library maintained based on ant-design-vue
11 lines (10 loc) • 568 B
TypeScript
import type { ComputedRef, Ref } from 'vue';
import type { GenerateConfig } from '../generate';
import type { CustomFormat, Locale } from '../interface';
export type ValueTextConfig<DateType> = {
formatList: ComputedRef<(string | CustomFormat<DateType>)[]>;
generateConfig: Ref<GenerateConfig<DateType>>;
locale: Ref<Locale>;
range?: 'start' | 'end';
};
export default function useValueTexts<DateType>(value: Ref<DateType | null>, { formatList, generateConfig, locale, range }: ValueTextConfig<DateType>): [ComputedRef<string[]>, ComputedRef<string>];