@zhsz/cool-design-crud
Version:
28 lines (27 loc) • 844 B
TypeScript
import type { Ref } from 'vue';
import type { Form, IFieldResetOptions } from '@formily/core';
import type { FormPathPattern } from '@formily/shared';
declare type Config = ClForm.Config;
export declare function useAction({ config, form, Form }: {
config: Config;
form: obj;
Form: Form;
}): {
getForm: (prop: string) => any;
setForm: (prop: string, value: any) => void;
setConfig: (path: string, value: any) => void;
setHeader: (value: string) => void;
formReset: (pattern: FormPathPattern, options?: IFieldResetOptions) => void;
};
export declare function useApi({ Form }: {
Form: Form;
}): {
[key: string]: any;
};
export declare function usePlugins({ visible }: {
visible: Ref<boolean>;
}): {
create: (plugins?: ClForm.Plugin[]) => void;
submit: (data: any) => Promise<any>;
};
export {};