perf: add defineComponent
parent
3c20fc9f69
commit
f48ccdac01
|
@ -1,7 +1,7 @@
|
||||||
import PropTypes from './vue-types';
|
import PropTypes from './vue-types';
|
||||||
import { Teleport } from 'vue';
|
import { defineComponent, Teleport } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Portal',
|
name: 'Portal',
|
||||||
props: {
|
props: {
|
||||||
getContainer: PropTypes.func.isRequired,
|
getContainer: PropTypes.func.isRequired,
|
||||||
|
@ -45,4 +45,4 @@ export default {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -2,6 +2,7 @@ import PropTypes from './vue-types';
|
||||||
import switchScrollingEffect from './switchScrollingEffect';
|
import switchScrollingEffect from './switchScrollingEffect';
|
||||||
import setStyle from './setStyle';
|
import setStyle from './setStyle';
|
||||||
import Portal from './Portal';
|
import Portal from './Portal';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
let openCount = 0;
|
let openCount = 0;
|
||||||
const windowIsUndefined = !(
|
const windowIsUndefined = !(
|
||||||
|
@ -13,7 +14,7 @@ const windowIsUndefined = !(
|
||||||
// https://github.com/ant-design/ant-design/issues/19332
|
// https://github.com/ant-design/ant-design/issues/19332
|
||||||
let cacheOverflow = {};
|
let cacheOverflow = {};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'PortalWrapper',
|
name: 'PortalWrapper',
|
||||||
props: {
|
props: {
|
||||||
wrapperClassName: PropTypes.string,
|
wrapperClassName: PropTypes.string,
|
||||||
|
@ -147,4 +148,4 @@ export default {
|
||||||
}
|
}
|
||||||
return portal;
|
return portal;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import shallowEqual from '../shallowequal';
|
import shallowEqual from '../shallowequal';
|
||||||
import { inject, createVNode, watchEffect } from 'vue';
|
import { inject, createVNode, watchEffect, defineComponent } from 'vue';
|
||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
import { getOptionProps } from '../props-util';
|
import { getOptionProps } from '../props-util';
|
||||||
|
|
||||||
|
@ -95,6 +95,6 @@ export default function connect(mapStateToProps) {
|
||||||
return createVNode(WrappedComponent, wrapProps, $slots);
|
return createVNode(WrappedComponent, wrapProps, $slots);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return Connect;
|
return defineComponent(Connect);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
/**
|
/**
|
||||||
* Wrap of sub component which need use as Button capacity (like Icon component).
|
* Wrap of sub component which need use as Button capacity (like Icon component).
|
||||||
* This helps accessibility reader to tread as a interactive button to operation.
|
* This helps accessibility reader to tread as a interactive button to operation.
|
||||||
|
@ -13,7 +14,7 @@ const inlineStyle = {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
};
|
};
|
||||||
|
|
||||||
const TransButton = {
|
const TransButton = defineComponent({
|
||||||
name: 'TransButton',
|
name: 'TransButton',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -71,6 +72,6 @@ const TransButton = {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default TransButton;
|
export default TransButton;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { inject } from 'vue';
|
||||||
export const ListItemProps = {
|
export const ListItemProps = {
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
extra: PropTypes.any,
|
extra: PropTypes.any,
|
||||||
actions: PropTypes.arrayOf(PropTypes.any),
|
actions: PropTypes.array,
|
||||||
grid: ListGridType,
|
grid: ListGridType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const SliderProps = () => ({
|
||||||
reverse: PropTypes.looseBool,
|
reverse: PropTypes.looseBool,
|
||||||
min: PropTypes.number,
|
min: PropTypes.number,
|
||||||
max: PropTypes.number,
|
max: PropTypes.number,
|
||||||
step: PropTypes.oneOfType([PropTypes.number, PropTypes.any]),
|
step: PropTypes.any,
|
||||||
marks: PropTypes.object,
|
marks: PropTypes.object,
|
||||||
dots: PropTypes.looseBool,
|
dots: PropTypes.looseBool,
|
||||||
value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),
|
||||||
|
|
|
@ -37,7 +37,7 @@ export const TreeSelectProps = () => ({
|
||||||
searchValue: PropTypes.string,
|
searchValue: PropTypes.string,
|
||||||
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
|
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
|
||||||
suffixIcon: PropTypes.any,
|
suffixIcon: PropTypes.any,
|
||||||
treeCheckable: withUndefined(PropTypes.oneOfType([PropTypes.any, PropTypes.looseBool])),
|
treeCheckable: PropTypes.any,
|
||||||
treeCheckStrictly: PropTypes.looseBool,
|
treeCheckStrictly: PropTypes.looseBool,
|
||||||
treeData: PropTypes.arrayOf(Object),
|
treeData: PropTypes.arrayOf(Object),
|
||||||
treeDataSimpleMode: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, Object])),
|
treeDataSimpleMode: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, Object])),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { nextTick } from 'vue';
|
import { nextTick, defineComponent } from 'vue';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { alignElement, alignPoint } from 'dom-align';
|
import { alignElement, alignPoint } from 'dom-align';
|
||||||
import addEventListener from '../vc-util/Dom/addEventListener';
|
import addEventListener from '../vc-util/Dom/addEventListener';
|
||||||
|
@ -18,7 +18,7 @@ function getPoint(point) {
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
childrenProps: PropTypes.object,
|
childrenProps: PropTypes.object,
|
||||||
align: PropTypes.object.isRequired,
|
align: PropTypes.object.isRequired,
|
||||||
|
@ -167,4 +167,4 @@ export default {
|
||||||
}
|
}
|
||||||
return child && child[0];
|
return child && child[0];
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -13,6 +13,7 @@ import DateInput from './date/DateInput';
|
||||||
import enUs from './locale/en_US';
|
import enUs from './locale/en_US';
|
||||||
import { getTimeConfig, getTodayTime, syncTime } from './util';
|
import { getTimeConfig, getTodayTime, syncTime } from './util';
|
||||||
import { goStartMonth, goEndMonth, goTime } from './util/toTime';
|
import { goStartMonth, goEndMonth, goTime } from './util/toTime';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const getMomentObjectIfValid = date => {
|
const getMomentObjectIfValid = date => {
|
||||||
if (moment.isMoment(date) && date.isValid()) {
|
if (moment.isMoment(date) && date.isValid()) {
|
||||||
|
@ -21,7 +22,7 @@ const getMomentObjectIfValid = date => {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Calendar = {
|
const Calendar = defineComponent({
|
||||||
name: 'Calendar',
|
name: 'Calendar',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -383,6 +384,6 @@ const Calendar = {
|
||||||
class: props.showWeekNumber ? `${prefixCls}-week-number` : '',
|
class: props.showWeekNumber ? `${prefixCls}-week-number` : '',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default Calendar;
|
export default Calendar;
|
||||||
|
|
|
@ -8,7 +8,8 @@ import CalendarMixin, { getNowByCurrentStateValue } from './mixin/CalendarMixin'
|
||||||
import CommonMixin from './mixin/CommonMixin';
|
import CommonMixin from './mixin/CommonMixin';
|
||||||
import CalendarHeader from './full-calendar/CalendarHeader';
|
import CalendarHeader from './full-calendar/CalendarHeader';
|
||||||
import enUs from './locale/en_US';
|
import enUs from './locale/en_US';
|
||||||
const FullCalendar = {
|
import { defineComponent } from 'vue';
|
||||||
|
const FullCalendar = defineComponent({
|
||||||
name: 'FullCalendar',
|
name: 'FullCalendar',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -158,6 +159,6 @@ const FullCalendar = {
|
||||||
class: className.join(' '),
|
class: className.join(' '),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default FullCalendar;
|
export default FullCalendar;
|
||||||
|
|
|
@ -7,7 +7,8 @@ import CalendarFooter from './calendar/CalendarFooter';
|
||||||
import CalendarMixin from './mixin/CalendarMixin';
|
import CalendarMixin from './mixin/CalendarMixin';
|
||||||
import CommonMixin from './mixin/CommonMixin';
|
import CommonMixin from './mixin/CommonMixin';
|
||||||
import enUs from './locale/en_US';
|
import enUs from './locale/en_US';
|
||||||
const MonthCalendar = {
|
import { defineComponent } from 'vue';
|
||||||
|
const MonthCalendar = defineComponent({
|
||||||
name: 'MonthCalendar',
|
name: 'MonthCalendar',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -120,6 +121,6 @@ const MonthCalendar = {
|
||||||
children,
|
children,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default MonthCalendar;
|
export default MonthCalendar;
|
||||||
|
|
|
@ -8,6 +8,7 @@ import placements from './picker/placements';
|
||||||
import Trigger from '../../vc-trigger';
|
import Trigger from '../../vc-trigger';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import isNil from 'lodash-es/isNil';
|
import isNil from 'lodash-es/isNil';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
const TimeType = {
|
const TimeType = {
|
||||||
validator(value) {
|
validator(value) {
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
|
@ -24,7 +25,7 @@ function refFn(field, component) {
|
||||||
this[field] = component;
|
this[field] = component;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Picker = {
|
const Picker = defineComponent({
|
||||||
name: 'Picker',
|
name: 'Picker',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -239,6 +240,6 @@ const Picker = {
|
||||||
</Trigger>
|
</Trigger>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default Picker;
|
export default Picker;
|
||||||
|
|
|
@ -11,6 +11,7 @@ import CommonMixin from './mixin/CommonMixin';
|
||||||
import enUs from './locale/en_US';
|
import enUs from './locale/en_US';
|
||||||
import { syncTime, getTodayTime, isAllowedDate } from './util/';
|
import { syncTime, getTodayTime, isAllowedDate } from './util/';
|
||||||
import { goTime, goStartMonth, goEndMonth, includesTime } from './util/toTime';
|
import { goTime, goStartMonth, goEndMonth, includesTime } from './util/toTime';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ function onInputSelect(direction, value, cause) {
|
||||||
this.fireSelectValueChange(selectedValue, null, cause || { source: 'dateInput' });
|
this.fireSelectValueChange(selectedValue, null, cause || { source: 'dateInput' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const RangeCalendar = {
|
const RangeCalendar = defineComponent({
|
||||||
name: 'RangeCalendar',
|
name: 'RangeCalendar',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -832,6 +833,6 @@ const RangeCalendar = {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default RangeCalendar;
|
export default RangeCalendar;
|
||||||
|
|
|
@ -34,7 +34,7 @@ const DateTBody = {
|
||||||
dateRender: PropTypes.func,
|
dateRender: PropTypes.func,
|
||||||
disabledDate: PropTypes.func,
|
disabledDate: PropTypes.func,
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
selectedValue: PropTypes.oneOfType([PropTypes.any, PropTypes.arrayOf(PropTypes.any)]),
|
selectedValue: PropTypes.any,
|
||||||
value: PropTypes.object,
|
value: PropTypes.object,
|
||||||
hoverValue: PropTypes.any.def([]),
|
hoverValue: PropTypes.any.def([]),
|
||||||
showWeekNumber: PropTypes.looseBool,
|
showWeekNumber: PropTypes.looseBool,
|
||||||
|
|
|
@ -8,6 +8,7 @@ import shallowEqualArrays from 'shallow-equal/arrays';
|
||||||
import { hasProp, getEvents } from '../_util/props-util';
|
import { hasProp, getEvents } from '../_util/props-util';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const BUILT_IN_PLACEMENTS = {
|
const BUILT_IN_PLACEMENTS = {
|
||||||
bottomLeft: {
|
bottomLeft: {
|
||||||
|
@ -44,7 +45,7 @@ const BUILT_IN_PLACEMENTS = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Cascader',
|
name: 'Cascader',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -384,4 +385,4 @@ export default {
|
||||||
</Trigger>
|
</Trigger>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { nextTick } from 'vue';
|
import { nextTick, defineComponent } from 'vue';
|
||||||
import classNames from '../../_util/classNames';
|
import classNames from '../../_util/classNames';
|
||||||
import PropTypes, { withUndefined } from '../../_util/vue-types';
|
import PropTypes, { withUndefined } from '../../_util/vue-types';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import { getOptionProps, hasProp, initDefaultProps } from '../../_util/props-util';
|
import { getOptionProps, hasProp, initDefaultProps } from '../../_util/props-util';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Checkbox',
|
name: 'Checkbox',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -146,4 +146,4 @@ export default {
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { cloneElement } from '../../_util/vnode';
|
||||||
import openAnimationFactory from './openAnimationFactory';
|
import openAnimationFactory from './openAnimationFactory';
|
||||||
import { collapseProps } from './commonProps';
|
import { collapseProps } from './commonProps';
|
||||||
import { getDataAndAriaProps } from '../../_util/util';
|
import { getDataAndAriaProps } from '../../_util/util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
function _toArray(activeKey) {
|
function _toArray(activeKey) {
|
||||||
let currentActiveKey = activeKey;
|
let currentActiveKey = activeKey;
|
||||||
|
@ -18,7 +19,7 @@ function _toArray(activeKey) {
|
||||||
}
|
}
|
||||||
return currentActiveKey.map(key => String(key));
|
return currentActiveKey.map(key => String(key));
|
||||||
}
|
}
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Collapse',
|
name: 'Collapse',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -142,4 +143,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import PanelContent from './PanelContent';
|
import PanelContent from './PanelContent';
|
||||||
import { initDefaultProps, getComponent, getSlot } from '../../_util/props-util';
|
import { initDefaultProps, getComponent, getSlot } from '../../_util/props-util';
|
||||||
import { panelProps } from './commonProps';
|
import { panelProps } from './commonProps';
|
||||||
import { Transition } from 'vue';
|
import { defineComponent, Transition } from 'vue';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Panel',
|
name: 'Panel',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: initDefaultProps(panelProps(), {
|
props: initDefaultProps(panelProps(), {
|
||||||
|
@ -90,4 +90,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
import { getSlot } from '../../_util/props-util';
|
import { getSlot } from '../../_util/props-util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'PanelContent',
|
name: 'PanelContent',
|
||||||
props: {
|
props: {
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
|
@ -35,4 +36,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { provide, Transition } from 'vue';
|
import { defineComponent, provide, Transition } from 'vue';
|
||||||
import { initDefaultProps, getSlot, findDOMNode } from '../_util/props-util';
|
import { initDefaultProps, getSlot, findDOMNode } from '../_util/props-util';
|
||||||
import KeyCode from '../_util/KeyCode';
|
import KeyCode from '../_util/KeyCode';
|
||||||
import contains from '../vc-util/Dom/contains';
|
import contains from '../vc-util/Dom/contains';
|
||||||
|
@ -48,7 +48,7 @@ function offset(el) {
|
||||||
|
|
||||||
let cacheOverflow = {};
|
let cacheOverflow = {};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'VcDialog',
|
name: 'VcDialog',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -429,4 +429,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -2,8 +2,9 @@ import Dialog from './Dialog';
|
||||||
import getDialogPropTypes from './IDialogPropTypes';
|
import getDialogPropTypes from './IDialogPropTypes';
|
||||||
import Portal from '../_util/PortalWrapper';
|
import Portal from '../_util/PortalWrapper';
|
||||||
import { getSlot } from '../_util/props-util';
|
import { getSlot } from '../_util/props-util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
const IDialogPropTypes = getDialogPropTypes();
|
const IDialogPropTypes = getDialogPropTypes();
|
||||||
const DialogWrap = {
|
const DialogWrap = defineComponent({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
...IDialogPropTypes,
|
...IDialogPropTypes,
|
||||||
|
@ -41,6 +42,6 @@ const DialogWrap = {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default DialogWrap;
|
export default DialogWrap;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import classnames from '../../_util/classNames';
|
import classnames from '../../_util/classNames';
|
||||||
import { cloneVNode, Teleport, nextTick } from 'vue';
|
import { cloneVNode, Teleport, nextTick, defineComponent } from 'vue';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import { initDefaultProps, getSlot } from '../../_util/props-util';
|
import { initDefaultProps, getSlot } from '../../_util/props-util';
|
||||||
import getScrollBarSize from '../../_util/getScrollBarSize';
|
import getScrollBarSize from '../../_util/getScrollBarSize';
|
||||||
|
@ -24,7 +24,7 @@ const windowIsUndefined = !(
|
||||||
window.document.createElement
|
window.document.createElement
|
||||||
);
|
);
|
||||||
|
|
||||||
const Drawer = {
|
const Drawer = defineComponent({
|
||||||
name: 'Drawer',
|
name: 'Drawer',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -598,6 +598,6 @@ const Drawer = {
|
||||||
}
|
}
|
||||||
return portal;
|
return portal;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default Drawer;
|
export default Drawer;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Text } from 'vue';
|
import { defineComponent, Text } from 'vue';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
import Trigger from '../../vc-trigger';
|
import Trigger from '../../vc-trigger';
|
||||||
import placements from './placements';
|
import placements from './placements';
|
||||||
|
@ -12,7 +12,7 @@ import {
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import { cloneElement } from '../../_util/vnode';
|
import { cloneElement } from '../../_util/vnode';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: {
|
props: {
|
||||||
minOverlayWidthMatchTrigger: PropTypes.looseBool,
|
minOverlayWidthMatchTrigger: PropTypes.looseBool,
|
||||||
|
@ -198,4 +198,4 @@ export default {
|
||||||
};
|
};
|
||||||
return <Trigger {...triggerProps}>{this.renderChildren()}</Trigger>;
|
return <Trigger {...triggerProps}>{this.renderChildren()}</Trigger>;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { initDefaultProps, hasProp, getOptionProps } from '../../_util/props-uti
|
||||||
import classNames from '../../_util/classNames';
|
import classNames from '../../_util/classNames';
|
||||||
import KeyCode from '../../_util/KeyCode';
|
import KeyCode from '../../_util/KeyCode';
|
||||||
import InputHandler from './InputHandler';
|
import InputHandler from './InputHandler';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
function preventDefault(e) {
|
function preventDefault(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -78,7 +79,7 @@ const inputNumberProps = {
|
||||||
maxlength: PropTypes.any,
|
maxlength: PropTypes.any,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'VCInputNumber',
|
name: 'VCInputNumber',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -800,4 +801,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -7,7 +7,7 @@ import debounce from 'lodash-es/debounce';
|
||||||
import throttle from 'lodash-es/throttle';
|
import throttle from 'lodash-es/throttle';
|
||||||
import parentScroll from './utils/parentScroll';
|
import parentScroll from './utils/parentScroll';
|
||||||
import inViewport from './utils/inViewport';
|
import inViewport from './utils/inViewport';
|
||||||
import { watchEffect } from 'vue';
|
import { watchEffect, defineComponent } from 'vue';
|
||||||
|
|
||||||
const lazyLoadProps = {
|
const lazyLoadProps = {
|
||||||
debounce: PropTypes.looseBool,
|
debounce: PropTypes.looseBool,
|
||||||
|
@ -25,7 +25,7 @@ const lazyLoadProps = {
|
||||||
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'LazyLoad',
|
name: 'LazyLoad',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -148,4 +148,4 @@ export default {
|
||||||
</ElementType>
|
</ElementType>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -4,8 +4,9 @@ import { cloneElement } from '../../_util/vnode';
|
||||||
import warning from '../../_util/warning';
|
import warning from '../../_util/warning';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import { ITouchProps } from './PropTypes';
|
import { ITouchProps } from './PropTypes';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'TouchFeedback',
|
name: 'TouchFeedback',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -104,4 +105,4 @@ export default {
|
||||||
|
|
||||||
return cloneElement(child, events);
|
return cloneElement(child, events);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { provide, withDirectives } from 'vue';
|
import { defineComponent, provide, withDirectives } from 'vue';
|
||||||
import classNames from '../../_util/classNames';
|
import classNames from '../../_util/classNames';
|
||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
import KeyCode from '../../_util/KeyCode';
|
import KeyCode from '../../_util/KeyCode';
|
||||||
|
@ -309,4 +309,4 @@ const Mentions = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Mentions;
|
export default defineComponent(Mentions);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
|
|
||||||
export const OptionProps = {
|
export const OptionProps = {
|
||||||
|
@ -6,10 +7,10 @@ export const OptionProps = {
|
||||||
children: PropTypes.any,
|
children: PropTypes.any,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Option',
|
name: 'Option',
|
||||||
props: OptionProps,
|
props: OptionProps,
|
||||||
render() {
|
render() {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { default as SubPopupMenu, getActiveKey } from './SubPopupMenu';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import hasProp, { getOptionProps, getComponent, filterEmpty } from '../_util/props-util';
|
import hasProp, { getOptionProps, getComponent, filterEmpty } from '../_util/props-util';
|
||||||
import commonPropsType from './commonPropsType';
|
import commonPropsType from './commonPropsType';
|
||||||
import { provide } from 'vue';
|
import { defineComponent, provide } from 'vue';
|
||||||
|
|
||||||
const Menu = {
|
const Menu = {
|
||||||
name: 'Menu',
|
name: 'Menu',
|
||||||
|
@ -183,4 +183,4 @@ const Menu = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Menu;
|
export default defineComponent(Menu);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { getComponent, getSlot } from '../_util/props-util';
|
import { getComponent, getSlot } from '../_util/props-util';
|
||||||
import { menuAllProps } from './util';
|
import { menuAllProps } from './util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const MenuItemGroup = {
|
const MenuItemGroup = {
|
||||||
name: 'MenuItemGroup',
|
name: 'MenuItemGroup',
|
||||||
|
@ -41,4 +42,4 @@ const MenuItemGroup = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MenuItemGroup;
|
export default defineComponent(MenuItemGroup);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp, TransitionGroup } from 'vue';
|
import { createApp, defineComponent, TransitionGroup } from 'vue';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import { getComponent } from '../_util/props-util';
|
import { getComponent } from '../_util/props-util';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
|
@ -15,7 +15,7 @@ function getUuid() {
|
||||||
return `rcNotification_${now}_${seed++}`;
|
return `rcNotification_${now}_${seed++}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Notification = {
|
const Notification = defineComponent({
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: {
|
props: {
|
||||||
prefixCls: PropTypes.string.def('rc-notification'),
|
prefixCls: PropTypes.string.def('rc-notification'),
|
||||||
|
@ -117,7 +117,7 @@ const Notification = {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
Notification.newInstance = function newNotificationInstance(properties, callback) {
|
Notification.newInstance = function newNotificationInstance(properties, callback) {
|
||||||
const { getContainer, style, class: className, ...props } = properties || {};
|
const { getContainer, style, class: className, ...props } = properties || {};
|
||||||
|
@ -161,5 +161,4 @@ Notification.newInstance = function newNotificationInstance(properties, callback
|
||||||
});
|
});
|
||||||
app.mount(div);
|
app.mount(div);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Notification;
|
export default Notification;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import Options from './Options';
|
||||||
import LOCALE from './locale/zh_CN';
|
import LOCALE from './locale/zh_CN';
|
||||||
import KEYCODE from './KeyCode';
|
import KEYCODE from './KeyCode';
|
||||||
import classNames from '../_util/classNames';
|
import classNames from '../_util/classNames';
|
||||||
import { withDirectives } from 'vue';
|
import { defineComponent, withDirectives } from 'vue';
|
||||||
import antInput from '../_util/antInputDirective';
|
import antInput from '../_util/antInputDirective';
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
@ -28,7 +28,7 @@ function calculatePage(p, state, props) {
|
||||||
return Math.floor((props.total - 1) / pageSize) + 1;
|
return Math.floor((props.total - 1) / pageSize) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Pagination',
|
name: 'Pagination',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -649,4 +649,4 @@ export default {
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -2,6 +2,7 @@ import PropTypes, { withUndefined } from '../../_util/vue-types';
|
||||||
import { initDefaultProps } from '../../_util/props-util';
|
import { initDefaultProps } from '../../_util/props-util';
|
||||||
import enhancer from './enhancer';
|
import enhancer from './enhancer';
|
||||||
import { propTypes, defaultProps } from './types';
|
import { propTypes, defaultProps } from './types';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const circlePropTypes = {
|
const circlePropTypes = {
|
||||||
...propTypes,
|
...propTypes,
|
||||||
|
@ -70,7 +71,7 @@ function getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const Circle = {
|
const Circle = defineComponent({
|
||||||
name: 'Circle',
|
name: 'Circle',
|
||||||
props: initDefaultProps(circlePropTypes, circleDefaultProps),
|
props: initDefaultProps(circlePropTypes, circleDefaultProps),
|
||||||
created() {
|
created() {
|
||||||
|
@ -184,6 +185,6 @@ const Circle = {
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default enhancer(Circle);
|
export default enhancer(Circle);
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
import { initDefaultProps } from '../../_util/props-util';
|
import { initDefaultProps } from '../../_util/props-util';
|
||||||
import enhancer from './enhancer';
|
import enhancer from './enhancer';
|
||||||
import { propTypes, defaultProps } from './types';
|
import { propTypes, defaultProps } from './types';
|
||||||
|
|
||||||
const Line = {
|
const Line = defineComponent({
|
||||||
name: 'Line',
|
name: 'Line',
|
||||||
props: initDefaultProps(propTypes, defaultProps),
|
props: initDefaultProps(propTypes, defaultProps),
|
||||||
created() {
|
created() {
|
||||||
|
@ -78,6 +79,6 @@ const Line = {
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default enhancer(Line);
|
export default enhancer(Line);
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import { getOffsetLeft } from './util';
|
import { getOffsetLeft } from './util';
|
||||||
import Star from './Star';
|
import Star from './Star';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const rateProps = {
|
const rateProps = {
|
||||||
disabled: PropTypes.looseBool,
|
disabled: PropTypes.looseBool,
|
||||||
|
@ -28,7 +29,7 @@ const rateProps = {
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Rate',
|
name: 'Rate',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -211,4 +212,4 @@ export default {
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -5,8 +5,9 @@ import InnerSlider from './inner-slider';
|
||||||
import defaultProps from './default-props';
|
import defaultProps from './default-props';
|
||||||
import { canUseDOM } from './utils/innerSliderUtils';
|
import { canUseDOM } from './utils/innerSliderUtils';
|
||||||
import { getSlot } from '../../_util/props-util';
|
import { getSlot } from '../../_util/props-util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Slider',
|
name: 'Slider',
|
||||||
props: {
|
props: {
|
||||||
...defaultProps,
|
...defaultProps,
|
||||||
|
@ -196,4 +197,4 @@ export default {
|
||||||
};
|
};
|
||||||
return <InnerSlider {...sliderProps} vSlots={this.$slots} __propsSymbol__={[]} />;
|
return <InnerSlider {...sliderProps} vSlots={this.$slots} __propsSymbol__={[]} />;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -4,8 +4,9 @@ import { hasProp } from '../../_util/props-util';
|
||||||
import Track from './common/Track';
|
import Track from './common/Track';
|
||||||
import createSlider from './common/createSlider';
|
import createSlider from './common/createSlider';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
const Slider = {
|
const Slider = defineComponent({
|
||||||
name: 'Slider',
|
name: 'Slider',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -192,6 +193,6 @@ const Slider = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export default createSlider(Slider);
|
export default createSlider(Slider);
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import PropTypes, { withUndefined } from '../_util/vue-types';
|
import PropTypes, { withUndefined } from '../_util/vue-types';
|
||||||
import { getOptionProps, getComponent } from '../_util/props-util';
|
import { getOptionProps, getComponent } from '../_util/props-util';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
function isString(str) {
|
function isString(str) {
|
||||||
return typeof str === 'string';
|
return typeof str === 'string';
|
||||||
}
|
}
|
||||||
function noop() {}
|
function noop() {}
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Step',
|
name: 'Step',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: {
|
props: {
|
||||||
|
@ -143,4 +144,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -4,8 +4,9 @@ import debounce from 'lodash-es/debounce';
|
||||||
import isFlexSupported from '../_util/isFlexSupported';
|
import isFlexSupported from '../_util/isFlexSupported';
|
||||||
import { getSlot, getPropsData } from '../_util/props-util';
|
import { getSlot, getPropsData } from '../_util/props-util';
|
||||||
import { cloneElement } from '../_util/vnode';
|
import { cloneElement } from '../_util/vnode';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Steps',
|
name: 'Steps',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: {
|
props: {
|
||||||
|
@ -166,4 +167,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -2,10 +2,11 @@ import { switchPropTypes } from './PropTypes';
|
||||||
import BaseMixin from '../_util/BaseMixin';
|
import BaseMixin from '../_util/BaseMixin';
|
||||||
import { hasProp, getOptionProps, getComponent } from '../_util/props-util';
|
import { hasProp, getOptionProps, getComponent } from '../_util/props-util';
|
||||||
import Omit from 'omit.js';
|
import Omit from 'omit.js';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
// function noop () {
|
// function noop () {
|
||||||
// }
|
// }
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'VcSwitch',
|
name: 'VcSwitch',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -120,4 +121,4 @@ export default {
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'ColumnGroup',
|
name: 'ColumnGroup',
|
||||||
props: {
|
props: {
|
||||||
title: PropTypes.any,
|
title: PropTypes.any,
|
||||||
|
@ -9,4 +10,4 @@ export default {
|
||||||
render() {
|
render() {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
import { provide, markRaw } from 'vue';
|
import { provide, markRaw, defineComponent } from 'vue';
|
||||||
import shallowequal from '../../_util/shallowequal';
|
import shallowequal from '../../_util/shallowequal';
|
||||||
import merge from 'lodash-es/merge';
|
import merge from 'lodash-es/merge';
|
||||||
import classes from 'component-classes';
|
import classes from 'component-classes';
|
||||||
|
@ -16,7 +16,7 @@ import ExpandableTable from './ExpandableTable';
|
||||||
import { initDefaultProps, getOptionProps } from '../../_util/props-util';
|
import { initDefaultProps, getOptionProps } from '../../_util/props-util';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Table',
|
name: 'Table',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -590,4 +590,4 @@ export default {
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -6,7 +6,8 @@ import {
|
||||||
getTransformPropValue,
|
getTransformPropValue,
|
||||||
getMarginStyle,
|
getMarginStyle,
|
||||||
} from './utils';
|
} from './utils';
|
||||||
export default {
|
import { defineComponent } from 'vue';
|
||||||
|
export default defineComponent({
|
||||||
name: 'TabContent',
|
name: 'TabContent',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -88,4 +89,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { inject } from 'vue';
|
import { defineComponent, inject } from 'vue';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
import { getComponent, getSlot } from '../../_util/props-util';
|
import { getComponent, getSlot } from '../../_util/props-util';
|
||||||
import Sentinel from './Sentinel';
|
import Sentinel from './Sentinel';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'TabPane',
|
name: 'TabPane',
|
||||||
props: {
|
props: {
|
||||||
active: PropTypes.looseBool,
|
active: PropTypes.looseBool,
|
||||||
|
@ -54,4 +54,4 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { provide, reactive, watchEffect } from 'vue';
|
import { defineComponent, provide, reactive, watchEffect } from 'vue';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
import raf from 'raf';
|
import raf from 'raf';
|
||||||
|
@ -25,7 +25,7 @@ function activeKeyIsValid(props, key) {
|
||||||
return keys.indexOf(key) >= 0;
|
return keys.indexOf(key) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Tabs',
|
name: 'Tabs',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -250,4 +250,4 @@ export default {
|
||||||
};
|
};
|
||||||
return <div {...p}>{contents}</div>;
|
return <div {...p}>{contents}</div>;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -13,13 +13,14 @@ import { cloneElement } from '../_util/vnode';
|
||||||
import Trigger from '../vc-trigger';
|
import Trigger from '../vc-trigger';
|
||||||
import Panel from './Panel';
|
import Panel from './Panel';
|
||||||
import placements from './placements';
|
import placements from './placements';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
function noop() {}
|
function noop() {}
|
||||||
function refFn(field, component) {
|
function refFn(field, component) {
|
||||||
this[field] = component;
|
this[field] = component;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'VcTimePicker',
|
name: 'VcTimePicker',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -389,4 +390,4 @@ export default {
|
||||||
</Trigger>
|
</Trigger>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -3,8 +3,9 @@ import Trigger from '../vc-trigger';
|
||||||
import { placements } from './placements';
|
import { placements } from './placements';
|
||||||
import Content from './Content';
|
import Content from './Content';
|
||||||
import { hasProp, getComponent, getOptionProps, getSlot } from '../_util/props-util';
|
import { hasProp, getComponent, getOptionProps, getSlot } from '../_util/props-util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
function noop() {}
|
function noop() {}
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Tooltip',
|
name: 'Tooltip',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
|
@ -97,4 +98,4 @@ export default {
|
||||||
};
|
};
|
||||||
return <Trigger {...triggerProps}>{getSlot(this)[0]}</Trigger>;
|
return <Trigger {...triggerProps}>{getSlot(this)[0]}</Trigger>;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* In single mode, we should focus on the `span`
|
* In single mode, we should focus on the `span`
|
||||||
* In multiple mode, we should focus on the `input`
|
* In multiple mode, we should focus on the `input`
|
||||||
*/
|
*/
|
||||||
import { provide } from 'vue';
|
import { defineComponent, provide } from 'vue';
|
||||||
import shallowEqual from '../../_util/shallowequal';
|
import shallowEqual from '../../_util/shallowequal';
|
||||||
import raf from 'raf';
|
import raf from 'raf';
|
||||||
import scrollIntoView from 'dom-scroll-into-view';
|
import scrollIntoView from 'dom-scroll-into-view';
|
||||||
|
@ -67,7 +67,7 @@ function getWatch(keys = []) {
|
||||||
});
|
});
|
||||||
return watch;
|
return watch;
|
||||||
}
|
}
|
||||||
const Select = {
|
const Select = defineComponent({
|
||||||
name: 'Select',
|
name: 'Select',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -95,7 +95,7 @@ const Select = {
|
||||||
children: PropTypes.any,
|
children: PropTypes.any,
|
||||||
labelInValue: PropTypes.looseBool,
|
labelInValue: PropTypes.looseBool,
|
||||||
maxTagCount: PropTypes.number,
|
maxTagCount: PropTypes.number,
|
||||||
maxTagPlaceholder: PropTypes.oneOfType([PropTypes.any, PropTypes.func]),
|
maxTagPlaceholder: PropTypes.any,
|
||||||
maxTagTextLength: PropTypes.number,
|
maxTagTextLength: PropTypes.number,
|
||||||
showCheckedStrategy: PropTypes.oneOf([SHOW_ALL, SHOW_PARENT, SHOW_CHILD]),
|
showCheckedStrategy: PropTypes.oneOf([SHOW_ALL, SHOW_PARENT, SHOW_CHILD]),
|
||||||
dropdownClassName: PropTypes.string,
|
dropdownClassName: PropTypes.string,
|
||||||
|
@ -1105,7 +1105,7 @@ const Select = {
|
||||||
};
|
};
|
||||||
return <SelectTrigger {...selectTriggerProps}>{$selector}</SelectTrigger>;
|
return <SelectTrigger {...selectTriggerProps}>{$selector}</SelectTrigger>;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
Select.TreeNode = SelectNode;
|
Select.TreeNode = SelectNode;
|
||||||
Select.SHOW_ALL = SHOW_ALL;
|
Select.SHOW_ALL = SHOW_ALL;
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
warnOnlyTreeNode,
|
warnOnlyTreeNode,
|
||||||
getDataAndAria,
|
getDataAndAria,
|
||||||
} from './util';
|
} from './util';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thought we still use `cloneElement` to pass `key`,
|
* Thought we still use `cloneElement` to pass `key`,
|
||||||
|
@ -40,7 +41,7 @@ function getWatch(keys = []) {
|
||||||
return watch;
|
return watch;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Tree = {
|
const Tree = defineComponent({
|
||||||
name: 'Tree',
|
name: 'Tree',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -678,7 +679,7 @@ const Tree = {
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
export { Tree };
|
export { Tree };
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { inject, provide, Transition } from 'vue';
|
import { defineComponent, inject, provide, Transition } from 'vue';
|
||||||
import PropTypes from '../../_util/vue-types';
|
import PropTypes from '../../_util/vue-types';
|
||||||
import classNames from '../../_util/classNames';
|
import classNames from '../../_util/classNames';
|
||||||
import { getNodeChildren, mapChildren, warnOnlyTreeNode, getDataAndAria } from './util';
|
import { getNodeChildren, mapChildren, warnOnlyTreeNode, getDataAndAria } from './util';
|
||||||
|
@ -12,7 +12,7 @@ const ICON_CLOSE = 'close';
|
||||||
|
|
||||||
const defaultTitle = '---';
|
const defaultTitle = '---';
|
||||||
|
|
||||||
const TreeNode = {
|
const TreeNode = defineComponent({
|
||||||
name: 'TreeNode',
|
name: 'TreeNode',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
|
@ -571,7 +571,7 @@ const TreeNode = {
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
TreeNode.isTreeNode = 1;
|
TreeNode.isTreeNode = 1;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { initDefaultProps, getSlot } from '../../_util/props-util';
|
||||||
import BaseMixin from '../../_util/BaseMixin';
|
import BaseMixin from '../../_util/BaseMixin';
|
||||||
import AjaxUpload from './AjaxUploader';
|
import AjaxUpload from './AjaxUploader';
|
||||||
import IframeUpload from './IframeUploader';
|
import IframeUpload from './IframeUploader';
|
||||||
import { nextTick } from 'vue';
|
import { defineComponent, nextTick } from 'vue';
|
||||||
|
|
||||||
function empty() {}
|
function empty() {}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ const uploadProps = {
|
||||||
supportServerRender: PropTypes.looseBool,
|
supportServerRender: PropTypes.looseBool,
|
||||||
openFileDialogOnClick: PropTypes.looseBool,
|
openFileDialogOnClick: PropTypes.looseBool,
|
||||||
};
|
};
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: 'Upload',
|
name: 'Upload',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
|
@ -93,4 +93,4 @@ export default {
|
||||||
const ComponentUploader = this.getComponent();
|
const ComponentUploader = this.getComponent();
|
||||||
return <ComponentUploader {...componentProps}>{getSlot(this)}</ComponentUploader>;
|
return <ComponentUploader {...componentProps}>{getSlot(this)}</ComponentUploader>;
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
Loading…
Reference in New Issue