The applet obtains the currently input character using the bindinput event, does not input a character and then calls the method written by js, obtains the input information, and then puts the input information into the variable defined by data
When the input character appears object promise, it is because the defined method uses async, so this happens. Get real-time data when using it, don't use async, directly bindTextAreaBlur(e){...}. To resolve this exception
Final code:
The next page of the program
<textarea class="descText" name="remarksInfo" value="{
{remarksInfo}}" bindinput='bindTextAreaBlur' placeholder="添加备注信息" ></textarea>
js code
Page({
data: {
remarksInfo: '' //备注信息
},
//失去焦点时获取里面评论内容
bindTextAreaBlur(e){
this.setData({remarksInfo: e.detail.value})
}
})