feat: add responsive task calendar picker
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m29s

This commit is contained in:
2026-09-09 17:44:49 +08:00
parent 33790aaeb7
commit 30705e1cec
8 changed files with 391 additions and 22 deletions
+5 -7
View File
@@ -483,12 +483,11 @@ describe('unified floating add interaction', () => {
it('uses compact date and time chips instead of large visible mobile inputs', () => {
expect(app).toContain("composeDueAt.value = activeView.value === 'today' ? defaultTaskDueAt() : ''")
expect(app).toContain('const composeDueLabel = computed')
expect(app).toContain('ref="composeDatePicker"')
expect(app).toContain('aria-label="选择截止日期" tabindex="-1"')
expect(app).toContain('ref="composeDateButton"')
expect(app).toContain('aria-haspopup="dialog" :aria-expanded="composeCalendarOpen"')
expect(app).toContain('class="task-compose-date-chip"')
expect(app).toContain('@click="openComposeDuePicker"')
expect(app).toContain('function openComposeDuePicker()')
expect(app).toContain('picker.showPicker()')
expect(app).toContain('@click="composeCalendarOpen=true"')
expect(app).toContain('<CalendarPicker v-model:open="composeCalendarOpen" v-model="composeDueAt"')
expect(app).toContain('<span>{{ composeDueLabel }}</span>')
expect(app).toContain('v-if="composeDueAt" class="task-compose-date-clear"')
expect(app).toContain('v-if="composeDueAt && !composeHasTime"')
@@ -497,9 +496,8 @@ describe('unified floating add interaction', () => {
expect(css).toContain('.task-compose-date-control{position:relative;display:flex;align-items:center;min-width:0}')
expect(css).toContain('.task-compose-date-chip{position:relative;display:inline-flex!important')
expect(css).toContain('.task-compose-date-chip{position:relative;display:inline-flex!important;grid-template-columns:none!important;align-items:center;flex-direction:row!important;gap:7px!important;width:auto;min-height:44px')
expect(css).toContain('.task-compose-native-picker{position:absolute;width:1px!important;height:1px!important;left:12px;top:50%;transform:translateY(-50%)')
expect(css).toContain('pointer-events:none')
expect(css).not.toContain('@media(max-width:480px){.task-compose-due-row')
expect(css).not.toContain('.task-compose-native-picker{')
expect(app).toContain("composeHasTime.value ? composeTime.value : '23:59'")
})