@@ -18,20 +18,24 @@ import { useProxiedModel } from '@/composables/proxiedModel'
18
18
19
19
// Utilities
20
20
import { computed , shallowRef , toRef , watch } from 'vue'
21
- import { genericComponent , omit , pick , propsFactory , useRender , wrapInArray } from '@/util'
21
+ import { genericComponent , omit , propsFactory , useRender , wrapInArray } from '@/util'
22
22
23
23
// Types
24
+ import type { VDatePickerHeaderSlots } from './VDatePickerHeader'
24
25
import type { VDatePickerMonthSlots } from './VDatePickerMonth'
25
26
import type { VDatePickerMonthsSlots } from './VDatePickerMonths'
26
27
import type { VDatePickerYearsSlots } from './VDatePickerYears'
27
28
import type { VPickerSlots } from '@/labs/VPicker/VPicker'
28
29
import type { GenericProps } from '@/util'
29
30
30
31
// Types
31
- export type VDatePickerSlots = Omit < VPickerSlots , 'header' | 'default' > &
32
- VDatePickerYearsSlots &
33
- VDatePickerMonthsSlots &
34
- VDatePickerMonthSlots & {
32
+ export type VDatePickerSlots =
33
+ & Omit < VPickerSlots , 'header' | 'default' >
34
+ & Omit < VDatePickerHeaderSlots , 'default' >
35
+ & VDatePickerYearsSlots
36
+ & VDatePickerMonthsSlots
37
+ & VDatePickerMonthSlots
38
+ & {
35
39
header : {
36
40
header : string
37
41
transition : string
@@ -373,8 +377,8 @@ export const VDatePicker = genericComponent<new <
373
377
{ ...headerProps }
374
378
onClick = { viewMode . value !== 'month' ? onClickDate : undefined }
375
379
v-slots = { {
376
- ... slots ,
377
- default : undefined ,
380
+ prepend : slots . prepend ,
381
+ append : slots . append ,
378
382
} }
379
383
/>
380
384
) ,
@@ -402,7 +406,7 @@ export const VDatePicker = genericComponent<new <
402
406
allowedMonths = { allowedMonths }
403
407
onUpdate :modelValue = { onUpdateMonth }
404
408
>
405
- { { ... pick ( slots , [ ' month' ] ) } }
409
+ { { month : slots . month } }
406
410
</ VDatePickerMonths >
407
411
) : viewMode . value === 'year' ? (
408
412
< VDatePickerYears
@@ -414,7 +418,7 @@ export const VDatePicker = genericComponent<new <
414
418
allowedYears = { allowedYears }
415
419
onUpdate :modelValue = { onUpdateYear }
416
420
>
417
- { { ... pick ( slots , [ ' year' ] ) } }
421
+ { { year : slots . year } }
418
422
</ VDatePickerYears >
419
423
) : (
420
424
< VDatePickerMonth
@@ -428,7 +432,7 @@ export const VDatePicker = genericComponent<new <
428
432
min = { minDate . value }
429
433
max = { maxDate . value }
430
434
>
431
- { { ... pick ( slots , [ ' day' ] ) } }
435
+ { { day : slots . day } }
432
436
</ VDatePickerMonth >
433
437
) }
434
438
</ VFadeTransition >
0 commit comments