Commit fc60bbcf1b3a19461c576e04364f1c0014995b92
1 parent
95bf8970
perf(src/packages/components): 日期时间组件新增快捷选择,本周和本月
Showing
1 changed file
with
14 additions
and
0 deletions
| ... | ... | @@ -56,6 +56,20 @@ const rangeShortcuts = { |
| 56 | 56 | dayjs().subtract(29, 'day').startOf('day').valueOf(), |
| 57 | 57 | dayjs().endOf('day').valueOf() |
| 58 | 58 | ] as const |
| 59 | + }, | |
| 60 | + 本周: () => { | |
| 61 | + shortcutsSelect.value = true | |
| 62 | + return [ | |
| 63 | + dayjs().startOf('week').add(1, 'day').valueOf(), | |
| 64 | + dayjs().endOf('week').add(1, 'day').valueOf(), | |
| 65 | + ] as const | |
| 66 | + }, | |
| 67 | + 本月: () => { | |
| 68 | + shortcutsSelect.value = true | |
| 69 | + return [ | |
| 70 | + dayjs().startOf('month').valueOf(), | |
| 71 | + dayjs().endOf('month').valueOf(), | |
| 72 | + ] as const | |
| 59 | 73 | } |
| 60 | 74 | } |
| 61 | 75 | ... | ... |