UNPKG

snowy-designer

Version:

基于Epic-Designer-Pro版本的设计器,可视化开发页面表单

58 lines (57 loc) 1.86 kB
import { ComponentSchema, FormDataModel } from '../../../types/src/index'; import { Ref } from 'vue'; import { Form } from 'ant-design-vue'; interface FormInstance extends InstanceType<typeof Form> { clearValidate: () => void; getData?: () => FormDataModel; scrollToField: (name: string) => void; setData?: (FormDataModel: any) => void; validate: () => unknown; validateFields: () => unknown; } type __VLS_Props = { componentSchema: ComponentSchema; scrollToFirstError?: boolean; }; /** * 获取表单数据 */ declare function getData(): FormDataModel; /** * 校验表单数据 */ declare function validate(): Promise<unknown>; /** * 设置表单数据 * @param data */ declare function setData(data: FormDataModel): void; declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: {}): any; 'edit-node'?(_: {}): any; node?(_: { componentSchema: ComponentSchema; }): any; }; refs: {}; rootEl: HTMLDivElement; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, { form: Ref<FormInstance | null, FormInstance | null>; getData: typeof getData; setData: typeof setData; validate: typeof validate; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, { componentSchema: ComponentSchema; scrollToFirstError: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };