UNPKG

naive-ui-form

Version:

一个基于naive-ui封装的表单组件,一个配置,生成一个表单

95 lines (94 loc) 3.11 kB
import type { BasicProps, Recordable, Props, FormInstance, FormSchema } from './types'; declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BasicProps>, { schemas: () => never[]; grid: () => { cols: number; xGap: number; }; showActionBtns: boolean; showSubmitBtn: boolean; submitBtnText: string; showResetBtn: boolean; resetBtnText: string; showExpandBtn: boolean; expandBtnOffText: string; expandBtnOnText: string; defaultExpand: boolean; defaultShowExpandRows: number; }>, { reset(): void; submit(): Promise<Recordable<any>>; validate(nameList?: string[] | undefined): Promise<any>; clearValidate(): void; getValue(): Recordable<any>; getFieldValue(field: string): any; setValue(value: Recordable<any>): void; setProps(props: Props): void; setLoading(loading: boolean): void; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { register: (formInsta: FormInstance) => void; submit: (value: Recordable) => void; reset: () => void; }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BasicProps>, { schemas: () => never[]; grid: () => { cols: number; xGap: number; }; showActionBtns: boolean; showSubmitBtn: boolean; submitBtnText: string; showResetBtn: boolean; resetBtnText: string; showExpandBtn: boolean; expandBtnOffText: string; expandBtnOnText: string; defaultExpand: boolean; defaultShowExpandRows: number; }>>> & { onReset?: (() => any) | undefined; onSubmit?: ((value: Recordable) => any) | undefined; onRegister?: ((formInsta: FormInstance) => any) | undefined; }, { schemas: FormSchema[]; grid: import("naive-ui").GridProps; showActionBtns: boolean; showSubmitBtn: boolean; submitBtnText: string; showResetBtn: boolean; resetBtnText: string; showExpandBtn: boolean; expandBtnOffText: string; expandBtnOnText: string; defaultExpand: boolean; defaultShowExpandRows: number; }, {}>, Partial<Record<string, (_: { formValue: Recordable; field: string; }) => any>> & Partial<Record<string, (_: { formValue: any; field: string; }) => any>>>; 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: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').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]; } & {}; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };