<textarea maxlength="50" @input="getText" v-model="desc" />
<span>{{text}}/50</span>
data(){
return{
text: 0,
desc:''
}
},
methods:{
getText(){
this.text = this.desc.length;
}
}
<textarea maxlength="50" @input="getText" v-model="desc" />
<span>{{text}}/50</span>
data(){
return{
text: 0,
desc:''
}
},
methods:{
getText(){
this.text = this.desc.length;
}
}