<template> <view> <page-head :title="title"></page-head> <view class="uni-title uni-common-pl"> <text class="uni-title-text"> 输入区域高度自适应,不会出现滚动条 </text> </view> <view class="uni-textarea-box"> <textarea @blur="bindTextAreaBlur" :auto-height="true" class="uni-textarea" /> </view> <view class="uni-title uni-common-pl"> <text class="uni-title-text"> 占位符字体是红色的textarea </text> </view> <view class="uni-textarea-box"> <textarea placeholder-style="color:#F76260" placeholder="占位符字体是红色的" class="uni-textarea" /> </view> </view> </template> <script lang="ts"> export default { data() { return { title: 'textarea', focus: false } }, methods: { bindTextAreaBlur: function (e : TextareaBlurEvent) { console.log(e.detail.value) } } } </script>