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 11import * as React from 'react'
22import { render , fireEvent } from '@testing-library/react'
33import '@testing-library/jest-dom'
4- import { CalendarDay } from '@/packages/calendar/ types'
4+ import { CalendarDay } from '@/types'
55
66import { Calendar } from '../calendar'
77
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const defaultProps = {
3131 renderDayBottom : undefined ,
3232 onClose : ( ) => { } ,
3333 onConfirm : ( param : string ) => { } ,
34- onDayClick : ( data : string ) => { } ,
34+ onDayClick : ( data : string [ ] ) => { } ,
3535 onPageChange : ( param : string ) => { } ,
3636} as TaroCalendarProps
3737
@@ -87,7 +87,7 @@ export const Calendar = React.forwardRef<
8787 close ( )
8888 }
8989
90- const select = ( param : string ) => {
90+ const select = ( param : string [ ] ) => {
9191 onDayClick && onDayClick ( param )
9292 }
9393
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const defaultProps = {
3131 renderDayBottom : undefined ,
3232 onClose : ( ) => { } ,
3333 onConfirm : ( param : string ) => { } ,
34- onDayClick : ( data : string ) => { } ,
34+ onDayClick : ( data : string [ ] ) => { } ,
3535 onPageChange : ( param : string ) => { } ,
3636} as WebCalendarProps
3737
@@ -87,7 +87,7 @@ export const Calendar = React.forwardRef<
8787 close ( )
8888 }
8989
90- const select = ( param : string ) => {
90+ const select = ( param : string [ ] ) => {
9191 onDayClick && onDayClick ( param )
9292 }
9393
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const Demo1 = () => {
2222 setDateWeek ( param [ 4 ] )
2323 }
2424
25- const select = ( param : string ) => {
25+ const select = ( param : string [ ] ) => {
2626 console . log ( param )
2727 }
2828
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo2 = () => {
1717 setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
1818 }
1919
20- const select = ( param : string ) => {
20+ const select = ( param : string [ ] ) => {
2121 console . log ( param )
2222 }
2323
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo8 = () => {
1717 setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
1818 }
1919
20- const select = ( param : string ) => {
20+ const select = ( param : string [ ] ) => {
2121 console . log ( param )
2222 }
2323
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const Demo1 = () => {
2121 setDateWeek ( param [ 4 ] )
2222 }
2323
24- const select = ( param : string ) => {
24+ const select = ( param : string [ ] ) => {
2525 console . log ( param )
2626 }
2727
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo2 = () => {
1717 setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
1818 }
1919
20- const select = ( param : string ) => {
20+ const select = ( param : string [ ] ) => {
2121 console . log ( param )
2222 }
2323
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Demo8 = () => {
1717 setDate ( [ ...[ param [ 0 ] [ 3 ] , param [ 1 ] [ 3 ] ] ] )
1818 }
1919
20- const select = ( param : string ) => {
20+ const select = ( param : string [ ] ) => {
2121 console . log ( param )
2222 }
2323
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export interface CalendarItemProps extends PopupProps {
6262 renderDayBottom : ( date : CalendarDay ) => string | JSX . Element
6363 onConfirm : ( data : string ) => void
6464 onUpdate : ( ) => void
65- onDayClick : ( data : string ) => void
65+ onDayClick : ( data : string [ ] ) => void
6666 onPageChange : ( data : any ) => void
6767}
6868const defaultProps = {
@@ -86,10 +86,10 @@ const defaultProps = {
8686 renderDay : undefined ,
8787 renderDayTop : undefined ,
8888 renderDayBottom : undefined ,
89- onConfirm : ( data : string ) => { } ,
89+ onConfirm : ( ) => { } ,
9090 onUpdate : ( ) => { } ,
91- onDayClick : ( data : string ) => { } ,
92- onPageChange : ( data : any ) => { } ,
91+ onDayClick : ( ) => { } ,
92+ onPageChange : ( ) => { } ,
9393} as unknown as CalendarItemProps
9494
9595export const CalendarItem = React . forwardRef <
You can’t perform that action at this time.
0 commit comments