1、<el-form-item label="备注" prop="memo" style="display:block">
<el-input
type="textarea"
v-model="updateDiseaseForm.memo"
class="wh462"
placeholder="描述当前疾病史备注情况"
maxlength="128" @input="descInput"></el-input>
<span class="numberV" style="position: absolute; right: 10px;bottom: 0;">{{txtVal}}/128</span>
</el-form-item>
2、methods:{
descInput(){
this.txtVal = this.updateDiseaseForm.memo.length;
},
}
3、在编辑框内显示从后台带回的字数,在带回值时进行如下赋值:
this.txtVal = this.updateDiseaseForm.memo.length;