Skip to content

Commit 98be707

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-v4
2 parents 5439e0c + 019b539 commit 98be707

File tree

8 files changed

+128
-59
lines changed

8 files changed

+128
-59
lines changed

CHANGELOG.en-US.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@
5757
- 💄 优化 Upload 操作按钮的样式细节。
5858
- 🐞 修复 Switch 在暗黑主题下关闭时的颜色问题。
5959

60+
## 3.2.20
61+
62+
`2023-04-27`
63+
64+
- 🌟 Optimize the repeated instantiation of Space subcomponents [#6500](https://github.com/vueComponent/ant-design-vue/issues/6500)
65+
- 🐞 Fix RangePicker does not support null value problem [#6510](https://github.com/vueComponent/ant-design-vue/issues/6510)
66+
67+
## 3.2.19
68+
69+
`2023-04-23`
70+
71+
- 🐞 Fix antd.min.js file error
72+
73+
## 3.2.18
74+
75+
`2023-04-23`
76+
77+
- 🐞 Fix the style of input addonAfter when Form disabled [#6403](https://github.com/vueComponent/ant-design-vue/issues/6403)
78+
- 🐞 Fix Upload class name error [#6413](https://github.com/vueComponent/ant-design-vue/issues/6413)
79+
- 🐞 Fix date component's week, quarter does not support format problem [#6385](https://github.com/vueComponent/ant-design-vue/issues/6385)
80+
- 🐞 Fix the problem that Select scrolls under Firefox [#6470](https://github.com/vueComponent/ant-design-vue/issues/6470)
81+
- 🌟 Button added focus and blur methods [#6483](https://github.com/vueComponent/ant-design-vue/issues/6483)
82+
- 🐞 Fix the problem that the container height changes after Select is selected [#6467](https://github.com/vueComponent/ant-design-vue/issues/6467)
83+
- 🐞 Fix Form name not taking effect [#6460](https://github.com/vueComponent/ant-design-vue/issues/6460)
84+
6085
## 3.2.17
6186

6287
`2023-04-04`

CHANGELOG.zh-CN.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@
5757
- 💄 优化 Upload 操作按钮的样式细节。
5858
- 🐞 修复 Switch 在暗黑主题下关闭时的颜色问题。
5959

60+
## 3.2.20
61+
62+
`2023-04-27`
63+
64+
- 🌟 优化 Space 子组件重复实例化问题 [#6500](https://github.com/vueComponent/ant-design-vue/issues/6500)
65+
- 🐞 修复 RangePicker 不支持空值问题 [#6510](https://github.com/vueComponent/ant-design-vue/issues/6510)
66+
67+
## 3.2.19
68+
69+
`2023-04-23`
70+
71+
- 🐞 修复 antd.min.js 文件错误
72+
73+
## 3.2.18
74+
75+
`2023-04-23`
76+
77+
- 🐞 修复 input addonAfter 在 Form diabled 时的样式 [#6403](https://github.com/vueComponent/ant-design-vue/issues/6403)
78+
- 🐞 修复 Upload 类名错误 [#6413](https://github.com/vueComponent/ant-design-vue/issues/6413)
79+
- 🐞 修复日期组件的 周、季度 不支持 format 问题 [#6385](https://github.com/vueComponent/ant-design-vue/issues/6385)
80+
- 🐞 修复 Select 在 Firefox 下滚动显示异常问题 [#6470](https://github.com/vueComponent/ant-design-vue/issues/6470)
81+
- 🌟 Button 新增 focus、blur 方法 [#6483](https://github.com/vueComponent/ant-design-vue/issues/6483)
82+
- 🐞 修复 Select 选中后导致容器高度变化问题 [#6467](https://github.com/vueComponent/ant-design-vue/issues/6467)
83+
- 🐞 修复 Form name 未生效问题 [#6460](https://github.com/vueComponent/ant-design-vue/issues/6460)
84+
6085
## 3.2.17
6186

6287
`2023-04-04`

components/affix/index.tsx

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,18 @@ const Affix = defineComponent({
110110
const newState = {
111111
status: AffixStatus.None,
112112
} as AffixState;
113-
const targetRect = getTargetRect(targetNode);
114113
const placeholderRect = getTargetRect(placeholderNode.value as HTMLElement);
114+
115+
if (
116+
placeholderRect.top === 0 &&
117+
placeholderRect.left === 0 &&
118+
placeholderRect.width === 0 &&
119+
placeholderRect.height === 0
120+
) {
121+
return;
122+
}
123+
124+
const targetRect = getTargetRect(targetNode);
115125
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop.value);
116126
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom.value);
117127
if (
@@ -122,27 +132,34 @@ const Affix = defineComponent({
122132
) {
123133
return;
124134
}
135+
125136
if (fixedTop !== undefined) {
137+
const width = `${placeholderRect.width}px`;
138+
const height = `${placeholderRect.height}px`;
139+
126140
newState.affixStyle = {
127141
position: 'fixed',
128142
top: fixedTop,
129-
width: placeholderRect.width + 'px',
130-
height: placeholderRect.height + 'px',
143+
width,
144+
height,
131145
};
132146
newState.placeholderStyle = {
133-
width: placeholderRect.width + 'px',
134-
height: placeholderRect.height + 'px',
147+
width,
148+
height,
135149
};
136150
} else if (fixedBottom !== undefined) {
151+
const width = `${placeholderRect.width}px`;
152+
const height = `${placeholderRect.height}px`;
153+
137154
newState.affixStyle = {
138155
position: 'fixed',
139156
bottom: fixedBottom,
140-
width: placeholderRect.width + 'px',
141-
height: placeholderRect.height + 'px',
157+
width,
158+
height,
142159
};
143160
newState.placeholderStyle = {
144-
width: placeholderRect.width + 'px',
145-
height: placeholderRect.height + 'px',
161+
width,
162+
height,
146163
};
147164
}
148165

components/menu/__tests__/index.test.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,27 @@ describe('Menu', () => {
101101
});
102102
});
103103

104-
it('should accept openKeys in mode vertical', async () => {
105-
mount(
106-
{
107-
render() {
108-
return (
109-
<Menu openKeys={['1']} mode="vertical">
110-
<SubMenu key="1" title="submenu1">
111-
<Menu.Item key="submenu1">Option 1</Menu.Item>
112-
<Menu.Item key="submenu2">Option 2</Menu.Item>
113-
</SubMenu>
114-
<Menu.Item key="2">menu2</Menu.Item>
115-
</Menu>
116-
);
117-
},
118-
},
119-
{ attachTo: 'body', sync: false },
120-
);
121-
await asyncExpect(() => {
122-
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
123-
}, 100);
124-
});
104+
// it('should accept openKeys in mode vertical', async () => {
105+
// mount(
106+
// {
107+
// render() {
108+
// return (
109+
// <Menu openKeys={['1']} mode="vertical">
110+
// <SubMenu key="1" title="submenu1">
111+
// <Menu.Item key="submenu1">Option 1</Menu.Item>
112+
// <Menu.Item key="submenu2">Option 2</Menu.Item>
113+
// </SubMenu>
114+
// <Menu.Item key="2">menu2</Menu.Item>
115+
// </Menu>
116+
// );
117+
// },
118+
// },
119+
// { attachTo: 'body', sync: false },
120+
// );
121+
// await asyncExpect(() => {
122+
// expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
123+
// }, 100);
124+
// });
125125

126126
it('horizontal', async () => {
127127
mount(

components/space/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue';
2-
import { defineComponent, computed, ref, watch } from 'vue';
2+
import { defineComponent, computed, ref, watch, Fragment } from 'vue';
33
import PropTypes from '../_util/vue-types';
44
import { filterEmpty } from '../_util/props-util';
55
import type { SizeType } from '../config-provider';
@@ -85,8 +85,8 @@ const Space = defineComponent({
8585
});
8686
return () => {
8787
const { wrap, direction = 'horizontal' } = props;
88-
89-
const items = filterEmpty(slots.default?.());
88+
const children = slots.default?.();
89+
const items = filterEmpty(children);
9090
const len = items.length;
9191

9292
if (len === 0) {
@@ -99,6 +99,7 @@ const Space = defineComponent({
9999
return (
100100
<div {...attrs} class={cn.value} style={[style.value, attrs.style as any]}>
101101
{items.map((child, index) => {
102+
const originIndex = children.indexOf(child);
102103
let itemStyle: CSSProperties = {};
103104
if (!supportFlexGap.value) {
104105
if (direction === 'vertical') {
@@ -116,7 +117,7 @@ const Space = defineComponent({
116117
}
117118

118119
return wrapSSR(
119-
<>
120+
<Fragment key={originIndex}>
120121
<div class={itemClassName} style={itemStyle}>
121122
{child}
122123
</div>
@@ -125,7 +126,7 @@ const Space = defineComponent({
125126
{split}
126127
</span>
127128
)}
128-
</>,
129+
</Fragment>,
129130
);
130131
})}
131132
</div>

components/typography/__tests__/index.test.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,32 @@ describe('Typography', () => {
6767
const fullStr =
6868
'Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light Bamboo is Little Light';
6969

70-
it('should trigger update', async () => {
71-
const onEllipsis = jest.fn();
72-
const wrapper = mount(Base, {
73-
props: {
74-
ellipsis: { onEllipsis },
75-
component: 'p',
76-
editable: true,
77-
content: fullStr,
78-
},
79-
});
70+
// xit('should trigger update', async () => {
71+
// const onEllipsis = jest.fn();
72+
// const wrapper = mount(Base, {
73+
// props: {
74+
// ellipsis: { onEllipsis },
75+
// component: 'p',
76+
// editable: true,
77+
// content: fullStr,
78+
// },
79+
// });
8080

81-
await sleep(20);
81+
// await sleep(20);
8282

83-
expect(wrapper.text()).toEqual('Bamboo is Little ...');
84-
expect(onEllipsis).toHaveBeenCalledWith(true);
85-
onEllipsis.mockReset();
86-
wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
87-
await sleep(300);
88-
expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
89-
expect(onEllipsis).not.toHaveBeenCalled();
83+
// expect(wrapper.text()).toEqual('Bamboo is Little ...');
84+
// expect(onEllipsis).toHaveBeenCalledWith(true);
85+
// onEllipsis.mockReset();
86+
// wrapper.setProps({ ellipsis: { rows: 2, onEllipsis } });
87+
// await sleep(300);
88+
// expect(wrapper.text()).toEqual('Bamboo is Little Light Bamboo is Litt...');
89+
// expect(onEllipsis).not.toHaveBeenCalled();
9090

91-
wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
92-
await sleep(20);
93-
expect(wrapper.find('p').text()).toEqual(fullStr);
94-
expect(onEllipsis).toHaveBeenCalledWith(false);
95-
});
91+
// wrapper.setProps({ ellipsis: { rows: 99, onEllipsis } });
92+
// await sleep(20);
93+
// expect(wrapper.find('p').text()).toEqual(fullStr);
94+
// expect(onEllipsis).toHaveBeenCalledWith(false);
95+
// });
9696

9797
it('should middle ellipsis', async () => {
9898
const suffix = '--suffix';

components/vc-picker/generate/dayjs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function findTargetStr(val: string, index: number, segmentation: string) {
123123
}
124124

125125
const toDateWithValueFormat = (val: string | Dayjs, valueFormat: string) => {
126+
if (!val) return null;
126127
if (dayjs.isDayjs(val)) {
127128
return val;
128129
}

components/vc-virtual-list/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// base rc-virtual-list 3.4.2
1+
// base rc-virtual-list 3.4.13
22
import List from './List';
33

44
export default List;

0 commit comments

Comments
 (0)