微信小程序 提交表单

忍禁

关注

阅读 118

2023-03-15


wxml

<form bindsubmit='res'>

<van-field
id="vipAccount"
name="vipAccount"
required clearable left
label="会员号"
title-width="3.2em"
bind:click-icon="onClickIcon"
custom-style="width:472rpx;float:left;padding-right:20rpx" />

<van-button form-type='{{ sub }}' id="bindBtn" disabled='{{ disable }}' type="primary" custom-style="width:100%;"
size="large">绑定账号
</van-button>

</form>

js

data: {
sub:"submit"
},

res: function (e) {
console.log(666);
vipAccount = e.detail.value.vipAccount
console.log(vipAccount )
},


精彩评论(0)

0 0 举报