Article Directory
1. style mode
html
<el-input
v-model="content"
:rows="3"
class="r_n"
type="textarea"
maxlength="40"
placeholder=""
style="height: 100%;"
/>
css
style
label definitionlang="scss" scoped
::v-deep .r_n { .el-textarea__inner { resize: none; } }
Element's built-in prohibition stretching method
none
: Compact Stretch
both
: Both (both vertical and horizontal)
horizontal
: Horizontal (horizontal stretch)
vertica
: Vertical (vertical stretch)<el-input v-model="content" :rows="3" resize="none" type="textarea" maxlength="40" placeholder="" style="height: 100%;" />
suggestion
It is recommended to use styles to prohibit stretching. When the text field is in the state of prohibiting input, using the
element
built-in prohibition of stretching will affectresize
the display.resize
In the state where input is prohibited in the text field, use the built-in prohibit stretching function to display only one line, while the style prohibits stretching can beresize
displayed according to the set value.