vue iview 最大字数动态显示textarea剩余字数


  
  {{ remnant }}/{{maxlength}}


data() {
  return {
  form: {
    phone: "",
    content: "",
  },
  maxlength: 200,
  remnant: 200
  };
 },
 descInput() {
 let txtVal = this.form.content.length;
 this.remnant = this.maxlength - txtVal;
 },

你可能感兴趣的:(vue iview 最大字数动态显示textarea剩余字数)