mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [calendar] respect table semantics (#18552)
This commit is contained in:
@@ -117,7 +117,7 @@ describe('Calendar.vue', () => {
|
||||
return <Calendar v-model={this.value} />
|
||||
},
|
||||
})
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead')
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead tr')
|
||||
expect(head?.firstElementChild?.innerHTML).toBe('Sun')
|
||||
expect(head?.lastElementChild?.innerHTML).toBe('Sat')
|
||||
const firstRow = wrapper.element.querySelector('.el-calendar-table__row')
|
||||
@@ -133,7 +133,7 @@ describe('Calendar.vue', () => {
|
||||
return <Calendar v-model={this.value} />
|
||||
},
|
||||
})
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead')
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead tr')
|
||||
expect(head?.firstElementChild?.innerHTML).toBe('Mon')
|
||||
expect(head?.lastElementChild?.innerHTML).toBe('Sun')
|
||||
const firstRow = wrapper.element.querySelector('.el-calendar-table__row')
|
||||
@@ -157,7 +157,7 @@ describe('Calendar.vue', () => {
|
||||
)
|
||||
},
|
||||
})
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead')
|
||||
const head = wrapper.element.querySelector('.el-calendar-table thead tr')
|
||||
expect(head?.firstElementChild?.innerHTML).toBe('Sun')
|
||||
expect(head?.lastElementChild?.innerHTML).toBe('Sat')
|
||||
const firstRow = wrapper.element.querySelector('.el-calendar-table__row')
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
cellpadding="0"
|
||||
>
|
||||
<thead v-if="!hideHeader">
|
||||
<th v-for="day in weekDays" :key="day">{{ day }}</th>
|
||||
<tr>
|
||||
<th v-for="day in weekDays" :key="day" scope="col">{{ day }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user