el-input type=‘textarea’后高度设置
通过设置 autosize 属性可以使得文本域的高度能够根据文本内容自动进行调整,并且 autosize 还可以设定为一个对象,指定最小行数和最大行数。关键代码::autosize="{ minRows: 5, maxRows: 5}"<el-input type="textarea":maxlength="500" :autosize="{ minRows: 5, maxRows: 5}"
·
通过设置 autosize 属性可以使得文本域的高度能够根据文本内容自动进行调整,并且 autosize 还可以设定为一个对象,指定最小行数和最大行数。
关键代码::autosize="{ minRows: 5, maxRows: 5}"
<el-input type="textarea" :maxlength="500" :autosize="{ minRows: 5, maxRows: 5}"></el-input>
更多推荐
所有评论(0)