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 ButtonGroup from './button-group';
|
||||
import Base from '../base';
|
||||
|
||||
Button.Group = ButtonGroup;
|
||||
|
||||
/* istanbul ignore next */
|
||||
Button.install = function(Vue) {
|
||||
Vue.use(Base);
|
||||
Vue.component(Button.name, Button);
|
||||
Vue.component(ButtonGroup.name, ButtonGroup);
|
||||
Button.install = function(app) {
|
||||
app.component(Button.name, Button);
|
||||
app.component(ButtonGroup.name, ButtonGroup);
|
||||
};
|
||||
|
||||
export default Button;
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import ColorPicker from './ColorPicker';
|
||||
import Base from '../base';
|
||||
/* istanbul ignore next */
|
||||
ColorPicker.install = function(Vue) {
|
||||
Vue.use(Base);
|
||||
Vue.component(ColorPicker.name, ColorPicker);
|
||||
ColorPicker.install = function(app) {
|
||||
app.component(ColorPicker.name, ColorPicker);
|
||||
};
|
||||
|
||||
export default ColorPicker;
|
||||
|
|
|
@ -10,7 +10,6 @@ import FormItem from './FormItem';
|
|||
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
||||
import { initDefaultProps, getListeners } from '../_util/props-util';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
import Base from '../base';
|
||||
|
||||
export const FormCreateOption = {
|
||||
onFieldsChange: PropTypes.func,
|
||||
|
@ -143,7 +142,7 @@ const Form = {
|
|||
});
|
||||
},
|
||||
createForm(context, options = {}) {
|
||||
const V = Base.Vue || Vue;
|
||||
const V = Vue;
|
||||
return new V(Form.create({ ...options, templateContext: context })());
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -2,7 +2,6 @@ import Vue from 'vue';
|
|||
import Form from './Form';
|
||||
import ref from 'vue-ref';
|
||||
import FormDecoratorDirective from '../_util/FormDecoratorDirective';
|
||||
import Base from '../base';
|
||||
|
||||
Vue.use(ref, { name: 'ant-ref' });
|
||||
Vue.use(FormDecoratorDirective);
|
||||
|
@ -13,7 +12,6 @@ export { FormItemProps } from './FormItem';
|
|||
|
||||
/* istanbul ignore next */
|
||||
Form.install = function(Vue) {
|
||||
Vue.use(Base);
|
||||
Vue.component(Form.name, Form);
|
||||
Vue.component(Form.Item.name, Form.Item);
|
||||
Vue.prototype.$form = Form;
|
||||
|
|
Loading…
Reference in New Issue