Skip to content

Commit c9f1c26

Browse files
committed
chore: add base.vue inconsistent vue version
1 parent d459b20 commit c9f1c26

File tree

64 files changed

+145
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+145
-15
lines changed

components/_util/ContainerRender.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Vue from 'vue';
22
import PropTypes from './vue-types';
3+
import Base from '../base';
34

45
export default {
56
props: {
@@ -51,9 +52,9 @@ export default {
5152
this.componentEl = el;
5253
this.container.appendChild(el);
5354
}
54-
5555
if (!this._component) {
56-
this._component = new Vue({
56+
const V = Base.Vue || Vue;
57+
this._component = new V({
5758
el: el,
5859
parent: self.parent,
5960
data: {

components/_util/antDirective.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import ref from 'vue-ref';
12
import { antInput } from './antInputDirective';
23
import { antDecorator } from './FormDecoratorDirective';
34

45
export default {
56
install: Vue => {
7+
Vue.use(ref, { name: 'ant-ref' });
68
antInput(Vue);
79
antDecorator(Vue);
810
},

components/affix/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import omit from 'omit.js';
66
import getScroll from '../_util/getScroll';
77
import BaseMixin from '../_util/BaseMixin';
88
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
9+
import Base from '../base';
910

1011
function getTargetRect(target) {
1112
return target !== window ? target.getBoundingClientRect() : { top: 0, left: 0, bottom: 0 };
@@ -259,6 +260,7 @@ const Affix = {
259260

260261
/* istanbul ignore next */
261262
Affix.install = function(Vue) {
263+
Vue.use(Base);
262264
Vue.component(Affix.name, Affix);
263265
};
264266

components/alert/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import PropTypes from '../_util/vue-types';
55
import getTransitionProps from '../_util/getTransitionProps';
66
import { getComponentFromProp, isValidElement } from '../_util/props-util';
77
import { cloneElement } from '../_util/vnode';
8+
import Base from '../base';
89
function noop() {}
910
export const AlertProps = {
1011
/**
@@ -150,6 +151,7 @@ const Alert = {
150151

151152
/* istanbul ignore next */
152153
Alert.install = function(Vue) {
154+
Vue.use(Base);
153155
Vue.component(Alert.name, Alert);
154156
};
155157

components/anchor/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import Anchor from './Anchor';
22
import AnchorLink from './AnchorLink';
3-
4-
export { AnchorProps } from './Anchor';
5-
export { AnchorLinkProps } from './AnchorLink';
3+
import Base from '../base';
64

75
Anchor.Link = AnchorLink;
86

97
/* istanbul ignore next */
108
Anchor.install = function(Vue) {
9+
Vue.use(Base);
1110
Vue.component(Anchor.name, Anchor);
1211
Vue.component(Anchor.Link.name, Anchor.Link);
1312
};
14-
13+
export { AnchorProps } from './Anchor';
14+
export { AnchorLinkProps } from './AnchorLink';
1515
export default Anchor;

components/auto-complete/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
filterEmpty,
1010
isValidElement,
1111
} from '../_util/props-util';
12+
import Base from '../base';
1213

1314
// const DataSourceItemObject = PropTypes.shape({
1415
// value: String,
@@ -135,6 +136,7 @@ const AutoComplete = {
135136

136137
/* istanbul ignore next */
137138
AutoComplete.install = function(Vue) {
139+
Vue.use(Base);
138140
Vue.component(AutoComplete.name, AutoComplete);
139141
Vue.component(AutoComplete.Option.name, AutoComplete.Option);
140142
Vue.component(AutoComplete.OptGroup.name, AutoComplete.OptGroup);

components/avatar/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import Avatar from './Avatar';
2+
import Base from '../base';
23

34
/* istanbul ignore next */
45
Avatar.install = function(Vue) {
6+
Vue.use(Base);
57
Vue.component(Avatar.name, Avatar);
68
};
79

components/back-top/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import addEventListener from '../_util/Dom/addEventListener';
44
import getScroll from '../_util/getScroll';
55
import BaseMixin from '../_util/BaseMixin';
66
import getTransitionProps from '../_util/getTransitionProps';
7+
import Base from '../base';
78

89
const easeInOutCubic = (t, b, c, d) => {
910
const cc = c - b;
@@ -126,6 +127,7 @@ const BackTop = {
126127

127128
/* istanbul ignore next */
128129
BackTop.install = function(Vue) {
130+
Vue.use(Base);
129131
Vue.component(BackTop.name, BackTop);
130132
};
131133

components/badge/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import Badge from './Badge';
2+
import Base from '../base';
23

34
/* istanbul ignore next */
45
Badge.install = function(Vue) {
6+
Vue.use(Base);
57
Vue.component(Badge.name, Badge);
68
};
79

components/base/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import antDirective from '../_util/antDirective';
2+
const base = {};
3+
const install = function(Vue) {
4+
base.Vue = Vue;
5+
Vue.use(antDirective);
6+
};
7+
base.install = install;
8+
9+
export default base;

0 commit comments

Comments
 (0)