taro-ui icon indicating copy to clipboard operation
taro-ui copied to clipboard

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

Open flowfire opened this issue 3 years ago • 2 comments

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

flowfire avatar May 13 '21 06:05 flowfire

那应该传 ...arguments 吧

luckyadam avatar May 14 '21 03:05 luckyadam

export default class AtForm extends React.Component<AtFormProps> {
  public static defaultProps: AtFormProps
  public static propTypes: InferProps<AtFormProps>

  public render (): JSX.Element {
    const {customStyle, className, ...others} = this.props

    return (
      <Form {...others}
            style={customStyle}
            className={classNames('at-form', className)}>
        {this.props.children}
      </Form>
    )
  }
}

这样不就好了嘛

UphkcRNqmafQWcSSSSSS avatar Nov 04 '21 10:11 UphkcRNqmafQWcSSSSSS