textarea使用auto-height,在真机显示时下方为何出现大量空白?
发布于 4 年前 作者 mingguo 1941 次浏览 来自 官方Issues

<view class=“section–text”>资讯:</view>

<textarea

class=“section–elem” name=“title” maxlength=“600” auto-height="{{true}}" value="{{title}}" placeholder=“前24个字元将纳入标题使用 | 支持多行” placeholder-style=“color: #d3d3d4” bindblur=“bindTextAreaBlur” bindinput=“bindKeyInput”></textarea>

</view>

bindTextAreaBlur: function (e) {

this.setData({

title: e.detail.value

})

},



bindKeyInput: function(e) {

let str = e.detail.value;

this.setData({

title: str

});

},

3 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

你试试height:50vh;用vh不要用rpx或者%

设置下min-height

回到顶部