Skip to content

Commit 48ab5a2

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-v4
2 parents ae27d43 + 1977074 commit 48ab5a2

File tree

30 files changed

+239
-131
lines changed

30 files changed

+239
-131
lines changed

.github/PULL_REQUEST_TEMPLATE/pr_cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
首先,感谢你的贡献! 😄
22

3-
新特性请提交至 feature 分支,其余可提交至 master 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
3+
新特性请提交至 feature 分支,其余可提交至 main 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
44

5-
[[English Template / 英文模板](?expand=1)]
5+
[[English Template / 英文模板](./pr_en.md)]
66

77
### 这个变动的性质是
88

.github/PULL_REQUEST_TEMPLATE.md renamed to .github/PULL_REQUEST_TEMPLATE/pr_en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
First of all, thank you for your contribution! 😄
22

3-
New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
3+
New feature please send pull request to feature branch, and rest to main branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
44

5-
[[中文版模板 / Chinese template](https://github.com/vueComponent/ant-design-vue/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)]
5+
[[中文版模板 / Chinese template](./pr_cn.md)]
66

77
### This is a ...
88

.github/workflows/translate.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

CHANGELOG.en-US.md

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

60+
## 3.2.17
61+
62+
`2023-04-04`
63+
64+
- 🐞 revert [#6324](https://github.com/vueComponent/ant-design-vue/issues/6324),fix table filter hidden error [#6400](https://github.com/vueComponent/ant-design-vue/issues/6400)
65+
66+
## 3.2.16
67+
68+
`2023-03-23`
69+
70+
- 🐞 Fix notification close event triggered multiple times [#6150](https://github.com/vueComponent/ant-design-vue/issues/6150)
71+
- 🐞 Fix the carousel map responsive change problem [#6100](https://github.com/vueComponent/ant-design-vue/issues/6100)
72+
- 🐞 Fix Table ceiling scroll bar style error [#6169](https://github.com/vueComponent/ant-design-vue/issues/6169)
73+
- 🐞 Fix DatePicker disabledMinutes parameter error [#6233](https://github.com/vueComponent/ant-design-vue/issues/6233)
74+
- 🐞 Fix the problem that the visibleChange event is not triggered when the Popup is closed [#6324](https://github.com/vueComponent/ant-design-vue/issues/6324)
75+
- 🐞 Fix Image preview image error [#6331](https://github.com/vueComponent/ant-design-vue/issues/6331)
76+
6077
## 3.2.15
6178

6279
`2022-11-10`

CHANGELOG.zh-CN.md

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

60+
## 3.2.17
61+
62+
`2023-04-04`
63+
64+
- 🐞 回滚 [#6324](https://github.com/vueComponent/ant-design-vue/issues/6324),解决引起的 Table 过滤器隐藏问题 [#6400](https://github.com/vueComponent/ant-design-vue/issues/6400)
65+
66+
## 3.2.16
67+
68+
`2023-03-23`
69+
70+
- 🐞 修复 notification close 事件多次触发问题 [#6150](https://github.com/vueComponent/ant-design-vue/issues/6150)
71+
- 🐞 修复轮播图响应式变化问题 [#6100](https://github.com/vueComponent/ant-design-vue/issues/6100)
72+
- 🐞 修复 Table 吸顶滚动条样式错误问题 [#6169](https://github.com/vueComponent/ant-design-vue/issues/6169)
73+
- 🐞 修复 DatePicker disabledMinutes 参数错误 [#6233](https://github.com/vueComponent/ant-design-vue/issues/6233)
74+
- 🐞 修复 Popup 关闭时没有触发 visibleChange 事件问题 [#6324](https://github.com/vueComponent/ant-design-vue/issues/6324)
75+
- 🐞 修复 Image 预览图片错误问题 [#6331](https://github.com/vueComponent/ant-design-vue/issues/6331)
76+
6077
## 3.2.15
6178

6279
`2022-11-10`

components/date-picker/__tests__/QuarterPicker.test.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,28 @@ const { QuarterPicker } = DatePicker;
66
jest.mock('../../_util/Portal');
77
describe('QuarterPicker', () => {
88
focusTest(QuarterPicker);
9-
fit('reset select item when popup close', async () => {
9+
it('reset select item when popup close', async () => {
1010
const wrapper = mount(DatePicker, {
1111
props: { style: { width: '400px' }, picker: 'quarter' },
1212
sync: false,
1313
attachTo: 'body',
1414
});
1515
expect(wrapper.html()).toMatchSnapshot();
1616
});
17+
18+
it('test QuarterPicker valueFormat', async () => {
19+
const case1 = '2023-1';
20+
const wrapper = mount(DatePicker, {
21+
props: {
22+
picker: 'quarter',
23+
format: 'YYYY-Q',
24+
valueFormat: 'YYYY-Q',
25+
value: case1,
26+
},
27+
sync: false,
28+
attachTo: 'body',
29+
});
30+
const input = wrapper.find('input');
31+
expect(input.element.value).toBe(case1);
32+
});
1733
});

components/date-picker/__tests__/RangePicker.test.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,25 @@ describe('RangePicker', () => {
6969
await sleep();
7070
expect(wrapper.html()).toMatchSnapshot();
7171
});
72+
73+
fit('test WeekPicker valueFormat', async () => {
74+
const case1 = ['2023-22', '2023-24'];
75+
const case2 = ['2023-27', '2023-28'];
76+
const wrapper = mount(RangePicker, {
77+
props: {
78+
picker: 'week',
79+
format: 'YYYY-ww',
80+
valueFormat: 'YYYY-ww',
81+
value: case1,
82+
},
83+
sync: false,
84+
attachTo: 'body',
85+
});
86+
const inputs = wrapper.findAll('input');
87+
expect((inputs[0].element.value, inputs[1].element.value)).toBe((case1[0], case1[1]));
88+
await asyncExpect(() => {
89+
wrapper.setProps({ value: case2 });
90+
});
91+
expect((inputs[0].element.value, inputs[1].element.value)).toBe((case2[0], case2[1]));
92+
});
7293
});

components/date-picker/__tests__/__snapshots__/QuarterPicker.test.js.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ exports[`QuarterPicker reset select item when popup close 1`] = `
1414
<div class="ant-picker-quarter-panel">
1515
<div class="ant-picker-header"><button type="button" tabindex="-1" class="ant-picker-header-super-prev-btn"><span class="ant-picker-super-prev-icon"></span></button>
1616
<!---->
17-
<div class="ant-picker-header-view"><button type="button" class="ant-picker-year-btn">2022</button></div>
17+
<div class="ant-picker-header-view"><button type="button" class="ant-picker-year-btn">2023</button></div>
1818
<!----><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn"><span class="ant-picker-super-next-icon"></span></button>
1919
</div>
2020
<div class="ant-picker-body">
2121
<table class="ant-picker-content">
2222
<!---->
2323
<tbody>
2424
<tr>
25-
<td title="2022-Q1" class="ant-picker-cell ant-picker-cell-in-view">
25+
<td title="2023-Q1" class="ant-picker-cell ant-picker-cell-in-view">
2626
<div class="ant-picker-cell-inner">Q1</div>
2727
</td>
28-
<td title="2022-Q2" class="ant-picker-cell ant-picker-cell-in-view">
28+
<td title="2023-Q2" class="ant-picker-cell ant-picker-cell-in-view">
2929
<div class="ant-picker-cell-inner">Q2</div>
3030
</td>
31-
<td title="2022-Q3" class="ant-picker-cell ant-picker-cell-in-view">
31+
<td title="2023-Q3" class="ant-picker-cell ant-picker-cell-in-view">
3232
<div class="ant-picker-cell-inner">Q3</div>
3333
</td>
34-
<td title="2022-Q4" class="ant-picker-cell ant-picker-cell-in-view">
34+
<td title="2023-Q4" class="ant-picker-cell ant-picker-cell-in-view">
3535
<div class="ant-picker-cell-inner">Q4</div>
3636
</td>
3737
</tr>

components/date-picker/generatePicker/generateRangePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default function generateRangePicker<DateType, ExtraProps = {}>(
8686
const maybeToStrings = (dates: DateType[]) => {
8787
return props.valueFormat ? generateConfig.toString(dates, props.valueFormat) : dates;
8888
};
89-
const onChange = (dates: [DateType, DateType], dateStrings: [string, string]) => {
89+
const onChange = (dates: RangeValue<DateType>, dateStrings: [string, string]) => {
9090
const values = maybeToStrings(dates);
9191
emit('update:value', values);
9292
emit('change', values, dateStrings);

components/date-picker/generatePicker/props.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ function commonProps<DateType = any>() {
5353
defaultOpen: booleanType(),
5454
/** Make input readOnly to avoid popup keyboard in mobile */
5555
inputReadOnly: booleanType(),
56+
format: someType<string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[]>([
57+
String,
58+
Function,
59+
Array,
60+
]),
5661
// Value
5762
// format: string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
5863
// Render
@@ -125,6 +130,7 @@ export interface CommonProps<DateType> {
125130
open?: boolean;
126131
defaultOpen?: boolean;
127132
inputReadOnly?: boolean;
133+
format?: string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
128134
suffixIcon?: VueNode;
129135
clearIcon?: VueNode;
130136
prevIcon?: VueNode;
@@ -171,11 +177,6 @@ function datePickerProps<DateType = any>() {
171177
defaultValue: someType<DateType | string>([Object, String]),
172178
value: someType<DateType | string>([Object, String]),
173179
disabledTime: functionType<DisabledTime<DateType>>(),
174-
format: someType<string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[]>([
175-
String,
176-
Function,
177-
Array,
178-
]),
179180
renderExtraFooter: functionType<(mode: PanelMode) => VueNode>(),
180181
showNow: booleanType(),
181182
monthCellRender: functionType<MonthCellRender<DateType>>(),
@@ -189,7 +190,6 @@ export interface DatePickerProps<DateType> {
189190
defaultValue?: DateType | string;
190191
value?: DateType | string;
191192
disabledTime?: DisabledTime<DateType>;
192-
format?: string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
193193
renderExtraFooter?: (mode: PanelMode) => VueNode;
194194
showNow?: boolean;
195195
monthCellRender?: MonthCellRender<DateType>;
@@ -206,7 +206,6 @@ function rangePickerProps<DateType>() {
206206
value: arrayType<RangeValue<DateType> | RangeValue<string>>(),
207207
disabledTime: functionType<(date: EventValue<DateType>, type: RangeType) => DisabledTimes>(),
208208
disabled: someType<boolean | [boolean, boolean]>([Boolean, Array]),
209-
format: String,
210209
renderExtraFooter: functionType<() => VueNode>(),
211210
separator: { type: String },
212211
showTime: someType<boolean | RangeShowTimeObject<DateType>>([Boolean, Object]),
@@ -252,7 +251,6 @@ export interface RangePickerProps<DateType> {
252251
value?: RangeValue<DateType> | RangeValue<string>;
253252
disabledTime?: (date: EventValue<DateType>, type: RangeType) => DisabledTimes;
254253
disabled?: [boolean, boolean];
255-
format?: string;
256254
renderExtraFooter?: () => VueNode;
257255
separator?: string;
258256
showTime?: boolean | RangeShowTimeObject<DateType>;

0 commit comments

Comments
 (0)