- 说明
DIY的textarea,下方带图片上传和语音识别功能的,注意和van-cell一起使用
- 示例
<van-cell-group>
<van-cell>
<Mtextarea v-model="text" placeholder="输入长文本" :text_max="6" :imgs_max="1" images speech :imgs.sync="imgs"></Mtextarea>
</van-cell>
</van-cell-group>
import Mtextarea from '@/components/common/Mtextarea'
export default {
components: {Mtextarea},
data(){
return {
imgs: [],
text: ''
}
}
}
- 属性
名称 | 类型 | 说明 | 默认值 |
---|---|---|---|
imgs | array | 图片列表,注意加sync修饰,父子级数据同步 | [] |
text_max | int | 最多能输入多少字符,0不生效 | 0 |
imgs_max | int | 最多能上传多少张图片 | 3 |
images | bool | 是否支持图片上传 | false |
speech | bool | 是否支持语音识别 | false |
文档更新时间: 2020-03-16 17:32 作者:吴俊源