UNPKG

@heartlee/element-components

Version:

a component library for Vue 3 base on element-plus. Forked from element-pro-components. 根据业务需求自用,如需使用,请移步官方仓库使用

29 lines (28 loc) 1.41 kB
import { ComputedRef, Ref } from 'vue'; import type { FormColumn, IComponentSize, IFormExpose, UnknownObject, IFormMenuColumns, MaybeRef } from '../types/index'; declare type FormItemBind = Omit<FormColumn, 'slot' | 'component' | 'max' | 'props' | 'prop' | 'span' | 'offset' | 'pull' | 'push' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'children'>; export declare function useFormItemBind(currentBind: MaybeRef<FormColumn>): ComputedRef<FormItemBind>; export declare function useFormMenu(props: Readonly<{ menu?: IFormMenuColumns; }>): ComputedRef<IFormMenuColumns>; export declare function useFormMethods(emit: (event: 'update:modelValue' | 'submit' | 'reset', ...args: unknown[]) => void): { form: Ref<IFormExpose>; loading: Ref<boolean>; upFormData: (value: unknown) => void; submitForm: () => void; resetForm: (reset?: boolean) => void; } & IFormExpose; export declare function useFormSize(props?: Readonly<{ size?: IComponentSize; }>): ComputedRef<IComponentSize>; export declare function useFormChild(props: Readonly<{ item: FormColumn; modelValue: UnknownObject; }>, emit: (event: 'update:modelValue', ...args: unknown[]) => void): { hasChild: ComputedRef<boolean>; showAddBtn: ComputedRef<boolean>; add: () => void; del: (index: number) => void; upChildData: (value: UnknownObject, index: number) => void; }; export {};