diff --git a/packages/taro-ui/src/components/form/index.tsx b/packages/taro-ui/src/components/form/index.tsx index cea4dc011..1bebc32f3 100644 --- a/packages/taro-ui/src/components/form/index.tsx +++ b/packages/taro-ui/src/components/form/index.tsx @@ -8,12 +8,12 @@ export default class AtForm extends React.Component { public static defaultProps: AtFormProps public static propTypes: InferProps - private onSubmit(): void { - this.props.onSubmit && this.props.onSubmit(arguments as any) + private onSubmit(...params): void { + this.props.onSubmit && this.props.onSubmit(...params) } - private onReset(): void { - this.props.onReset && this.props.onReset(arguments as any) + private onReset(...params): void { + this.props.onReset && this.props.onReset(...params) } public render(): JSX.Element { diff --git a/packages/taro-ui/src/components/icon/index.tsx b/packages/taro-ui/src/components/icon/index.tsx index 607850932..833e2f979 100644 --- a/packages/taro-ui/src/components/icon/index.tsx +++ b/packages/taro-ui/src/components/icon/index.tsx @@ -9,8 +9,8 @@ export default class AtIcon extends React.Component { public static defaultProps: AtIconProps public static propTypes: InferProps - private handleClick(): void { - this.props.onClick && this.props.onClick(arguments as any) + private handleClick(...params): void { + this.props.onClick && this.props.onClick(...params) } public render(): JSX.Element { diff --git a/packages/taro-ui/src/components/load-more/index.tsx b/packages/taro-ui/src/components/load-more/index.tsx index 8d95f1104..c8d57de7b 100644 --- a/packages/taro-ui/src/components/load-more/index.tsx +++ b/packages/taro-ui/src/components/load-more/index.tsx @@ -10,8 +10,8 @@ export default class AtLoadMore extends React.Component { public static defaultProps: AtLoadMoreProps public static propTypes: InferProps - private onClick(): void { - this.props.onClick && this.props.onClick(arguments as any) + private onClick(...params): void { + this.props.onClick && this.props.onClick(...params) } public render(): JSX.Element {