Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义事件应当传入原参数而不应该是arguments #1343

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/taro-ui/src/components/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export default class AtForm extends React.Component<AtFormProps> {
public static defaultProps: AtFormProps
public static propTypes: InferProps<AtFormProps>

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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-ui/src/components/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default class AtIcon extends React.Component<AtIconProps> {
public static defaultProps: AtIconProps
public static propTypes: InferProps<AtIconProps>

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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-ui/src/components/load-more/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default class AtLoadMore extends React.Component<AtLoadMoreProps> {
public static defaultProps: AtLoadMoreProps
public static propTypes: InferProps<AtLoadMoreProps>

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 {
Expand Down