File tree Expand file tree Collapse file tree 13 files changed +24
-22
lines changed Expand file tree Collapse file tree 13 files changed +24
-22
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react'
2
2
import { render , fireEvent } from '@testing-library/react'
3
3
import '@testing-library/jest-dom'
4
- import { CalendarDay } from '@/packages/calendar/ types'
4
+ import { CalendarDay } from '@/types'
5
5
6
6
import { Calendar } from '../calendar'
7
7
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const defaultProps = {
31
31
renderDayBottom : undefined ,
32
32
onClose : ( ) => { } ,
33
33
onConfirm : ( param : string ) => { } ,
34
- onDayClick : ( data : string ) => { } ,
34
+ onDayClick : ( data : string [ ] ) => { } ,
35
35
onPageChange : ( param : string ) => { } ,
36
36
} as TaroCalendarProps
37
37
@@ -87,7 +87,7 @@ export const Calendar = React.forwardRef<
87
87
close ( )
88
88
}
89
89
90
- const select = ( param : string ) => {
90
+ const select = ( param : string [ ] ) => {
91
91
onDayClick && onDayClick ( param )
92
92
}
93
93
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const defaultProps = {
31
31
renderDayBottom : undefined ,
32
32
onClose : ( ) => { } ,
33
33
onConfirm : ( param : string ) => { } ,
34
- onDayClick : ( data : string ) => { } ,
34
+ onDayClick : ( data : string [ ] ) => { } ,
35
35
onPageChange : ( param : string ) => { } ,
36
36
} as WebCalendarProps
37
37
@@ -87,7 +87,7 @@ export const Calendar = React.forwardRef<
87
87
close ( )
88
88
}
89
89
90
- const select = ( param : string ) => {
90
+ const select = ( param : string [ ] ) => {
91
91
onDayClick && onDayClick ( param )
92
92
}
93
93
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const Demo1 = () => {
22
22
setDateWeek ( param [ 4 ] )
23
23
}
24
24
25
- const select = ( param : string ) => {
25
+ const select = ( param : string [ ] ) => {
26
26
console . log ( param )
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo2 = () => {
17
17
setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
18
18
}
19
19
20
- const select = ( param : string ) => {
20
+ const select = ( param : string [ ] ) => {
21
21
console . log ( param )
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo8 = () => {
17
17
setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
18
18
}
19
19
20
- const select = ( param : string ) => {
20
+ const select = ( param : string [ ] ) => {
21
21
console . log ( param )
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const Demo1 = () => {
21
21
setDateWeek ( param [ 4 ] )
22
22
}
23
23
24
- const select = ( param : string ) => {
24
+ const select = ( param : string [ ] ) => {
25
25
console . log ( param )
26
26
}
27
27
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo2 = () => {
17
17
setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
18
18
}
19
19
20
- const select = ( param : string ) => {
20
+ const select = ( param : string [ ] ) => {
21
21
console . log ( param )
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo8 = () => {
17
17
setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
18
18
}
19
19
20
- const select = ( param : string ) => {
20
+ const select = ( param : string [ ] ) => {
21
21
console . log ( param )
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export interface CalendarItemProps extends PopupProps {
62
62
renderDayBottom : ( date : CalendarDay ) => string | JSX . Element
63
63
onConfirm : ( data : string ) => void
64
64
onUpdate : ( ) => void
65
- onDayClick : ( data : string ) => void
65
+ onDayClick : ( data : string [ ] ) => void
66
66
onPageChange : ( data : any ) => void
67
67
}
68
68
const defaultProps = {
@@ -86,10 +86,10 @@ const defaultProps = {
86
86
renderDay : undefined ,
87
87
renderDayTop : undefined ,
88
88
renderDayBottom : undefined ,
89
- onConfirm : ( data : string ) => { } ,
89
+ onConfirm : ( ) => { } ,
90
90
onUpdate : ( ) => { } ,
91
- onDayClick : ( data : string ) => { } ,
92
- onPageChange : ( data : any ) => { } ,
91
+ onDayClick : ( ) => { } ,
92
+ onPageChange : ( ) => { } ,
93
93
} as unknown as CalendarItemProps
94
94
95
95
export const CalendarItem = React . forwardRef <
You can’t perform that action at this time.
0 commit comments