weui form 中的bindsuccess属性怎么使用?

小程序 文章 2020-08-05 17:21 800 0 全屏看文

AI助手支持GPT4.0

weui form 中的bindsuccess属性怎么使用?How to use binduccess attribute in weui form?

weui form 中的bindsuccess属性怎么使用?

如下图红框所示,weui 组件中的form 里的bindsuccess属性怎么使用呢,求大佬给个示例

As shown in the red box below, how to use the bindsuccess attribute in the form of the weui component? Please give an example

回答:

胖丫么胖:

简单来说你在form上绑定这个属性 指定一个方法。打印这个方法的参数。然后你就理解啥意思了

handleClick(e) { console.log(e)}
Admin²⁰²⁰:

谢邀:

这个是配合rules和models,检测用户输入表单数据是否符合你设定的验证规则,验证成功时会触发这个事件

Doer:懂了,谢谢你
Doer:它这个好像是全部验证成功了才会执行的,如果我只想验证某一个输入是否正确呢
?:

表单校验成功之后做什么操作?比如:校验成功之后提交表单就在这个函数里进行操作

-EOF-

AI助手支持GPT4.0