1.在做uniapp聊天时候会出现,聊天输入框内容过长时候滚动输入框内容,会带动底部消息区域也会滚动,导致用户体验不好
最终将以下代码加入到你的输入框最外层即可达到我们想要的结果 ==》 @touchmove.stop.prevent="()=>{}"阻止滑动穿透 ,即可达到我们想要的效果。
<!-- 菜单栏 -->
<view class="submit" :style="{'bottom': keyboardHeight + 'px'}" @touchmove.stop.prevent="()=>{}">
<view class="submit_chat">
<textarea class="chat_send">
</textarea>
<image class="more" src="../../static/message/emoji.png" @touchend.prevent="Function_Emoji"></image>
<image class="more" src="../../static/message/more.png" v-if="!isSendButton" @click="Function_Menu"></image>
<view class="sendMessage" @touchend.prevent="sendMessage()" v-if="isSendButton">发送</view>
</view>
</view>
这样就基本大功告成了,快去试试体验体验吧,哈哈哈哈哈哈哈哈哈。