2019-01-12 11:33:27 +08:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Form from './Form';
|
|
|
|
import ref from 'vue-ref';
|
|
|
|
import FormDecoratorDirective from '../_util/FormDecoratorDirective';
|
2019-08-28 10:50:19 +08:00
|
|
|
import Base from '../base';
|
2018-05-15 10:08:14 +08:00
|
|
|
|
2019-01-12 11:33:27 +08:00
|
|
|
Vue.use(ref, { name: 'ant-ref' });
|
|
|
|
Vue.use(FormDecoratorDirective);
|
|
|
|
Vue.prototype.$form = Form;
|
2018-05-05 17:00:51 +08:00
|
|
|
|
2019-01-12 11:33:27 +08:00
|
|
|
export { FormProps, FormCreateOption, ValidationRule } from './Form';
|
|
|
|
export { FormItemProps } from './FormItem';
|
2018-05-05 17:00:51 +08:00
|
|
|
|
2018-09-19 13:21:57 +08:00
|
|
|
/* istanbul ignore next */
|
2019-01-12 11:33:27 +08:00
|
|
|
Form.install = function(Vue) {
|
2019-08-28 10:50:19 +08:00
|
|
|
Vue.use(Base);
|
2019-01-12 11:33:27 +08:00
|
|
|
Vue.component(Form.name, Form);
|
|
|
|
Vue.component(Form.Item.name, Form.Item);
|
|
|
|
Vue.prototype.$form = Form;
|
|
|
|
};
|
2018-09-19 13:21:57 +08:00
|
|
|
|
2019-01-12 11:33:27 +08:00
|
|
|
export default Form;
|