You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
import type { App, Plugin } from 'vue';
|
|
import Form, { formProps } from './Form';
|
|
import FormItem, { formItemProps } from './FormItem';
|
|
import useForm from './useForm';
|
|
import FormItemRest, { useInjectFormItemContext } from './FormItemContext';
|
|
export type { Rule, RuleObject } from './interface';
|
|
|
|
export type { FormProps } from './Form';
|
|
export type { FormItemProps } from './FormItem';
|
|
|
|
Form.useInjectFormItemContext = useInjectFormItemContext;
|
|
Form.ItemRest = FormItemRest;
|
|
/* istanbul ignore next */
|
|
Form.install = function (app: App) {
|
|
app.component(Form.name, Form);
|
|
app.component(Form.Item.name, Form.Item);
|
|
app.component(FormItemRest.name, FormItemRest);
|
|
return app;
|
|
};
|
|
|
|
export { FormItem, formItemProps, formProps, FormItemRest, useForm, useInjectFormItemContext };
|
|
|
|
export default Form as typeof Form &
|
|
Plugin & {
|
|
readonly Item: typeof Form.Item;
|
|
readonly ItemRest: typeof FormItemRest;
|
|
readonly useForm: typeof useForm;
|
|
readonly useInjectFormItemContext: typeof useInjectFormItemContext;
|
|
};
|