// html
<el-input
type="textarea"
autosize
size="mini"
placeholder="最多48字"
maxlength="48"
v-model="detailInfoForm.brief_intro"
class="input-box"
@input="wordRemain"
/>
<span>{{ count }}/48</span>
// js
wordRemain() {
let textLength = this.detailInfoForm.brief_intro.length;
let detailTxtLength = this.detailInfoForm.detail_intro.length;
this.count = 48 - textLength;
this.detailCount = 200 - detailTxtLength;
},
如果有更好的办法,欢迎各位大佬指点