<div class="pos-rel"> <input maxlength="300" v-model="feedback.content" bindinput="count" placeholder="请您如实反馈遇到的问题,以及对我们的意见和建议,谢谢!"> <div class="pos-abs" style="bottom:30rpx;right:30rpx;">{{num}}/300</div> </div>
data: { feedback:{ content: "" }, num: 0 }, methods: { count(){ this.num = this.feedback.content.length
} },