genda_0927
genda_0927
  • 发布:2021-11-05 16:02
  • 更新:2023-09-25 11:37
  • 阅读:448

【报Bug】nvue android textarea 没有撑起 字体 的高度,需要通过键盘输入后可撑起高度

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 10.15.3

HBuilderX类型: 正式

HBuilderX版本号: 3.2.12

手机系统: Android

手机系统版本号: Android 10

手机厂商: OPPO

手机机型: r15x

页面类型: nvue

打包方式: 离线

项目创建方式: HBuilderX

示例代码:
<view class="msg-bottom" :style="{width:screenWidth+'px'}"> <view class="bottom-action-view"> <n-img src="msgYu" width="56rpx" height="56rpx" class="bottom-action-yu"></n-img> <textarea class="bottom-action-input" :adjust-position="true" :cursor-spacing="9" :auto-height="true" :show-confirm-bar="false" :disable-default-padding="true" placeholder="请输入聊天消息111" confirm-type="search" v-model="text" @keyboardheightchange="onKeyboardHeightChanged" /> <n-img src="addGray" width="56rpx" height="56rpx"></n-img> </view> <view style="background-color:#FFFFFF;" :style="{height:safeBottom+'px'}"></view> </view> @mixin center-align { align-items: center; justify-content: center; flex-direction: row; }
.priv-chat-view {  
    background-color: #FFFFFF;  
}  

.navbar-title {  
    flex: 1;  
    @include center-align;  
}  

.msg-list {  
    background-color: #F5F5F5;  
}  

.up-refresh {  
    @include center-align;  
}  

.navbar-top {  
    position: fixed;  
    left: 0;  
    top: 400px;  
}  

.msg-bottom {  
    position: fixed;  
    // top: 100px;  
    left: 0;  
    bottom: 0;  
    height: 54px;  
}  

.bottom-action-view {  
    @include center-align;  
    justify-content: space-between;  
    background-color: #FFFFFF;  
    // height: "auto";  
    // padding: 18rpx 30rpx;  
    padding: 18rpx 30rpx;  
}  

.bottom-action-input {  
    flex: 1;  
    margin-left: 18rpx;  
    margin-right: 18rpx;  
    background-color: #F5F5F5;  
    padding: 20rpx 26rpx;  
    border-radius: 16rpx;  
    font-size: 28rpx;  
}

操作步骤:

每次进入页面都如此

预期结果:

正常象ios一样,可正常撑起字体高度

实际结果:

如附件截图,显示文字被截

bug描述:

场景:聊天页面
底部的输入框,设置的 :auto-height="true"
初次初始化。输入框没有撑起字体高度

ios 没有此问题

疑问:是否可以设置 textarea 的最小高度

2021-11-05 16:02 负责人:DCloud_Android_ST 分享
已邀请:
luyisac

luyisac

顶,都23年了,问题还在

genda_0927

genda_0927 (作者)

新版本解决了,好像

要回复问题请先登录注册