bindinput问题?
在组件中使用bindinput不起作用,使用表单提交也不起作用,哪位大佬帮忙看下
js:
// compent/binduserinfo/binduserinfo.js Component({ /** * 组件的属性列表 */ properties: { }, /** * 组件的初始数据 */ data: { }, bindKeyInput: function (e) { console.log(e) } /** * 组件的方法列表 */ ,methods: { prev() { this .triggerEvent( "page" , 1); }, login() { console.log( "绑定" ) } } }) |
html:
< view > < view class = "cu-form-group margin-top" > < view class = "title" >用户名:</ view > < input placeholder = "请输入手机号" type = "number" bindinput = "bindKeyInput" ></ input > </ view > < view class = "cu-form-group" > < view class = "title" >密码</ view > < input placeholder = "请输入密码" type = "password" ></ input > </ view > < button class = "cu-btn bg-green block margin-tb-sm" bindtap = "login" >绑定</ button > < view class = "footer" > < button class = "cu-btn bg-red block margin-tb-sm round" bindtap = "prev" >上一页</ button > </ view > </ view > |