test: update test & ts

pull/3067/head
tanjinzhou 2020-10-28 15:31:45 +08:00
parent 9de1b594b0
commit 789647c604
32 changed files with 116 additions and 117 deletions

@ -1 +1 @@
Subproject commit 9bb9cb5ae42a776adb2d3bf3242a473a9851b344
Subproject commit 4f6ebd03190812369678c4dd383fdb4e98d6f6c1

View File

@ -1,3 +1,4 @@
import { nextTick } from 'vue';
import { getOptionProps } from './props-util';
export default {
@ -19,7 +20,7 @@ export default {
if (this._.isMounted) {
this.$forceUpdate();
}
this.$nextTick(() => {
nextTick(() => {
callback && callback();
});
},

View File

@ -1,3 +1,4 @@
import { nextTick } from 'vue';
import { getOptionProps } from './props-util';
export default {
@ -19,7 +20,7 @@ export default {
if (this._.isMounted) {
this.$forceUpdate();
}
this.$nextTick(() => {
nextTick(() => {
callback && callback();
});
},

View File

@ -1,5 +1,5 @@
import PropTypes from './vue-types';
import { defineComponent, Teleport } from 'vue';
import { defineComponent, nextTick, Teleport } from 'vue';
export default defineComponent({
name: 'Portal',
@ -18,7 +18,7 @@ export default defineComponent({
updated() {
const { didUpdate } = this.$props;
if (didUpdate) {
this.$nextTick(() => {
nextTick(() => {
didUpdate(this.$props);
});
}

View File

@ -1,4 +1,4 @@
import { defineComponent, inject, provide } from 'vue';
import { defineComponent, inject, nextTick, provide } from 'vue';
import PropTypes from '../_util/vue-types';
import classNames from '../_util/classNames';
import addEventListener from '../vc-util/Dom/addEventListener';
@ -117,7 +117,7 @@ export default defineComponent({
};
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
const { getContainer } = this;
this.scrollContainer = getContainer();
this.scrollEvent = addEventListener(this.scrollContainer, 'scroll', this.handleScroll);
@ -125,7 +125,7 @@ export default defineComponent({
});
},
updated() {
this.$nextTick(() => {
nextTick(() => {
if (this.scrollEvent) {
const { getContainer } = this;
const currentContainer = getContainer();

View File

@ -1,4 +1,4 @@
import { ComponentPublicInstance, defineComponent, inject } from 'vue';
import { ComponentPublicInstance, defineComponent, inject, nextTick } from 'vue';
import PropTypes from '../_util/vue-types';
import { getComponent } from '../_util/props-util';
import classNames from '../_util/classNames';
@ -32,7 +32,7 @@ export default defineComponent({
},
watch: {
href(val, oldVal) {
this.$nextTick(() => {
nextTick(() => {
this.antAnchor.unregisterLink(oldVal);
this.antAnchor.registerLink(val);
});

View File

@ -1,5 +1,5 @@
import { tuple, VueNode } from '../_util/type';
import { CSSProperties, defineComponent, inject, PropType } from 'vue';
import { CSSProperties, defineComponent, inject, nextTick, PropType } from 'vue';
import { defaultConfigProvider } from '../config-provider';
import { getComponent } from '../_util/props-util';
import PropTypes from '../_util/vue-types';
@ -40,7 +40,7 @@ export default defineComponent({
},
watch: {
src() {
this.$nextTick(() => {
nextTick(() => {
this.isImgExist = true;
this.scale = 1;
// force uodate for position
@ -49,13 +49,13 @@ export default defineComponent({
},
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
this.setScale();
this.isMounted = true;
});
},
updated() {
this.$nextTick(() => {
nextTick(() => {
this.setScale();
});
},

View File

@ -1,4 +1,4 @@
import { App, defineComponent, inject } from 'vue';
import { App, defineComponent, inject, nextTick } from 'vue';
import classNames from '../_util/classNames';
import PropTypes from '../_util/vue-types';
import backTopTypes from './backTopTypes';
@ -36,7 +36,7 @@ const BackTop = defineComponent({
};
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
const getTarget = this.target || getDefaultTarget;
this.scrollEvent = addEventListener(getTarget(), 'scroll', this.handleScroll);
this.handleScroll();

View File

@ -231,13 +231,6 @@ const Cascader = defineComponent({
flattenOptions: showSearch ? flattenTree(options, this.$props) : undefined,
};
},
// mounted() {
// this.$nextTick(() => {
// if (this.autofocus && !this.showSearch && !this.disabled) {
// this.$refs.picker.focus();
// }
// });
// },
watch: {
value(val) {
this.setState({ sValue: val || [] });

View File

@ -1,4 +1,4 @@
import { defineComponent, inject } from 'vue';
import { defineComponent, inject, nextTick } from 'vue';
import PropTypes from '../_util/vue-types';
import classNames from '../_util/classNames';
import VcCheckbox from '../vc-checkbox';
@ -36,7 +36,7 @@ export default defineComponent({
watch: {
value(value, prevValue) {
this.$nextTick(() => {
nextTick(() => {
const { checkboxGroupContext: checkboxGroup = {} } = this;
if (checkboxGroup.registerValue && checkboxGroup.cancelValue) {
checkboxGroup.cancelValue(prevValue);

View File

@ -1,4 +1,4 @@
import { CSSProperties, defineComponent, inject } from 'vue';
import { CSSProperties, defineComponent, inject, nextTick } from 'vue';
import moment from 'moment';
import RangeCalendar from '../vc-calendar/src/RangeCalendar';
import VcDatePicker from '../vc-calendar/src/Picker';
@ -136,7 +136,7 @@ export default defineComponent({
this.setState(state);
},
sOpen(val, oldVal) {
this.$nextTick(() => {
nextTick(() => {
if (!hasProp(this, 'open') && oldVal && !val) {
this.focus();
}

View File

@ -1,4 +1,4 @@
import { defineComponent, inject } from 'vue';
import { defineComponent, inject, nextTick } from 'vue';
import moment from 'moment';
import Calendar from '../vc-calendar';
import VcDatePicker from '../vc-calendar/src/Picker';
@ -63,7 +63,7 @@ export default defineComponent({
this.prevState = { ...this.$data, ...state };
},
_open(val, oldVal) {
this.$nextTick(() => {
nextTick(() => {
if (!hasProp(this, 'open') && oldVal && !val) {
this.focus();
}
@ -74,7 +74,7 @@ export default defineComponent({
this.prevState = { ...this.$data };
},
updated() {
this.$nextTick(() => {
nextTick(() => {
if (!hasProp(this, 'open') && this.prevState._open && !this._open) {
this.focus();
}

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`RangePicker show month panel according to value 1`] = `
<div id="app" data-v-app=""><span class="ant-calendar-picker" style="width: 350px;" tabindex="0"><!--teleport start--><!--teleport end--><span class="ant-calendar-picker-input ant-input"><input readonly="" placeholder="Start date" class="ant-calendar-range-picker-input" tabindex="-1"><span class="ant-calendar-range-picker-separator"> ~ </span><input readonly="" placeholder="End date" class="ant-calendar-range-picker-input" tabindex="-1"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span class="ant-calendar-picker-icon"><!----></span>
<div data-v-app=""><span class="ant-calendar-picker" style="width: 350px;" tabindex="0"><!--teleport start--><!--teleport end--><span class="ant-calendar-picker-input ant-input"><input readonly="" placeholder="Start date" class="ant-calendar-range-picker-input" tabindex="-1"><span class="ant-calendar-range-picker-separator"> ~ </span><input readonly="" placeholder="End date" class="ant-calendar-range-picker-input" tabindex="-1"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span class="ant-calendar-picker-icon"><!----></span>
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
<div>
<!---->

View File

@ -1,4 +1,4 @@
import { CSSProperties, DefineComponent, defineComponent, inject } from 'vue';
import { CSSProperties, DefineComponent, defineComponent, inject, nextTick } from 'vue';
import moment from 'moment';
import omit from 'lodash-es/omit';
import MonthCalendar from '../vc-calendar/src/MonthCalendar';
@ -73,7 +73,7 @@ export default function createPicker<P>(
this.setState(state);
},
sOpen(val, oldVal) {
this.$nextTick(() => {
nextTick(() => {
if (!hasProp(this, 'open') && oldVal && !val) {
this.focus();
}

View File

@ -1,4 +1,4 @@
import { provide, inject, defineComponent, DefineComponent } from 'vue';
import { provide, inject, defineComponent, DefineComponent, nextTick } from 'vue';
import TimePickerPanel from '../vc-time-picker/Panel';
import classNames from '../_util/classNames';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
@ -74,7 +74,7 @@ export default function wrapPicker<P>(
checkValidate('DatePicker', defaultValue, 'defaultValue', valueFormat);
checkValidate('DatePicker', value, 'value', valueFormat);
if (autofocus && !disabled) {
this.$nextTick(() => {
nextTick(() => {
this.focus();
});
}

View File

@ -1,4 +1,4 @@
import { inject, provide, PropType, defineComponent, computed } from 'vue';
import { inject, provide, PropType, defineComponent, computed, nextTick } from 'vue';
import cloneDeep from 'lodash-es/cloneDeep';
import PropTypes from '../_util/vue-types';
import classNames from '../_util/classNames';
@ -295,7 +295,7 @@ export default defineComponent({
prop.o[prop.k] = this.initialValue;
}
// reset validateDisabled after onFieldChange triggered
this.$nextTick(() => {
nextTick(() => {
this.validateDisabled = false;
});
},

View File

@ -1,4 +1,4 @@
import { defineComponent, inject, VNode, withDirectives } from 'vue';
import { defineComponent, inject, nextTick, VNode, withDirectives } from 'vue';
import antInputDirective from '../_util/antInputDirective';
import classNames from '../_util/classNames';
import omit from 'omit.js';
@ -76,7 +76,7 @@ export default defineComponent({
},
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
if (process.env.NODE_ENV === 'test') {
if (this.autofocus) {
this.focus();
@ -129,7 +129,7 @@ export default defineComponent({
} else {
this.$forceUpdate();
}
this.$nextTick(() => {
nextTick(() => {
callback && callback();
});
},

View File

@ -1,4 +1,4 @@
import { PropType, VNode } from 'vue';
import { nextTick, PropType, VNode } from 'vue';
import ResizeObserver from '../vc-resize-observer';
import omit from 'omit.js';
import classNames from '../_util/classNames';
@ -55,7 +55,7 @@ const ResizableTextArea = defineComponent({
},
watch: {
value() {
this.$nextTick(() => {
nextTick(() => {
this.resizeTextarea();
});
},

View File

@ -1,4 +1,4 @@
import { defineComponent, inject } from 'vue';
import { defineComponent, inject, nextTick } from 'vue';
import ClearableLabeledInput from './ClearableLabeledInput';
import ResizableTextArea from './ResizableTextArea';
import inputProps from './inputProps';
@ -40,7 +40,7 @@ export default defineComponent({
},
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
if (process.env.NODE_ENV === 'test') {
if (this.autofocus) {
this.focus();
@ -55,7 +55,7 @@ export default defineComponent({
} else {
this.$forceUpdate();
}
this.$nextTick(() => {
nextTick(() => {
callback && callback();
});
},

View File

@ -1,5 +1,5 @@
import classNames from '../_util/classNames';
import { inject, provide, PropType, defineComponent } from 'vue';
import { inject, provide, PropType, defineComponent, nextTick } from 'vue';
import PropTypes from '../_util/vue-types';
import { tuple } from '../_util/type';
import { getOptionProps, hasProp, getComponent, getSlot } from '../_util/props-util';
@ -114,7 +114,7 @@ export default defineComponent({
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
if (this.mql) {
this.mql.addListener(this.responsiveHandler);
this.responsiveHandler(this.mql);

View File

@ -10434,7 +10434,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
<div class="ant-select ant-select-sm ant-fullcalendar-month-select ant-select-single ant-select-show-arrow">
<!---->
<!---->
<div class="ant-select-selector"><span class="ant-select-selection-search"><input id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-select-selection-search-input" style="opacity: 0;" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" type="search"></span><span class="ant-select-selection-item" title="szept">szept</span>
<div class="ant-select-selector"><span class="ant-select-selection-search"><input id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-select-selection-search-input" style="opacity: 0;" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" type="search"></span><span class="ant-select-selection-item" title="szept.">szept.</span>
<!---->
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
<!---->
@ -10976,7 +10976,7 @@ exports[`Locale Provider should display the text as hy 1`] = `
<div class="ant-select ant-select-sm ant-fullcalendar-month-select ant-select-single ant-select-show-arrow">
<!---->
<!---->
<div class="ant-select-selector"><span class="ant-select-selection-search"><input id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-select-selection-search-input" style="opacity: 0;" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" type="search"></span><span class="ant-select-selection-item" title="szept">szept</span>
<div class="ant-select-selector"><span class="ant-select-selection-search"><input id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-select-selection-search-input" style="opacity: 0;" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" type="search"></span><span class="ant-select-selection-item" title="szept.">szept.</span>
<!---->
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
<!---->
@ -23468,7 +23468,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
<tbody class="ant-fullcalendar-tbody">
<tr role="row" class="">
<!---->
<td role="gridcell" title="28. avgust 2017" class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<td role="gridcell" title="28. avgust 2017." class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">28</div>
<div class="ant-fullcalendar-content">
@ -23476,7 +23476,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="29. avgust 2017" class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<td role="gridcell" title="29. avgust 2017." class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">29</div>
<div class="ant-fullcalendar-content">
@ -23484,7 +23484,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="30. avgust 2017" class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<td role="gridcell" title="30. avgust 2017." class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">30</div>
<div class="ant-fullcalendar-content">
@ -23492,7 +23492,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="31. avgust 2017" class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell ant-fullcalendar-last-day-of-month">
<td role="gridcell" title="31. avgust 2017." class="ant-fullcalendar-cell ant-fullcalendar-last-month-cell ant-fullcalendar-last-day-of-month">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">31</div>
<div class="ant-fullcalendar-content">
@ -23500,7 +23500,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="1. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="1. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">01</div>
<div class="ant-fullcalendar-content">
@ -23508,7 +23508,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="2. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="2. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">02</div>
<div class="ant-fullcalendar-content">
@ -23516,7 +23516,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="3. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="3. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">03</div>
<div class="ant-fullcalendar-content">
@ -23527,7 +23527,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</tr>
<tr role="row" class="">
<!---->
<td role="gridcell" title="4. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="4. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">04</div>
<div class="ant-fullcalendar-content">
@ -23535,7 +23535,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="5. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="5. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">05</div>
<div class="ant-fullcalendar-content">
@ -23543,7 +23543,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="6. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="6. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">06</div>
<div class="ant-fullcalendar-content">
@ -23551,7 +23551,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="7. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="7. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">07</div>
<div class="ant-fullcalendar-content">
@ -23559,7 +23559,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="8. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="8. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">08</div>
<div class="ant-fullcalendar-content">
@ -23567,7 +23567,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="9. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="9. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">09</div>
<div class="ant-fullcalendar-content">
@ -23575,7 +23575,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="10. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="10. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">10</div>
<div class="ant-fullcalendar-content">
@ -23586,7 +23586,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</tr>
<tr role="row" class="">
<!---->
<td role="gridcell" title="11. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="11. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">11</div>
<div class="ant-fullcalendar-content">
@ -23594,7 +23594,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="12. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="12. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">12</div>
<div class="ant-fullcalendar-content">
@ -23602,7 +23602,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="13. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="13. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">13</div>
<div class="ant-fullcalendar-content">
@ -23610,7 +23610,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="14. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="14. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">14</div>
<div class="ant-fullcalendar-content">
@ -23618,7 +23618,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="15. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="15. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">15</div>
<div class="ant-fullcalendar-content">
@ -23626,7 +23626,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="16. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="16. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">16</div>
<div class="ant-fullcalendar-content">
@ -23634,7 +23634,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="17. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="17. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">17</div>
<div class="ant-fullcalendar-content">
@ -23645,7 +23645,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</tr>
<tr role="row" class="ant-fullcalendar-current-week ant-fullcalendar-active-week">
<!---->
<td role="gridcell" title="18. septembar 2017" class="ant-fullcalendar-cell ant-fullcalendar-today ant-fullcalendar-selected-day">
<td role="gridcell" title="18. septembar 2017." class="ant-fullcalendar-cell ant-fullcalendar-today ant-fullcalendar-selected-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">18</div>
<div class="ant-fullcalendar-content">
@ -23653,7 +23653,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="19. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="19. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">19</div>
<div class="ant-fullcalendar-content">
@ -23661,7 +23661,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="20. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="20. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">20</div>
<div class="ant-fullcalendar-content">
@ -23669,7 +23669,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="21. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="21. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">21</div>
<div class="ant-fullcalendar-content">
@ -23677,7 +23677,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="22. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="22. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">22</div>
<div class="ant-fullcalendar-content">
@ -23685,7 +23685,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="23. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="23. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">23</div>
<div class="ant-fullcalendar-content">
@ -23693,7 +23693,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="24. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="24. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">24</div>
<div class="ant-fullcalendar-content">
@ -23704,7 +23704,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</tr>
<tr role="row" class="">
<!---->
<td role="gridcell" title="25. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="25. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">25</div>
<div class="ant-fullcalendar-content">
@ -23712,7 +23712,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="26. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="26. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">26</div>
<div class="ant-fullcalendar-content">
@ -23720,7 +23720,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="27. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="27. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">27</div>
<div class="ant-fullcalendar-content">
@ -23728,7 +23728,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="28. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="28. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">28</div>
<div class="ant-fullcalendar-content">
@ -23736,7 +23736,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="29. septembar 2017" class="ant-fullcalendar-cell">
<td role="gridcell" title="29. septembar 2017." class="ant-fullcalendar-cell">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">29</div>
<div class="ant-fullcalendar-content">
@ -23744,7 +23744,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="30. septembar 2017" class="ant-fullcalendar-cell ant-fullcalendar-last-day-of-month">
<td role="gridcell" title="30. septembar 2017." class="ant-fullcalendar-cell ant-fullcalendar-last-day-of-month">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">30</div>
<div class="ant-fullcalendar-content">
@ -23752,7 +23752,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="1. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="1. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">01</div>
<div class="ant-fullcalendar-content">
@ -23763,7 +23763,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</tr>
<tr role="row" class="">
<!---->
<td role="gridcell" title="2. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="2. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">02</div>
<div class="ant-fullcalendar-content">
@ -23771,7 +23771,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="3. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="3. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">03</div>
<div class="ant-fullcalendar-content">
@ -23779,7 +23779,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="4. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="4. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">04</div>
<div class="ant-fullcalendar-content">
@ -23787,7 +23787,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="5. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="5. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">05</div>
<div class="ant-fullcalendar-content">
@ -23795,7 +23795,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="6. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="6. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">06</div>
<div class="ant-fullcalendar-content">
@ -23803,7 +23803,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="7. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="7. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">07</div>
<div class="ant-fullcalendar-content">
@ -23811,7 +23811,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
</div>
</td>
<td role="gridcell" title="8. oktobar 2017" class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<td role="gridcell" title="8. oktobar 2017." class="ant-fullcalendar-cell ant-fullcalendar-next-month-btn-day">
<div class="ant-fullcalendar-date">
<div class="ant-fullcalendar-value">08</div>
<div class="ant-fullcalendar-content">

View File

@ -1,4 +1,4 @@
import { App, defineComponent, inject, PropType, VNodeTypes } from 'vue';
import { App, defineComponent, inject, nextTick, PropType, VNodeTypes } from 'vue';
import classNames from '../_util/classNames';
import omit from 'omit.js';
import PropTypes from '../_util/vue-types';
@ -91,7 +91,7 @@ const Mentions = defineComponent({
};
},
mounted() {
this.$nextTick(() => {
nextTick(() => {
if (process.env.NODE_ENV === 'test') {
if (this.autofocus) {
this.focus();

View File

@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Slider should show tooltip when hovering slider handler 1`] = `
<div id="app" data-v-app=""></div>
<div id="app" data-v-app="">
<div data-v-app=""></div>
<div data-v-app="">
<div tabindex="-1" class="ant-slider">
<div class="ant-slider-rail"></div>
<div class="ant-slider-track" style="left: 0%; width: 30%;"></div>
@ -29,8 +29,8 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
`;
exports[`Slider should show tooltip when hovering slider handler 2`] = `
<div id="app" data-v-app=""></div>
<div id="app" data-v-app="">
<div data-v-app=""></div>
<div data-v-app="">
<div tabindex="-1" class="ant-slider">
<div class="ant-slider-rail"></div>
<div class="ant-slider-track" style="left: 0%; width: 30%;"></div>

View File

@ -1,4 +1,4 @@
import { inject, cloneVNode, isVNode, defineComponent, VNode } from 'vue';
import { inject, cloneVNode, isVNode, defineComponent, VNode, nextTick } from 'vue';
import debounce from 'lodash-es/debounce';
import { tuple } from '../_util/type';
import PropTypes from '../_util/vue-types';
@ -61,7 +61,7 @@ export default defineComponent({
this.updateSpinning();
},
updated() {
this.$nextTick(() => {
nextTick(() => {
this.debouncifyUpdateSpinning();
this.updateSpinning();
});

View File

@ -1,4 +1,4 @@
import { watchEffect, reactive, defineComponent } from 'vue';
import { watchEffect, reactive, defineComponent, nextTick } from 'vue';
import FilterFilled from '@ant-design/icons-vue/FilterFilled';
import Menu, { SubMenu, Item as MenuItem } from '../vc-menu';
import closest from 'dom-closest';
@ -58,13 +58,13 @@ export default defineComponent({
mounted() {
const { column } = this;
this.$nextTick(() => {
nextTick(() => {
this.setNeverShown(column);
});
},
updated() {
const { column } = this;
this.$nextTick(() => {
nextTick(() => {
this.setNeverShown(column);
});
},
@ -112,7 +112,7 @@ export default defineComponent({
// Call `setSelectedKeys` & `confirm` in the same time will make filter data not up to date
// https://github.com/ant-design/ant-design/issues/12284
this.$forceUpdate();
this.$nextTick(this.confirmFilter2);
nextTick(this.confirmFilter2);
},
onVisibleChange(visible: boolean) {
@ -233,7 +233,7 @@ export default defineComponent({
},
render() {
const { sSelectedKeys: originSelectedKeys } = this;
const { sSelectedKeys: originSelectedKeys } = this as any;
const { column, locale, prefixCls, dropdownPrefixCls, getPopupContainer } = this;
// default multiple selection in filter dropdown
const multiple = 'filterMultiple' in column ? column.filterMultiple : true;
@ -267,7 +267,7 @@ export default defineComponent({
class={dropdownMenuClass}
onSelect={this.setSelectedKeys}
onDeselect={this.setSelectedKeys}
selectedKeys={originSelectedKeys && originSelectedKeys.map(val => val)}
selectedKeys={originSelectedKeys}
getPopupContainer={getPopupContainer}
children={this.renderMenus(column.filters)}
></Menu>

View File

@ -7,7 +7,7 @@ import Checkbox from '../checkbox';
import Search from './search';
import defaultRenderList from './renderListBody';
import triggerEvent from '../_util/triggerEvent';
import { defineComponent } from 'vue';
import { defineComponent, nextTick } from 'vue';
const defaultRender = () => null;
@ -96,7 +96,7 @@ export default defineComponent({
// }
},
updated() {
this.$nextTick(() => {
nextTick(() => {
if (this.scrollEvent) {
this.scrollEvent.remove();
}

View File

@ -1,4 +1,4 @@
import { defineComponent } from 'vue';
import { defineComponent, nextTick } from 'vue';
import raf from '../_util/raf';
import ListItem from './ListItem';
import PropTypes, { withUndefined } from '../_util/vue-types';
@ -35,7 +35,7 @@ const ListBody = defineComponent({
},
watch: {
itemsLength() {
this.$nextTick(() => {
nextTick(() => {
const { lazy } = this.$props;
if (lazy !== false) {
const container = findDOMNode(this);

View File

@ -1,4 +1,4 @@
import { defineComponent, inject, CSSProperties } from 'vue';
import { defineComponent, inject, CSSProperties, nextTick } from 'vue';
import BaseMixin from '../_util/BaseMixin';
import { getOptionProps, initDefaultProps } from '../_util/props-util';
import {
@ -41,7 +41,7 @@ export default defineComponent({
};
},
updated() {
this.$nextTick(() => {
nextTick(() => {
const { listType, items, previewFile } = this.$props;
if (listType !== 'picture' && listType !== 'picture-card') {
return;

View File

@ -72,7 +72,7 @@ const OptionListProps = {
* Using virtual list of option display.
* Will fallback to dom if use customize render.
*/
const OptionList = defineComponent<OptionListProps, { state: any }>({
const OptionList = defineComponent<OptionListProps, { state?: any }>({
name: 'OptionList',
inheritAttrs: false,
setup(props) {

View File

@ -52,7 +52,7 @@ import omit from 'lodash-es/omit';
const RefSelect = generateSelector<SelectOptionsType>({
prefixCls: 'rc-select',
components: {
optionList: SelectOptionList,
optionList: SelectOptionList as any,
},
convertChildrenToData: convertSelectChildrenToData,
flattenOptions,

View File

@ -281,7 +281,7 @@ export interface SelectProps<OptionsType extends object[], ValueType> {
export interface GenerateConfig<OptionsType extends object[]> {
prefixCls: string;
components: {
optionList: DefineComponent<Omit<OptionListProps, 'options'> & { options: OptionsType }>;
optionList: DefineComponent<Omit<OptionListProps, 'options'> & { options?: OptionsType }>;
};
/** Convert jsx tree into `OptionsType` */
convertChildrenToData: (children: VNodeChild | JSX.Element) => OptionsType;
@ -321,7 +321,7 @@ export default function generateSelector<
key?: Key;
disabled?: boolean;
}[]
>(config: GenerateConfig<OptionsType>): DefineComponent<SelectProps<OptionsType, ValueType>> {
>(config: GenerateConfig<OptionsType>) {
const {
prefixCls: defaultPrefixCls,
components: { optionList: OptionList },
@ -334,7 +334,7 @@ export default function generateSelector<
warningProps,
fillOptionsWithMissingValue,
omitDOMProps,
} = config;
} = config as any;
const Select = defineComponent<SelectProps<OptionsType, ValueType>>({
name: 'Select',
setup(props: SelectProps<OptionsType, ValueType>) {

View File

@ -1,5 +1,9 @@
// Vue.config.silent = true
import { config } from '@vue/test-utils';
config.global.stubs = {
transition: false,
'transition-group': false,
};
/* eslint-disable global-require */
if (typeof window !== 'undefined') {
global.window.resizeTo = (width, height) => {