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

触发form表单submit有问题 #96

Closed
ZhyThomas opened this issue Sep 30, 2018 · 12 comments
Closed

触发form表单submit有问题 #96

ZhyThomas opened this issue Sep 30, 2018 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@ZhyThomas
Copy link

重现步骤

  onSubmit(e){
       console.log(111,e)
  }
          <AtForm
                onSubmit={this.onSubmit.bind(this)}
                onReset={this.onReset.bind(this)}
                reportSubmit
            >
                <AtInput
                    name='value1'
                    title='文本'
                    type='text'
                    placeholder='单行文本'
                    value={this.state.value1}
                    onChange={this.handleChange.bind(this)}
                />
                <AtButton formType='submit' >确定</AtButton>
            </AtForm>

依赖的版本号

Node版本号:8.9.3 Taro版本:1.0.0-beta.26 Taro-UI版本:1.2.1

预期结果

 点击确定按钮,应触发onSubmit

实际结果

没有触发

相关链接

@ZhyThomas
Copy link
Author

image
taro-ui的不触发,taro的触发

@koppthe koppthe assigned koppthe and jimczj and unassigned koppthe Sep 30, 2018
@ZhyThomas
Copy link
Author

image
button 不在 form 内

@ZhyThomas
Copy link
Author

好吧,应该是微信的问题

@cos2004
Copy link
Contributor

cos2004 commented Sep 30, 2018

开发者工具的展示问题,实际上节点应该是在 form 里面的

@jimczj jimczj added the bug Something isn't working label Oct 10, 2018
@jimczj
Copy link
Contributor

jimczj commented Oct 18, 2018

经测试,小程序的组件化方案有问题,封装过的input 组件跟 form 组件嵌套,不会触发onSubmit 等等事件,我们将删除 form 组件,并增加说明。使用 AtInput 组件,跟 form 组件配合也有问题,这些都是小程序组件化方案引发的问题

@jimczj
Copy link
Contributor

jimczj commented Oct 22, 2018

最新版 form 组件说明
image

@jimczj jimczj closed this as completed Oct 22, 2018
@wlancer1
Copy link

wlancer1 commented Dec 1, 2018

我也遇到不触发提交事件的问题

@kid1412621
Copy link

经测试,小程序的组件化方案有问题,封装过的 input 组件跟 form 组件嵌套,不会触发 onSubmit 等等事件,我们将删除 form 组件,并增加说明。使用 AtInput 组件,跟 form 组件配合也有问题,这些都是小程序组件化方案引发的问题

那现在的文档也没说要废弃 Form 组件啊?To be specific ,是 Form 组件 还是 AtForm 组件???

@zongyan86
Copy link

这是什么垃圾控件。。文档没写不会触发啊。。浪费了半天,无语。。AtForm官方demo h5根本都没办法触发submit事件

@580
Copy link

580 commented Jul 19, 2020

以前用v2.1可以用。这次用3.0 alpha 发现报错,一直以为是自己的问题,因为自2.1后没有碰过TaroUI。也是仔细检查了好久上来翻一下issue,才发现好多个相关的issues。

@Aysnine
Copy link

Aysnine commented Sep 7, 2020

所以这个 Form 有几把用?不管理 values,不提供 validate,reset 也是自己写,现在连 event 都抛不出来

image

@UphkcRNqmafQWcSSSSSS
Copy link

所以这个 Form 有几把用?不管理 values,不提供 validate,reset 也是自己写,现在连 event 都抛不出来

image

哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants