test(Calendar): add test cases
This commit is contained in:
@@ -12,10 +12,7 @@ export default createComponent({
|
||||
methods: {
|
||||
genTitle() {
|
||||
const title = this.slots('title') || this.title || t('title');
|
||||
|
||||
if (title) {
|
||||
return <div class={bem('header-title')}>{title}</div>;
|
||||
}
|
||||
return <div class={bem('header-title')}>{title}</div>;
|
||||
},
|
||||
|
||||
genMonth() {
|
||||
|
||||
@@ -49,10 +49,6 @@ export default createComponent({
|
||||
},
|
||||
|
||||
days() {
|
||||
if (!this.visible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const days = [];
|
||||
const year = this.date.getFullYear();
|
||||
const month = this.date.getMonth();
|
||||
@@ -95,6 +91,7 @@ export default createComponent({
|
||||
return compareDay(day, currentDate) === 0 ? 'selected' : '';
|
||||
}
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (type === 'range') {
|
||||
const [startDay, endDay] = this.currentDate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user