weui包装后的mp-form怎么提交不了呢?
wxml页面如下
<!--pages/init/init.wxml-->
<view class="page">
<mp-form-page>
<mp-form id="form" bindsubmit="submitForm">
<mp-cells title="登录">
<mp-cell prop="mobile" title="手机号" ext-class="">
<input name="mobile" class="weui-input"
placeholder="" />
</mp-cell>
<mp-cell prop="password" title="密码" ext-class="">
<input name="password" class="weui-input"
placeholder="" />
</mp-cell>
</mp-cells>
<view slot="button">
<button class="weui-btn" form-type="submit" type="primary">确定</button>
</view>
</mp-form>
</mp-form-page>
</view>
js如下
// pages/init/init.js
import CustomPage from '../../base/CustomPage'
CustomPage({
data: {
},
submitForm: function(e){
console.log(e)
wx.request({
url: 'https://xxx',
data:{},
success(rsp){
console.log(rsp)
},
complete(d){
console.log(d)
}
})
console.info("form.submited")
}
})
是在开发工具中测的 调试基础库是 2.16.1
2 回复