forms/textarea/CTextArea.vue
@@ -1,8 +1,11 @@ /** * CTextArea * 多行文本输入组件,用于在表单中收集用户的多行文本输入 * 支持设置输入区域高度,可以通过行数或像素值来控制 * 支持只读模式和自动增高功能 * @author Tevin */ <template> <view class="c-textarea" @@ -22,6 +25,7 @@ :style="{minHeight: areaHeight, height: areaHeight}" :placeholder="placeholder" :value="itemRes.formData[itemRes.name]" :maxlength="maxLength" :autoFocus="false" :autoHeight="true" @input="evt=>itemRes.onChange(evt.detail.value)" @@ -50,6 +54,8 @@ }, // 文本雨输入区行数 rows: Number, // 最大输入长度 maxLength: Number, // 只读模式 readOnly: { type: Boolean,