{{Max}}" bindinput="inputs"> <text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text> </textarea>Copy the code
textarea{
 margin: 40rpx 50rpx;
 height: 200rpx;
 border: 1rpx solid #F3F3F4;
 border-radius:10rpx;
 background: #F3F3F4;
 padding: 25rpx;
 position: relative;
}
.pla{
 color: # 888888;
 font-size: 30rpx;
}
.currentWordNumber{
 position: absolute;
 bottom: 10rpx;
 right: 10rpx;
 color: # 888;
}
Copy the code
data:{
     max: 150// Maximum number of words (depending on your needs) text_value:' 'Inputs: function(e) {var value = e.dail.value; Var len = parseInt(value.length); // Maximum word limitif (len > this.data.max) return; This.setdata ({currentWordNumber: len, text_value: value}); this.setData({currentWordNumber: len, text_value: value}); },Copy the code