UNPKG

@oiij/naive-ui

Version:

Som Composable Functions And Components for Vue 3

38 lines (37 loc) 1.32 kB
import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DividerProps, DynamicTagsProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui'; import { ClassStyle } from '../data-table-plus'; import { SearchInputProps } from '../search-input/index'; export { default as NPresetInput } from './PresetInput.vue'; export type PresetInputType = { 'button': ButtonProps & { label?: string; }; 'color-picker': ColorPickerProps; 'checkbox': CheckboxGroupProps & { options?: CheckboxProps[]; }; 'divider': DividerProps; 'date-picker': DatePickerProps; 'dynamic-tags': DynamicTagsProps; 'input': InputProps; 'input-number': InputNumberProps; 'search': SearchInputProps; 'radio': RadioGroupProps & { options?: RadioProps[]; }; 'rate': RateProps; 'select': SelectProps; 'slider': SliderProps; 'switch': SwitchProps; 'time-picker': TimePickerProps; }; export type PresetInputOptions = { [K in keyof PresetInputType]: { type?: K; props?: PresetInputType[K] & ClassStyle; }; }[keyof PresetInputType]; export type PresetInputProps<V> = { value?: V; options?: PresetInputOptions; };