Textarea 文本域
基本使用
html
<be-textarea
class="textarea1"
v-model="content"
placeholder="请输入"
placeholder-class="textarea1-placeholder"
>
</be-textarea>ts
import { ref } from 'vue';
const content = ref('');scss
.textarea1 {
background-color: #f2f2f2;
font-size: 14px;
.textarea1-placeholder {
color: #bbbbbb;
}
}API
Props
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| rootClass | 根节点 class | string | - |
| rootStyle | 根节点 style | string | - |
| modelValue(v-model) | 输入的值 | string | - |
Props extend uni-app textarea
| 属性名 | 说明 | 默认值 |
|---|---|---|
| placeholder | 属性说明 | - |
| placeholderStyle | 属性说明 | - |
| placeholderClass | 属性说明 | - |
| disabled | 属性说明 | - |
| maxlength | 属性说明 | - |
| focus | 属性说明 | - |
| autoHeight | 属性说明 | - |
| cursorSpacing | 属性说明 | - |
| confirmType | 属性说明 | - |
| showConfirmBar | 属性说明 | - |
| adjustPosition | 属性说明 | - |
Events extend uni-app textarea
| 事件名称 | 说明 |
|---|---|
| focus | 事件说明 |
| blur | 事件说明 |