Textarea bindinput event not work

- 预期表现

I can get bindinput event e.value


- 复现路径


- 提供一个最简复现 Demo

<!--index.wxml-->

<image class='banner' src='/img/banner.jpg'></image>

<view class="container">


<form class='formMain'>

<view class="section txtBody">

<textarea class='txtContainer' placeholder="" bindinput='textInput' value="{{msgData}}" auto-focus style='background-color:white' />

<text class='txtLengthCounter'>{{msgData.length}}/140</text>

</view>

<view class="btn-rea" style='text-align:right;'>

<view wx:if='{{userInfo}}' class='userInfoContaienr'>

<image bindtap="bindViewTap " class="userinfo-avatar " src="{{userInfo.avatarUrl}} " background-size="cover "></image>

<text class="userinfo-nickname ">{{userInfo.nickName}}</text>

</view>

<!-- <button bindtap='postMsg' class='btn btnAction'>发送 | Send</button>  -->

<image src='/img/btnSend.png' class='btnSend' bindtap='postMsg'>发送</image>

<!-- <button bindtap='gobackVote' class='btn btnAction'>返回 | Go Bakc</button> -->

</view>

<view class='btn-area' style='text-align:center;'>

<image wx:if="{{previewImgSrc}}" src='{{previewImgSrc}}'></image>

<image class='btnCamara' wx:else src='/img/btnCamara.png' bindtap="takePhoto"></image>

<!-- <button class='btn btnAction'>选择照片 | Check Img</button> -->

</view>

</form>

</view>



//index.js

//获取应用实例

const app = getApp()


Page({

data: {

pickarray: ["文本", "图片"],

pickIndex: '0',

uploadBucket: '',

previewImgSrc: '',

msgData: '',

motto: 'Hello World',

userInfo: {},

hasUserInfo: false,

canIUse: wx.canIUse('button.open-type.getUserInfo')

},

//事件处理函数

bindViewTap: function () {

wx.nav

展开全部
收起
0回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部