perf: remove not use module base
parent
4d7cac609c
commit
72da2b8997
|
@ -1,9 +0,0 @@
|
||||||
import antDirective from '../_util/antDirective';
|
|
||||||
const base = {};
|
|
||||||
const install = function(Vue) {
|
|
||||||
base.Vue = Vue;
|
|
||||||
Vue.use(antDirective);
|
|
||||||
};
|
|
||||||
base.install = install;
|
|
||||||
|
|
||||||
export default base;
|
|
|
@ -1,2 +0,0 @@
|
||||||
// empty file prevent babel-plugin-import error
|
|
||||||
import '../../style/index.less';
|
|
|
@ -1,14 +1,12 @@
|
||||||
import Button from './button';
|
import Button from './button';
|
||||||
import ButtonGroup from './button-group';
|
import ButtonGroup from './button-group';
|
||||||
import Base from '../base';
|
|
||||||
|
|
||||||
Button.Group = ButtonGroup;
|
Button.Group = ButtonGroup;
|
||||||
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
Button.install = function(Vue) {
|
Button.install = function(app) {
|
||||||
Vue.use(Base);
|
app.component(Button.name, Button);
|
||||||
Vue.component(Button.name, Button);
|
app.component(ButtonGroup.name, ButtonGroup);
|
||||||
Vue.component(ButtonGroup.name, ButtonGroup);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Button;
|
export default Button;
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import ColorPicker from './ColorPicker';
|
import ColorPicker from './ColorPicker';
|
||||||
import Base from '../base';
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
ColorPicker.install = function(Vue) {
|
ColorPicker.install = function(app) {
|
||||||
Vue.use(Base);
|
app.component(ColorPicker.name, ColorPicker);
|
||||||
Vue.component(ColorPicker.name, ColorPicker);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ColorPicker;
|
export default ColorPicker;
|
||||||
|
|
|
@ -10,7 +10,6 @@ import FormItem from './FormItem';
|
||||||
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
||||||
import { initDefaultProps, getListeners } from '../_util/props-util';
|
import { initDefaultProps, getListeners } from '../_util/props-util';
|
||||||
import { ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumerProps } from '../config-provider';
|
||||||
import Base from '../base';
|
|
||||||
|
|
||||||
export const FormCreateOption = {
|
export const FormCreateOption = {
|
||||||
onFieldsChange: PropTypes.func,
|
onFieldsChange: PropTypes.func,
|
||||||
|
@ -143,7 +142,7 @@ const Form = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createForm(context, options = {}) {
|
createForm(context, options = {}) {
|
||||||
const V = Base.Vue || Vue;
|
const V = Vue;
|
||||||
return new V(Form.create({ ...options, templateContext: context })());
|
return new V(Form.create({ ...options, templateContext: context })());
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Vue from 'vue';
|
||||||
import Form from './Form';
|
import Form from './Form';
|
||||||
import ref from 'vue-ref';
|
import ref from 'vue-ref';
|
||||||
import FormDecoratorDirective from '../_util/FormDecoratorDirective';
|
import FormDecoratorDirective from '../_util/FormDecoratorDirective';
|
||||||
import Base from '../base';
|
|
||||||
|
|
||||||
Vue.use(ref, { name: 'ant-ref' });
|
Vue.use(ref, { name: 'ant-ref' });
|
||||||
Vue.use(FormDecoratorDirective);
|
Vue.use(FormDecoratorDirective);
|
||||||
|
@ -13,7 +12,6 @@ export { FormItemProps } from './FormItem';
|
||||||
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
Form.install = function(Vue) {
|
Form.install = function(Vue) {
|
||||||
Vue.use(Base);
|
|
||||||
Vue.component(Form.name, Form);
|
Vue.component(Form.name, Form);
|
||||||
Vue.component(Form.Item.name, Form.Item);
|
Vue.component(Form.Item.name, Form.Item);
|
||||||
Vue.prototype.$form = Form;
|
Vue.prototype.$form = Form;
|
||||||
|
|
Loading…
Reference in New Issue