fix: type check failed for prop 'onClick' (#3038)

This commit is contained in:
Li Kui 2023-09-18 10:04:15 +08:00 committed by GitHub
parent ce6b25d03b
commit 4aaddef06f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,5 +22,5 @@ export const buttonProps = {
* @default: 14
*/
iconSize: { type: Number, default: 14 },
onClick: { type: Function as PropType<(...args) => any>, default: null },
onClick: { type: [Function, Array] as PropType<(() => any) | (() => any)[]>, default: null },
};