@@ -47,7 +47,9 @@ function commonProps<DateType = any>() {
47
47
panelRender : { type : Function as PropType < ( originPanel : VueNode ) => VueNode > } ,
48
48
// // Events
49
49
onChange : {
50
- type : Function as PropType < ( value : DateType | string | null , dateString : string ) => void > ,
50
+ type : [ Function , Array ] as PropType <
51
+ ( value : DateType | string | null , dateString : string ) => void
52
+ > ,
51
53
} ,
52
54
'onUpdate:value' : {
53
55
type : [ Function , Array ] as PropType < ( value : DateType | string | null ) => void > ,
@@ -64,7 +66,9 @@ function commonProps<DateType = any>() {
64
66
onClick : { type : [ Function , Array ] as PropType < MouseEventHandler > } ,
65
67
onContextmenu : { type : [ Function , Array ] as PropType < MouseEventHandler > } ,
66
68
onKeydown : {
67
- type : Function as PropType < ( event : KeyboardEvent , preventDefault : ( ) => void ) => void > ,
69
+ type : [ Function , Array ] as PropType <
70
+ ( event : KeyboardEvent , preventDefault : ( ) => void ) => void
71
+ > ,
68
72
} ,
69
73
// WAI-ARIA
70
74
role : String ,
@@ -206,18 +210,20 @@ function rangePickerProps<DateType>() {
206
210
placeholder : Array ,
207
211
mode : { type : Array as unknown as PropType < [ PanelMode , PanelMode ] > } ,
208
212
onChange : {
209
- type : Function as PropType <
213
+ type : [ Function , Array ] as PropType <
210
214
(
211
215
value : RangeValue < DateType > | RangeValue < string > | null ,
212
216
dateString : [ string , string ] ,
213
217
) => void
214
218
> ,
215
219
} ,
216
220
'onUpdate:value' : {
217
- type : Function as PropType < ( value : RangeValue < DateType > | RangeValue < string > | null ) => void > ,
221
+ type : [ Function , Array ] as PropType <
222
+ ( value : RangeValue < DateType > | RangeValue < string > | null ) => void
223
+ > ,
218
224
} ,
219
225
onCalendarChange : {
220
- type : Function as PropType <
226
+ type : [ Function , Array ] as PropType <
221
227
(
222
228
values : RangeValue < DateType > | RangeValue < string > ,
223
229
formatString : [ string , string ] ,
@@ -226,12 +232,14 @@ function rangePickerProps<DateType>() {
226
232
> ,
227
233
} ,
228
234
onPanelChange : {
229
- type : Function as PropType <
235
+ type : [ Function , Array ] as PropType <
230
236
( values : RangeValue < DateType > | RangeValue < string > , modes : [ PanelMode , PanelMode ] ) => void
231
237
> ,
232
238
} ,
233
239
onOk : {
234
- type : Function as PropType < ( dates : RangeValue < DateType > | RangeValue < string > ) => void > ,
240
+ type : [ Function , Array ] as PropType <
241
+ ( dates : RangeValue < DateType > | RangeValue < string > ) => void
242
+ > ,
235
243
} ,
236
244
} ;
237
245
}
0 commit comments