UNPKG

plus-pro-components

Version:

Page level components developed based on Element Plus.

73 lines (71 loc) 4.53 kB
import { PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'plus-pro-components'; import { TimeSelectProps } from 'element-plus/es/components/time-select/src/time-select'; import { EpPropMergeType } from 'element-plus/es/utils'; import { FormItemProps, ProgressFn, CascaderNode, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, ISelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus'; import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, CSSProperties, PropType } from 'vue'; import { PlusColumn, FieldValueType, RecordType, PropsItemType, Mutable, OmitTypes, CascaderProps } from 'plus-pro-components/es/types'; export interface PlusRenderProps { /** * 渲染的类型 */ renderType?: 'form'; /** * 回调参数的第一个值 */ callbackValue?: FieldValueType; customFieldProps?: PlusColumn['fieldProps'] | PlusColumn['formItemProps']; render?: PlusColumn['renderField'] | ((...arg: any[]) => void); params?: Partial<PlusColumn>; handleChange?: (...arg: any[]) => void; } declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusRenderProps>, { renderType: undefined; callbackValue: string; customFieldProps: () => {}; params: () => {}; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PlusRenderProps>, { renderType: undefined; callbackValue: string; customFieldProps: () => {}; params: () => {}; }>>>, { renderType: "form"; callbackValue: string | number | boolean | RecordType | Date | string[] | boolean[] | number[] | Date[] | [Date, Date] | [number, number] | [string, string] | string[][] | number[][] | null; customFieldProps: PropsItemType< Mutable<FormItemProps> & { [key: string]: any; style?: CSSProperties | undefined; }> | PropsItemType<Partial<{ [key: string]: any; style: CSSProperties; rows: number; autocomplete: string; type: "" | "number" | "default" | "search" | "checkbox" | "radio" | "textarea" | "text" | "circle" | "color" | "button" | "success" | "warning" | "info" | "primary" | "danger" | "reset" | "submit" | "time" | "image" | "line" | "date" | "year" | "years" | "month" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "range" | "dashboard" | "hidden" | "datetime-local" | "email" | "file" | "password" | "tel" | "url"; loading: EpPropMergeType<BooleanConstructor, unknown, unknown> | EpPropMergeType<StringConstructor, "lazy" | "eager", unknown> | undefined; step: string | number; format: string | ProgressFn | undefined; filterMethod: Function | ((node: CascaderNode, keyword: string) => boolean) | undefined; id: string | [string, string]; effect: string; height: string | number; autosize: InputAutoSize; } & Mutable<Omit< AutocompleteProps, OmitTypes> & Omit< CascaderProps, OmitTypes> & Omit< CheckboxGroupProps, OmitTypes> & Omit< ColorPickerProps, OmitTypes> & Omit< DatePickerProps, OmitTypes> & Omit< InputProps, OmitTypes> & Omit< InputNumberProps, OmitTypes> & Omit< RadioGroupProps, OmitTypes> & Omit< RateProps, OmitTypes> & Omit< ISelectProps, OmitTypes> & Omit< SliderProps, OmitTypes> & Omit< SwitchProps, OmitTypes> & Omit< TimePickerDefaultProps, OmitTypes> & Omit< TimeSelectProps, OmitTypes> & Omit< PlusRadioProps, OmitTypes> & Omit< PlusDatePickerProps, OmitTypes> & Omit< PlusInputTagProps, OmitTypes> & Omit< TextProps, OmitTypes> & Omit< ImageProps, OmitTypes> & Omit< LinkProps, OmitTypes> & Omit< TagProps, OmitTypes> & Omit< ProgressProps, OmitTypes>>>>; params: Partial<PlusColumn>; }, {}>; export default _default; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: PropType<T[K]>; required: true; }; }; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {};