소스 검색

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

Li Kui 1 년 전
부모
커밋
4aaddef06f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/Button/src/props.ts

+ 1 - 1
src/components/Button/src/props.ts

@@ -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 },
 };