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

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

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

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

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

+2-1
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

+5-3
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

+51-51
Large diffs are not rendered by default.

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

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

-1
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

+1-1
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;

components/vc-time-picker/TimePicker.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ export default defineComponent({
341341
name,
342342
autocomplete,
343343
autofocus,
344-
inputReadOnly,
345344
sOpen,
346345
sValue,
347346
onFocus,
@@ -381,7 +380,7 @@ export default defineComponent({
381380
onFocus={onFocus}
382381
onBlur={onBlur}
383382
autofocus={autofocus}
384-
readonly={!!inputReadOnly}
383+
readonly
385384
id={id}
386385
/>
387386
{inputIcon || <span class={`${prefixCls}-icon`} />}

components/vc-tree-select/src/SearchInput.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const SearchInput = {
2121
needAlign: PropTypes.looseBool,
2222
ariaId: PropTypes.string,
2323
isMultiple: PropTypes.looseBool.def(true),
24+
showSearch: PropTypes.looseBool,
2425
},
2526
emits: ['mirrorSearchValueChange'],
2627
setup(props, { emit }) {
@@ -126,6 +127,7 @@ const SearchInput = {
126127
open,
127128
ariaId,
128129
isMultiple,
130+
showSearch,
129131
} = this.$props;
130132
const {
131133
vcTreeSelect: { onSearchInputKeyDown },
@@ -146,6 +148,7 @@ const SearchInput = {
146148
onKeydown={onSearchInputKeyDown}
147149
value={searchValue}
148150
disabled={disabled}
151+
readonly={!showSearch}
149152
class={`${prefixCls}-selection-search-input`}
150153
aria-label="filter select"
151154
aria-autocomplete="list"

components/vc-virtual-list/List.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const List = defineComponent({
144144
end: state.mergedData.length - 1,
145145
offset: undefined,
146146
};
147+
return;
147148
}
148149

149150
// Always use virtual scroll bar in avoid shaking
@@ -154,6 +155,7 @@ const List = defineComponent({
154155
end: state.mergedData.length - 1,
155156
offset: undefined,
156157
};
158+
return;
157159
}
158160

159161
let itemTop = 0;

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ant-design-vue",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"title": "Ant Design Vue",
55
"description": "An enterprise-class UI design language and Vue-based implementation",
66
"keywords": [
@@ -89,7 +89,7 @@
8989
"@typescript-eslint/parser": "^4.1.0",
9090
"@vue/babel-plugin-jsx": "^1.0.0",
9191
"@vue/cli-plugin-eslint": "^4.0.0",
92-
"@vue/compiler-sfc": "^3.0.9",
92+
"@vue/compiler-sfc": "3.0.10",
9393
"@vue/eslint-config-prettier": "^6.0.0",
9494
"@vue/eslint-config-typescript": "^7.0.0",
9595
"@vue/test-utils": "^2.0.0-0",
@@ -112,7 +112,7 @@
112112
"compare-versions": "^3.3.0",
113113
"cross-env": "^7.0.0",
114114
"css-loader": "^5.0.0",
115-
"css-minimizer-webpack-plugin": "^2.0.0",
115+
"css-minimizer-webpack-plugin": "^3.0.0",
116116
"deep-assign": "^3.0.0",
117117
"docsearch.js": "^2.6.3",
118118
"enquire-js": "^0.2.1",
@@ -141,7 +141,7 @@
141141
"json-templater": "^1.2.0",
142142
"jsonp": "^0.2.1",
143143
"less": "^4.0.0",
144-
"less-loader": "^8.0.0",
144+
"less-loader": "^9.0.0",
145145
"less-plugin-npm-import": "^2.1.0",
146146
"less-vars-to-js": "^1.3.0",
147147
"lint-staged": "^11.0.0",
@@ -179,7 +179,7 @@
179179
"umi-mock-middleware": "^1.0.0",
180180
"umi-request": "^1.3.5",
181181
"url-loader": "^3.0.0",
182-
"vue": "^3.0.9",
182+
"vue": "3.0.10",
183183
"vue-antd-md-loader": "^1.2.1-beta.1",
184184
"vue-clipboard2": "0.3.1",
185185
"vue-draggable-resizable": "^2.1.0",

0 commit comments

Comments
 (0)