chore: add base.vue inconsistent vue version

pull/1143/head
tanjinzhou 2019-08-28 10:50:19 +08:00
parent d459b20b20
commit c9f1c26693
64 changed files with 145 additions and 15 deletions

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import PropTypes from './vue-types';
import Base from '../base';
export default {
props: {
@ -51,9 +52,9 @@ export default {
this.componentEl = el;
this.container.appendChild(el);
}
if (!this._component) {
this._component = new Vue({
const V = Base.Vue || Vue;
this._component = new V({
el: el,
parent: self.parent,
data: {

View File

@ -1,8 +1,10 @@
import ref from 'vue-ref';
import { antInput } from './antInputDirective';
import { antDecorator } from './FormDecoratorDirective';
export default {
install: Vue => {
Vue.use(ref, { name: 'ant-ref' });
antInput(Vue);
antDecorator(Vue);
},

View File

@ -6,6 +6,7 @@ import omit from 'omit.js';
import getScroll from '../_util/getScroll';
import BaseMixin from '../_util/BaseMixin';
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
import Base from '../base';
function getTargetRect(target) {
return target !== window ? target.getBoundingClientRect() : { top: 0, left: 0, bottom: 0 };
@ -259,6 +260,7 @@ const Affix = {
/* istanbul ignore next */
Affix.install = function(Vue) {
Vue.use(Base);
Vue.component(Affix.name, Affix);
};

View File

@ -5,6 +5,7 @@ import PropTypes from '../_util/vue-types';
import getTransitionProps from '../_util/getTransitionProps';
import { getComponentFromProp, isValidElement } from '../_util/props-util';
import { cloneElement } from '../_util/vnode';
import Base from '../base';
function noop() {}
export const AlertProps = {
/**
@ -150,6 +151,7 @@ const Alert = {
/* istanbul ignore next */
Alert.install = function(Vue) {
Vue.use(Base);
Vue.component(Alert.name, Alert);
};

View File

@ -1,15 +1,15 @@
import Anchor from './Anchor';
import AnchorLink from './AnchorLink';
export { AnchorProps } from './Anchor';
export { AnchorLinkProps } from './AnchorLink';
import Base from '../base';
Anchor.Link = AnchorLink;
/* istanbul ignore next */
Anchor.install = function(Vue) {
Vue.use(Base);
Vue.component(Anchor.name, Anchor);
Vue.component(Anchor.Link.name, Anchor.Link);
};
export { AnchorProps } from './Anchor';
export { AnchorLinkProps } from './AnchorLink';
export default Anchor;

View File

@ -9,6 +9,7 @@ import {
filterEmpty,
isValidElement,
} from '../_util/props-util';
import Base from '../base';
// const DataSourceItemObject = PropTypes.shape({
// value: String,
@ -135,6 +136,7 @@ const AutoComplete = {
/* istanbul ignore next */
AutoComplete.install = function(Vue) {
Vue.use(Base);
Vue.component(AutoComplete.name, AutoComplete);
Vue.component(AutoComplete.Option.name, AutoComplete.Option);
Vue.component(AutoComplete.OptGroup.name, AutoComplete.OptGroup);

View File

@ -1,7 +1,9 @@
import Avatar from './Avatar';
import Base from '../base';
/* istanbul ignore next */
Avatar.install = function(Vue) {
Vue.use(Base);
Vue.component(Avatar.name, Avatar);
};

View File

@ -4,6 +4,7 @@ import addEventListener from '../_util/Dom/addEventListener';
import getScroll from '../_util/getScroll';
import BaseMixin from '../_util/BaseMixin';
import getTransitionProps from '../_util/getTransitionProps';
import Base from '../base';
const easeInOutCubic = (t, b, c, d) => {
const cc = c - b;
@ -126,6 +127,7 @@ const BackTop = {
/* istanbul ignore next */
BackTop.install = function(Vue) {
Vue.use(Base);
Vue.component(BackTop.name, BackTop);
};

View File

@ -1,7 +1,9 @@
import Badge from './Badge';
import Base from '../base';
/* istanbul ignore next */
Badge.install = function(Vue) {
Vue.use(Base);
Vue.component(Badge.name, Badge);
};

9
components/base/index.js Normal file
View File

@ -0,0 +1,9 @@
import antDirective from '../_util/antDirective';
const base = {};
const install = function(Vue) {
base.Vue = Vue;
Vue.use(antDirective);
};
base.install = install;
export default base;

View File

@ -0,0 +1,2 @@
// empty file prevent babel-plugin-import error
import '../../style/index.less';

View File

@ -1,10 +1,12 @@
import Breadcrumb from './Breadcrumb';
import BreadcrumbItem from './BreadcrumbItem';
import Base from '../base';
Breadcrumb.Item = BreadcrumbItem;
/* istanbul ignore next */
Breadcrumb.install = function(Vue) {
Vue.use(Base);
Vue.component(Breadcrumb.name, Breadcrumb);
Vue.component(BreadcrumbItem.name, BreadcrumbItem);
};

View File

@ -1,10 +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);
};

View File

@ -8,8 +8,7 @@ import { PREFIX_CLS } from './Constants';
import Header from './Header';
import interopDefault from '../_util/interopDefault';
import enUS from './locale/en_US';
export { HeaderProps } from './Header';
import Base from '../base';
function noop() {
return null;
@ -242,7 +241,8 @@ const Calendar = {
/* istanbul ignore next */
Calendar.install = function(Vue) {
Vue.use(Base);
Vue.component(Calendar.name, Calendar);
};
export { HeaderProps } from './Header';
export default Calendar;

View File

@ -1,11 +1,13 @@
import Card from './Card';
import Meta from './Meta';
import Grid from './Grid';
import Base from '../base';
Card.Meta = Meta;
Card.Grid = Grid;
/* istanbul ignore next */
Card.install = function(Vue) {
Vue.use(Base);
Vue.component(Card.name, Card);
Vue.component(Meta.name, Meta);
Vue.component(Grid.name, Grid);

View File

@ -1,6 +1,7 @@
import PropTypes from '../_util/vue-types';
import debounce from 'lodash/debounce';
import { initDefaultProps, getComponentFromProp, filterEmpty } from '../_util/props-util';
import Base from '../base';
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
@ -163,6 +164,7 @@ const Carousel = {
/* istanbul ignore next */
Carousel.install = function(Vue) {
Vue.use(Base);
Vue.component(Carousel.name, Carousel);
};

View File

@ -19,6 +19,7 @@ import {
import BaseMixin from '../_util/BaseMixin';
import { cloneElement } from '../_util/vnode';
import warning from '../_util/warning';
import Base from '../base';
const CascaderOptionType = PropTypes.shape({
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
@ -528,6 +529,7 @@ const Cascader = {
/* istanbul ignore next */
Cascader.install = function(Vue) {
Vue.use(Base);
Vue.component(Cascader.name, Cascader);
};

View File

@ -1,10 +1,12 @@
import Checkbox from './Checkbox';
import CheckboxGroup from './Group';
import Base from '../base';
Checkbox.Group = CheckboxGroup;
/* istanbul ignore next */
Checkbox.install = function(Vue) {
Vue.use(Base);
Vue.component(Checkbox.name, Checkbox);
Vue.component(CheckboxGroup.name, CheckboxGroup);
};

View File

@ -1,6 +1,8 @@
import { Col } from '../grid';
import Base from '../base';
/* istanbul ignore next */
Col.install = function(Vue) {
Vue.use(Base);
Vue.component(Col.name, Col);
};

View File

@ -1,10 +1,12 @@
import Collapse from './Collapse';
import CollapsePanel from './CollapsePanel';
import Base from '../base';
Collapse.Panel = CollapsePanel;
/* istanbul ignore next */
Collapse.install = function(Vue) {
Vue.use(Base);
Vue.component(Collapse.name, Collapse);
Vue.component(CollapsePanel.name, CollapsePanel);
};

View File

@ -1,6 +1,6 @@
import PropsTypes from '../_util/vue-types';
import { initDefaultProps, getComponentFromProp } from '../_util/props-util';
import Base from '../base';
export const CommentProps = {
actions: PropsTypes.array,
/** The element to display as the comment author. */
@ -88,6 +88,7 @@ const Comment = {
/* istanbul ignore next */
Comment.install = function(Vue) {
Vue.use(Base);
Vue.component(Comment.name, Comment);
};
export default Comment;

View File

@ -1,4 +1,5 @@
import PropTypes from '../_util/vue-types';
import Base from '../base';
const ConfigProvider = {
name: 'AConfigProvider',
@ -17,6 +18,7 @@ const ConfigProvider = {
/* istanbul ignore next */
ConfigProvider.install = function(Vue) {
Vue.use(Base);
Vue.component(ConfigProvider.name, ConfigProvider);
};

View File

@ -5,6 +5,7 @@ import wrapPicker from './wrapPicker';
import RangePicker from './RangePicker';
import WeekPicker from './WeekPicker';
import { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './interface';
import Base from '../base';
const DatePicker = wrapPicker(
{ ...createPicker(VcCalendar, DatePickerProps()), name: 'ADatePicker' },
@ -25,6 +26,7 @@ Object.assign(DatePicker, {
/* istanbul ignore next */
DatePicker.install = function(Vue) {
Vue.use(Base);
Vue.component(DatePicker.name, DatePicker);
Vue.component(DatePicker.RangePicker.name, DatePicker.RangePicker);
Vue.component(DatePicker.MonthPicker.name, DatePicker.MonthPicker);

View File

@ -1,4 +1,5 @@
import PropTypes from '../_util/vue-types';
import Base from '../base';
const Divider = {
name: 'ADivider',
props: {
@ -32,6 +33,7 @@ const Divider = {
/* istanbul ignore next */
Divider.install = function(Vue) {
Vue.use(Base);
Vue.component(Divider.name, Divider);
};

View File

@ -4,6 +4,7 @@ import PropTypes from '../_util/vue-types';
import BaseMixin from '../_util/BaseMixin';
import Icon from '../icon';
import { getComponentFromProp, getOptionProps } from '../_util/props-util';
import Base from '../base';
const Drawer = {
name: 'ADrawer',
@ -208,6 +209,7 @@ const Drawer = {
/* istanbul ignore next */
Drawer.install = function(Vue) {
Vue.use(Base);
Vue.component(Drawer.name, Drawer);
};

View File

@ -3,11 +3,13 @@ import DropdownButton from './dropdown-button';
export { DropdownProps } from './dropdown';
export { DropdownButtonProps } from './dropdown-button';
import Base from '../base';
Dropdown.Button = DropdownButton;
/* istanbul ignore next */
Dropdown.install = function(Vue) {
Vue.use(Base);
Vue.component(Dropdown.name, Dropdown);
Vue.component(DropdownButton.name, DropdownButton);
};

View File

@ -8,6 +8,7 @@ import createFormField from '../vc-form/src/createFormField';
import FormItem from './FormItem';
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
import { initDefaultProps } from '../_util/props-util';
import Base from '../base';
export const FormCreateOption = {
onFieldsChange: PropTypes.func,
@ -137,7 +138,8 @@ const Form = {
});
},
createForm(context, options = {}) {
return new Vue(Form.create({ ...options, templateContext: context })());
const V = Base.Vue || Vue;
return new V(Form.create({ ...options, templateContext: context })());
},
created() {
this.formItemContexts = new Map();

View File

@ -2,6 +2,7 @@ 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);
@ -12,6 +13,7 @@ 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;

View File

@ -13,6 +13,7 @@ import {
import warning from '../_util/warning';
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
import { filterEmpty, getClass } from '../_util/props-util';
import Base from '../base';
// Initial setting
VueIcon.add(...Object.keys(allIcons).map(key => allIcons[key]));
@ -137,6 +138,7 @@ Icon.setTwoToneColor = setTwoToneColor;
/* istanbul ignore next */
Icon.install = function(Vue) {
Vue.use(Base);
Vue.component(Icon.name, Icon);
};

View File

@ -29,6 +29,8 @@ import { default as BackTop } from './back-top';
import { default as Badge } from './badge';
import { default as Base } from './base';
import { default as Breadcrumb } from './breadcrumb';
import { default as Button } from './button';
@ -132,6 +134,7 @@ import { default as Comment } from './comment';
import { default as ConfigProvider } from './config-provider';
const components = [
Base,
Affix,
Anchor,
AutoComplete,
@ -208,6 +211,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export {
Base,
version,
install,
message,

View File

@ -3,6 +3,7 @@ import { initDefaultProps, getOptionProps } from '../_util/props-util';
import classNames from 'classnames';
import Icon from '../icon';
import VcInputNumber from '../vc-input-number/src';
import Base from '../base';
export const InputNumberProps = {
prefixCls: PropTypes.string,
@ -68,6 +69,7 @@ const InputNumber = {
/* istanbul ignore next */
InputNumber.install = function(Vue) {
Vue.use(Base);
Vue.component(InputNumber.name, InputNumber);
};

View File

@ -4,6 +4,7 @@ import Group from './Group';
import Search from './Search';
import TextArea from './TextArea';
import antInputDirective from '../_util/antInputDirective';
import Base from '../base';
Vue.use(antInputDirective);
@ -13,6 +14,7 @@ Input.TextArea = TextArea;
/* istanbul ignore next */
Input.install = function(Vue) {
Vue.use(Base);
Vue.component(Input.name, Input);
Vue.component(Input.Group.name, Input.Group);
Vue.component(Input.Search.name, Input.Search);

View File

@ -1,10 +1,12 @@
import Layout from './layout';
import Sider from './Sider';
import Base from '../base';
Layout.Sider = Sider;
/* istanbul ignore next */
Layout.install = function(Vue) {
Vue.use(Base);
Vue.component(Layout.name, Layout);
Vue.component(Layout.Header.name, Layout.Header);
Vue.component(Layout.Footer.name, Layout.Footer);

View File

@ -11,6 +11,7 @@ import { Row } from '../grid';
import Item from './Item';
import { initDefaultProps, getComponentFromProp, filterEmpty } from '../_util/props-util';
import { cloneElement } from '../_util/vnode';
import Base from '../base';
export { ListItemProps, ListItemMetaProps } from './Item';
@ -242,6 +243,7 @@ const List = {
/* istanbul ignore next */
List.install = function(Vue) {
Vue.use(Base);
Vue.component(List.name, List);
Vue.component(List.Item.name, List.Item);
Vue.component(List.Item.Meta.name, List.Item.Meta);

View File

@ -2,7 +2,7 @@ import PropTypes from '../_util/vue-types';
import * as moment from 'moment';
import interopDefault from '../_util/interopDefault';
import { changeConfirmLocale } from '../modal/locale';
import Base from '../base';
// export interface Locale {
// locale: string;
// Pagination?: Object;
@ -71,6 +71,7 @@ const LocaleProvider = {
/* istanbul ignore next */
LocaleProvider.install = function(Vue) {
Vue.use(Base);
Vue.component(LocaleProvider.name, LocaleProvider);
};

View File

@ -7,6 +7,7 @@ import Item from './MenuItem';
import { hasProp } from '../_util/props-util';
import BaseMixin from '../_util/BaseMixin';
import commonPropsType from '../vc-menu/commonPropsType';
import Base from '../base';
export const MenuMode = PropTypes.oneOf([
'vertical',
@ -266,6 +267,7 @@ const Menu = {
/* istanbul ignore next */
Menu.install = function(Vue) {
Vue.use(Base);
Vue.component(Menu.name, Menu);
Vue.component(Menu.Item.name, Menu.Item);
Vue.component(Menu.SubMenu.name, Menu.SubMenu);

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import ConfirmDialog from './ConfirmDialog';
import Base from '../base';
export default function confirm(config) {
const div = document.createElement('div');
@ -34,7 +35,8 @@ export default function confirm(config) {
function render(props) {
confirmDialogProps.props = props;
return new Vue({
const V = Base.Vue || Vue;
return new V({
el: el,
data() {
return { confirmDialogProps };

View File

@ -1,5 +1,6 @@
import Modal from './Modal';
import modalConfirm from './confirm';
import Base from '../base';
// export { ActionButtonProps } from './ActionButton'
// export { ModalProps, ModalFuncProps } from './Modal'
@ -62,6 +63,7 @@ Modal.confirm = confirm;
/* istanbul ignore next */
Modal.install = function(Vue) {
Vue.use(Base);
Vue.component(Modal.name, Modal);
};

View File

@ -1,9 +1,11 @@
import Pagination from './Pagination';
import Base from '../base';
export { PaginationProps, PaginationConfig } from './Pagination';
/* istanbul ignore next */
Pagination.install = function(Vue) {
Vue.use(Base);
Vue.component(Pagination.name, Pagination);
};

View File

@ -9,6 +9,7 @@ import Icon from '../icon';
import Button from '../button';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import defaultLocale from '../locale-provider/default';
import Base from '../base';
const tooltipProps = abstractTooltipProps();
const btnProps = buttonTypes();
@ -149,6 +150,7 @@ const Popconfirm = {
/* istanbul ignore next */
Popconfirm.install = function(Vue) {
Vue.use(Base);
Vue.component(Popconfirm.name, Popconfirm);
};

View File

@ -2,6 +2,7 @@ import Tooltip from '../tooltip';
import abstractTooltipProps from '../tooltip/abstractTooltipProps';
import PropTypes from '../_util/vue-types';
import { getOptionProps, getComponentFromProp } from '../_util/props-util';
import Base from '../base';
const props = abstractTooltipProps();
const Popover = {
@ -53,6 +54,7 @@ const Popover = {
/* istanbul ignore next */
Popover.install = function(Vue) {
Vue.use(Base);
Vue.component(Popover.name, Popover);
};

View File

@ -1,9 +1,11 @@
import Progress from './progress';
import Base from '../base';
export { ProgressProps } from './progress';
/* istanbul ignore next */
Progress.install = function(Vue) {
Vue.use(Base);
Vue.component(Progress.name, Progress);
};

View File

@ -1,12 +1,14 @@
import Radio from './Radio';
import Group from './Group';
import Button from './RadioButton';
import Base from '../base';
Radio.Group = Group;
Radio.Button = Button;
/* istanbul ignore next */
Radio.install = function(Vue) {
Vue.use(Base);
Vue.component(Radio.name, Radio);
Vue.component(Radio.Group.name, Radio.Group);
Vue.component(Radio.Button.name, Radio.Button);

View File

@ -2,6 +2,7 @@ import PropTypes from '../_util/vue-types';
import { initDefaultProps, getOptionProps, getComponentFromProp } from '../_util/props-util';
import VcRate from '../vc-rate';
import Icon from '../icon';
import Base from '../base';
export const RateProps = {
prefixCls: PropTypes.string,
@ -50,6 +51,7 @@ const Rate = {
/* istanbul ignore next */
Rate.install = function(Vue) {
Vue.use(Base);
Vue.component(Rate.name, Rate);
};
export default Rate;

View File

@ -1,7 +1,9 @@
import { Row } from '../grid';
import Base from '../base';
/* istanbul ignore next */
Row.install = function(Vue) {
Vue.use(Base);
Vue.component(Row.name, Row);
};

View File

@ -12,6 +12,7 @@ import {
} from '../_util/props-util';
import Icon from '../icon';
import { cloneElement } from '../_util/vnode';
import Base from '../base';
const AbstractSelectProps = () => ({
prefixCls: PropTypes.string,
@ -261,6 +262,7 @@ const Select = {
/* istanbul ignore next */
Select.install = function(Vue) {
Vue.use(Base);
Vue.component(Select.name, Select);
Vue.component(Select.Option.name, Select.Option);
Vue.component(Select.OptGroup.name, Select.OptGroup);

View File

@ -4,6 +4,7 @@ import { initDefaultProps, hasProp } from '../_util/props-util';
import Avatar, { SkeletonAvatarProps } from './Avatar';
import Title, { SkeletonTitleProps } from './Title';
import Paragraph, { SkeletonParagraphProps } from './Paragraph';
import Base from '../base';
export const SkeletonProps = {
active: PropTypes.bool,
@ -145,6 +146,7 @@ const Skeleton = {
};
/* istanbul ignore next */
Skeleton.install = function(Vue) {
Vue.use(Base);
Vue.component(Skeleton.name, Skeleton);
};
export default Skeleton;

View File

@ -5,6 +5,7 @@ import VcSlider from '../vc-slider/src/Slider';
import VcRange from '../vc-slider/src/Range';
import VcHandle from '../vc-slider/src/Handle';
import Tooltip from '../tooltip';
import Base from '../base';
// export interface SliderMarks {
// [key]: React.ReactNode | {
@ -131,6 +132,7 @@ const Slider = {
/* istanbul ignore next */
Slider.install = function(Vue) {
Vue.use(Base);
Vue.component(Slider.name, Slider);
};

View File

@ -1,4 +1,5 @@
import Spin, { setDefaultIndicator } from './Spin';
import Base from '../base';
export { SpinProps } from './Spin';
@ -6,6 +7,7 @@ Spin.setDefaultIndicator = setDefaultIndicator;
/* istanbul ignore next */
Spin.install = function(Vue) {
Vue.use(Base);
Vue.component(Spin.name, Spin);
};

View File

@ -2,6 +2,7 @@ import PropTypes from '../_util/vue-types';
import { initDefaultProps, getOptionProps } from '../_util/props-util';
import VcSteps from '../vc-steps';
import Icon from '../icon';
import Base from '../base';
const getStepsProps = (defaultProps = {}) => {
const props = {
@ -47,6 +48,7 @@ const Steps = {
/* istanbul ignore next */
Steps.install = function(Vue) {
Vue.use(Base);
Vue.component(Steps.name, Steps);
Vue.component(Steps.Step.name, Steps.Step);
};

View File

@ -3,6 +3,7 @@ import { getOptionProps, getComponentFromProp } from '../_util/props-util';
import VcSwitch from '../vc-switch';
import Wave from '../_util/wave';
import Icon from '../icon';
import Base from '../base';
const Switch = {
name: 'ASwitch',
@ -64,6 +65,7 @@ const Switch = {
/* istanbul ignore next */
Switch.install = function(Vue) {
Vue.use(Base);
Vue.component(Switch.name, Switch);
};

View File

@ -10,6 +10,7 @@ import {
camelize,
getSlots,
} from '../_util/props-util';
import Base from '../base';
const Table = {
name: 'ATable',
@ -107,6 +108,7 @@ const Table = {
};
/* istanbul ignore next */
Table.install = function(Vue) {
Vue.use(Base);
Vue.component(Table.name, Table);
Vue.component(Table.Column.name, Table.Column);
Vue.component(Table.ColumnGroup.name, Table.ColumnGroup);

View File

@ -3,12 +3,15 @@ import Vue from 'vue';
import Tabs from './tabs';
import TabPane from '../vc-tabs/src/TabPane';
import TabContent from '../vc-tabs/src/TabContent';
import Base from '../base';
Tabs.TabPane = { ...TabPane, name: 'ATabPane', __ANT_TAB_PANE: true };
Tabs.TabContent = { ...TabContent, name: 'ATabContent' };
Vue.use(ref, { name: 'ant-ref' });
/* istanbul ignore next */
Tabs.install = function(Vue) {
Vue.use(Base);
Vue.component(Tabs.name, Tabs);
Vue.component(Tabs.TabPane.name, Tabs.TabPane);
Vue.component(Tabs.TabContent.name, Tabs.TabContent);

View File

@ -1,10 +1,12 @@
import Tag from './Tag';
import CheckableTag from './CheckableTag';
import Base from '../base';
Tag.CheckableTag = CheckableTag;
/* istanbul ignore next */
Tag.install = function(Vue) {
Vue.use(Base);
Vue.component(Tag.name, Tag);
Vue.component(Tag.CheckableTag.name, Tag.CheckableTag);
};

View File

@ -14,6 +14,7 @@ import {
isValidElement,
} from '../_util/props-util';
import { cloneElement } from '../_util/vnode';
import Base from '../base';
export function generateShowHourMinuteSecond(format) {
// Ref: http://momentjs.com/docs/#/parsing/string-format/
@ -215,6 +216,7 @@ const TimePicker = {
/* istanbul ignore next */
TimePicker.install = function(Vue) {
Vue.use(Base);
Vue.component(TimePicker.name, TimePicker);
};

View File

@ -1,13 +1,15 @@
import Timeline from './Timeline';
import TimelineItem from './TimelineItem';
import Base from '../base';
export { TimelineProps } from './Timeline';
export { TimeLineItemProps } from './TimelineItem';
import TimelineItem from './TimelineItem';
Timeline.Item = TimelineItem;
/* istanbul ignore next */
Timeline.install = function(Vue) {
Vue.use(Base);
Vue.component(Timeline.name, Timeline);
Vue.component(TimelineItem.name, TimelineItem);
};

View File

@ -1,7 +1,9 @@
import ToolTip from './Tooltip';
import Base from '../base';
/* istanbul ignore next */
ToolTip.install = function(Vue) {
Vue.use(Base);
Vue.component(ToolTip.name, ToolTip);
};

View File

@ -12,6 +12,7 @@ import Operation from './operation';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import defaultLocale from '../locale-provider/default';
import warning from '../_util/warning';
import Base from '../base';
export const TransferDirection = 'left' | 'right';
@ -433,6 +434,7 @@ const Transfer = {
/* istanbul ignore next */
Transfer.install = function(Vue) {
Vue.use(Base);
Vue.component(Transfer.name, Transfer);
};

View File

@ -10,6 +10,7 @@ import {
filterEmpty,
isValidElement,
} from '../_util/props-util';
import Base from '../base';
export { TreeData, TreeSelectProps } from './interface';
@ -173,6 +174,7 @@ const TreeSelect = {
/* istanbul ignore next */
TreeSelect.install = function(Vue) {
Vue.use(Base);
Vue.component(TreeSelect.name, TreeSelect);
Vue.component(TreeSelect.TreeNode.name, TreeSelect.TreeNode);
};

View File

@ -1,10 +1,12 @@
import Tree from './Tree';
import DirectoryTree from './DirectoryTree';
import Base from '../base';
Tree.TreeNode.name = 'ATreeNode';
Tree.DirectoryTree = DirectoryTree;
/* istanbul ignore next */
Tree.install = function(Vue) {
Vue.use(Base);
Vue.component(Tree.name, Tree);
Vue.component(Tree.TreeNode.name, Tree.TreeNode);
Vue.component(DirectoryTree.name, DirectoryTree);

View File

@ -1,5 +1,6 @@
import Upload from './Upload';
import Dragger from './Dragger';
import Base from '../base';
export { UploadProps, UploadListProps, UploadChangeParam } from './interface';
@ -7,6 +8,7 @@ Upload.Dragger = Dragger;
/* istanbul ignore next */
Upload.install = function(Vue) {
Vue.use(Base);
Vue.component(Upload.name, Upload);
Vue.component(Dragger.name, Dragger);
};

View File

@ -5,6 +5,7 @@ import BaseMixin from '../_util/BaseMixin';
import createChainedFunction from '../_util/createChainedFunction';
import getTransitionProps from '../_util/getTransitionProps';
import Notice from './Notice';
import Base from '../base';
function noop() {}
@ -131,7 +132,8 @@ Notification.newInstance = function newNotificationInstance(properties, callback
} else {
document.body.appendChild(div);
}
new Vue({
const V = Base.Vue || Vue;
new V({
el: div,
mounted() {
const self = this;

View File

@ -58,6 +58,7 @@ import {
Skeleton,
Comment,
ConfigProvider,
Base,
} from 'ant-design-vue';
Vue.prototype.$message = message;
@ -69,6 +70,7 @@ Vue.prototype.$warning = Modal.warning;
Vue.prototype.$confirm = Modal.confirm;
/* v1.1.3+ registration methods */
Vue.use(Base);
Vue.use(Affix);
Vue.use(Anchor);
Vue.use(AutoComplete);

View File

@ -2,6 +2,7 @@
exports[`antd dist files exports modules correctly 1`] = `
Array [
"Base",
"version",
"install",
"message",