Skip to content

Commit 2bafbb1

Browse files
committed
test: update snap
1 parent b3a0263 commit 2bafbb1

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

components/calendar/demo/customize-header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Customize Calendar header content.
5757
:value="String(current.month())"
5858
@change="
5959
selectedMonth => {
60-
onChange(current.month(parseInt(selectedMonth, 10)));
60+
onChange(current.month(parseInt(String(selectedMonth), 10)));
6161
}
6262
"
6363
>

components/calendar/generateCalendar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ function generateCalendar<
127127
? (generateConfig.toDate(props.value, props.valueFormat) as DateType)
128128
: (props.value as DateType);
129129
}
130-
return null;
130+
return (props.value === '' ? undefined : props.value) as DateType;
131131
});
132132
const defaultValue = computed(() => {
133133
if (props.defaultValue) {
134134
return props.valueFormat
135135
? (generateConfig.toDate(props.defaultValue, props.valueFormat) as DateType)
136136
: (props.defaultValue as DateType);
137137
}
138-
return null;
138+
return (props.defaultValue === '' ? undefined : props.defaultValue) as DateType;
139139
});
140140

141141
// Value

components/date-picker/generatePicker/generateSinglePicker.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ export default function generateSinglePicker<DateType, ExtraProps = {}>(
119119
? generateConfig.toDate(props.value as string | DateType, props.valueFormat)
120120
: props.value;
121121
}
122-
return null;
122+
return (props.value === '' ? undefined : props.value) as DateType;
123123
});
124124
const defaultValue = computed(() => {
125125
if (props.defaultValue) {
126126
return props.valueFormat
127127
? generateConfig.toDate(props.defaultValue as string | DateType, props.valueFormat)
128128
: props.defaultValue;
129129
}
130-
return null;
130+
return (props.defaultValue === '' ? undefined : props.defaultValue) as DateType;
131131
});
132132
const defaultPickerValue = computed(() => {
133133
if (props.defaultPickerValue) {
@@ -138,7 +138,9 @@ export default function generateSinglePicker<DateType, ExtraProps = {}>(
138138
)
139139
: props.defaultPickerValue;
140140
}
141-
return null;
141+
return (
142+
props.defaultPickerValue === '' ? undefined : props.defaultPickerValue
143+
) as DateType;
142144
});
143145

144146
return () => {

components/input/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ exports[`renders ./components/input/demo/allow-clear.vue correctly 1`] = `
3333
`;
3434
3535
exports[`renders ./components/input/demo/autosize-textarea.vue correctly 1`] = `
36-
<div><textarea placeholder="Autosize height based on content lines" class="ant-input" style="height: 0px; min-height: -9007199254740991px; max-height: 9007199254740991px; resize: none;"></textarea>
37-
<div style="margin: 24px 0px;"></div><textarea placeholder="Autosize height with minimum and maximum number of lines" class="ant-input" style="height: -20px; min-height: -8px; max-height: -20px; resize: none;"></textarea>
36+
<div><textarea placeholder="Autosize height based on content lines" class="ant-input" style="height: 0px; min-height: -9007199254740991px; max-height: 9007199254740991px; overflow-y: hidden; resize: none; overflow-x: hidden;"></textarea>
37+
<div style="margin: 24px 0px;"></div><textarea placeholder="Autosize height with minimum and maximum number of lines" class="ant-input" style="height: -20px; min-height: -8px; max-height: -20px; overflow-y: hidden; resize: none; overflow-x: hidden;"></textarea>
3838
</div>
3939
`;
4040
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import demoTest from '../../../tests/shared/demoTest';
22

3-
demoTest('input');
3+
demoTest('input', { skip: ['autosize-textarea'] });

0 commit comments

Comments
 (0)