Skip to content

Commit da0f17d

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat-1.4.0
# Conflicts: # components/affix/index.jsx # components/alert/index.jsx # components/back-top/index.jsx # components/carousel/index.jsx # components/cascader/index.jsx # components/comment/index.jsx # components/config-provider/index.jsx # components/divider/index.jsx # components/drawer/index.jsx # components/form/Form.jsx # components/input-number/index.jsx # components/menu/index.jsx # components/modal/confirm.js # components/modal/index.js # components/popconfirm/index.jsx # components/popover/index.jsx # components/rate/index.jsx # components/steps/index.jsx # components/switch/index.jsx # components/time-picker/index.jsx # components/tree-select/index.jsx # site/components.js
2 parents 2852ea2 + c9f1c26 commit da0f17d

File tree

64 files changed

+147
-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

+147
-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
@@ -7,6 +7,7 @@ import getScroll from '../_util/getScroll';
77
import BaseMixin from '../_util/BaseMixin';
88
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
99
import { ConfigConsumerProps } from '../config-provider';
10+
import Base from '../base';
1011

1112
function getTargetRect(target) {
1213
return target !== window ? target.getBoundingClientRect() : { top: 0, left: 0, bottom: 0 };
@@ -265,6 +266,7 @@ const Affix = {
265266

266267
/* istanbul ignore next */
267268
Affix.install = function(Vue) {
269+
Vue.use(Base);
268270
Vue.component(Affix.name, Affix);
269271
};
270272

components/alert/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import getTransitionProps from '../_util/getTransitionProps';
66
import { getComponentFromProp, isValidElement } from '../_util/props-util';
77
import { cloneElement } from '../_util/vnode';
88
import { ConfigConsumerProps } from '../config-provider';
9+
import Base from '../base';
910
function noop() {}
1011
export const AlertProps = {
1112
/**
@@ -157,6 +158,7 @@ const Alert = {
157158

158159
/* istanbul ignore next */
159160
Alert.install = function(Vue) {
161+
Vue.use(Base);
160162
Vue.component(Alert.name, Alert);
161163
};
162164

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
@@ -10,6 +10,7 @@ import {
1010
filterEmpty,
1111
isValidElement,
1212
} from '../_util/props-util';
13+
import Base from '../base';
1314

1415
// const DataSourceItemObject = PropTypes.shape({
1516
// value: String,
@@ -149,6 +150,7 @@ const AutoComplete = {
149150

150151
/* istanbul ignore next */
151152
AutoComplete.install = function(Vue) {
153+
Vue.use(Base);
152154
Vue.component(AutoComplete.name, AutoComplete);
153155
Vue.component(AutoComplete.Option.name, AutoComplete.Option);
154156
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
@@ -5,6 +5,7 @@ import getScroll from '../_util/getScroll';
55
import BaseMixin from '../_util/BaseMixin';
66
import getTransitionProps from '../_util/getTransitionProps';
77
import { ConfigConsumerProps } from '../config-provider';
8+
import Base from '../base';
89

910
const easeInOutCubic = (t, b, c, d) => {
1011
const cc = c - b;
@@ -133,6 +134,7 @@ const BackTop = {
133134

134135
/* istanbul ignore next */
135136
BackTop.install = function(Vue) {
137+
Vue.use(Base);
136138
Vue.component(BackTop.name, BackTop);
137139
};
138140

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)