小程序
小游戏
企业微信
微信支付
扫描小程序码分享
如题
4 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
为空没用 要设为空数组
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<
view
class
=
"main"
>
"section"
textarea
id
"idrecord"
"record"
maxlength
"0"
bindchange
"bindChange"
value
"{{record}}"
placeholder
"聊天记录"
auto-height />
</
form
input
"idsendmsg"
"sendtxt"
"{{sendmsg}}"
"消息"
type
"text"
auto-focus />
"btn-area"
button
form-type
"reset"
"primary"
bindtap
"btnSendMsg"
>发送消息</
需要清空的加在form里,button设置为form-type="reset"
绑定输入事件 返回空
<input placeholder="姓名" auto-focus value="{{name}}"/>
data: {
name: ''
},
onClearTap: function (e) {
this.setData({
})
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
为空没用 要设为空数组
<
view
class
=
"main"
>
<
view
class
=
"section"
>
<
textarea
id
=
"idrecord"
class
=
"record"
maxlength
=
"0"
bindchange
=
"bindChange"
value
=
"{{record}}"
placeholder
=
"聊天记录"
auto-height />
</
view
>
<
view
class
=
"section"
>
<
form
>
<
input
id
=
"idsendmsg"
class
=
"sendtxt"
bindchange
=
"bindChange"
value
=
"{{sendmsg}}"
placeholder
=
"消息"
type
=
"text"
auto-focus />
<
view
class
=
"btn-area"
>
<
button
form-type
=
"reset"
type
=
"primary"
bindtap
=
"btnSendMsg"
>发送消息</
button
>
</
view
>
</
form
>
</
view
>
需要清空的加在form里,button设置为
form-type
=
"reset"
绑定输入事件 返回空
<input placeholder="姓名" auto-focus value="{{name}}"/>
data: {
name: ''
},
onClearTap: function (e) {
this.setData({
name: ''
})
},