Skip to content

Commit 0d02391

Browse files
committed
Merge remote-tracking branch 'origin/next' into v3
# Conflicts: # components/avatar/style/index.less # v2-doc
2 parents 2b0afda + b91659e commit 0d02391

File tree

14 files changed

+88
-66
lines changed

14 files changed

+88
-66
lines changed

CHANGELOG.en-US.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
---
1212

13+
## 2.1.6
14+
15+
`2021-05-13`
16+
17+
- 🐞 Use [email protected] to rebuild to avoid console warning [#3998](https://github.com/vueComponent/ant-design-vue/issues/3998)
18+
1319
## 2.1.5
1420

1521
`2021-05-12`

CHANGELOG.zh-CN.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
---
1212

13+
## 2.1.6
14+
15+
`2021-05-13`
16+
17+
- 🐞 使用 [email protected] 重新构建,避免控制台 warning [#3998](https://github.com/vueComponent/ant-design-vue/issues/3998)
18+
1319
## 2.1.5
1420

1521
`2021-05-12`

components/_util/props-util/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ export function isEmptyElement(c) {
341341
);
342342
}
343343

344+
export function isEmptySlot(c) {
345+
return !c || c().every(isEmptyElement);
346+
}
347+
344348
export function isStringElement(c) {
345349
return c && c.type === Text;
346350
}

components/auto-complete/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const AutoComplete = defineComponent({
2828
props: {
2929
...AutoCompleteProps,
3030
prefixCls: PropTypes.string.def('ant-select'),
31-
showSearch: PropTypes.looseBool.def(false),
31+
showSearch: PropTypes.looseBool,
3232
transitionName: PropTypes.string.def('slide-up'),
3333
choiceTransitionName: PropTypes.string.def('zoom'),
3434
autofocus: PropTypes.looseBool,

components/date-picker/createPicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { hasProp, getOptionProps, getComponent, isValidElement } from '../_util/
1414
import { cloneElement } from '../_util/vnode';
1515
import { formatDate } from './utils';
1616
import { getDataAndAriaProps } from '../_util/util';
17+
import { isEmptySlot } from '../_util/props-util';
1718

1819
export interface PickerProps {
1920
value?: moment.Moment;
@@ -255,7 +256,7 @@ export default function createPicker<P>(
255256
>
256257
<VcDatePicker
257258
{...vcDatePickerProps}
258-
v-slots={{ default: input, ...$slots }}
259+
v-slots={{ ...$slots, default: isEmptySlot($slots.default) ? input : $slots.default }}
259260
></VcDatePicker>
260261
</span>
261262
);

components/input-number/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent, inject, nextTick, onMounted, ref, PropType } from 'vue';
1+
import { defineComponent, inject, nextTick, onMounted, ref, PropType, ExtractPropTypes } from 'vue';
22
import PropTypes from '../_util/vue-types';
33
import { getOptionProps } from '../_util/props-util';
44
import classNames from '../_util/classNames';
@@ -8,7 +8,7 @@ import VcInputNumber from '../vc-input-number/src';
88
import { defaultConfigProvider } from '../config-provider';
99
import { tuple, withInstall } from '../_util/type';
1010

11-
const InputNumberProps = {
11+
const inputNumberProps = {
1212
prefixCls: PropTypes.string,
1313
min: PropTypes.number,
1414
max: PropTypes.number,
@@ -32,10 +32,12 @@ const InputNumberProps = {
3232
onChange: Function as PropType<(num: number) => void>,
3333
};
3434

35+
export type InputNumberProps = Partial<ExtractPropTypes<typeof inputNumberProps>>;
36+
3537
const InputNumber = defineComponent({
3638
name: 'AInputNumber',
3739
inheritAttrs: false,
38-
props: InputNumberProps,
40+
props: inputNumberProps,
3941
setup(props) {
4042
const inputNumberRef = ref(null);
4143
const focus = () => {

components/locale-provider/__tests__/__snapshots__/index.test.js.snap

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

components/time-picker/__tests__/__snapshots__/index.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`TimePicker not render clean icon when allowClear is false 1`] = `
4-
<!----><span class="ant-time-picker"><input class="ant-time-picker-input" type="text" placeholder="Select time"><span class="ant-time-picker-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg class="" data-icon="clock-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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></span></span>
4+
<!----><span class="ant-time-picker"><input class="ant-time-picker-input" type="text" placeholder="Select time" readonly=""><span class="ant-time-picker-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg class="" data-icon="clock-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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></span></span>
55
<!----></span>
66
`;
77

components/tree-select/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const TreeSelect = defineComponent({
2626
props: initDefaultProps(TreeSelectProps(), {
2727
transitionName: 'slide-up',
2828
choiceTransitionName: '',
29-
showSearch: false,
3029
}),
3130
setup() {
3231
return {

components/vc-input-number/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export default defineComponent({
292292
});
293293
const value = this.getCurrentValidValue(this.$data.inputValue);
294294
const newValue = this.setValue(value);
295-
if (this.$attrs.onBlur) {
295+
if (this.$attrs.onBlur && this.inputRef) {
296296
const originValue = this.inputRef.value;
297297
const inputValue = this.getInputDisplayValue({ focused: false, sValue: newValue });
298298
this.inputRef.value = inputValue;

0 commit comments

Comments
 (0)