<van-field data-name="name" value="{{ detail.name }}" clearable label="姓名" placeholder="请输入姓名(必填)" bind:change="formInputChange" />
// 表单改变
formInputChange(e) {
let key = e.currentTarget.dataset.name
let {detail} = this.data
let data = detail
data[key] = e.detail
this.setData({
detail: data
})
},
网友评论