键盘弹出框问题修复

This commit is contained in:
wangdongbo 2026-02-12 10:57:20 +08:00
parent 316bad38b2
commit ac4161b8e6
4 changed files with 13 additions and 4 deletions

View File

@ -370,12 +370,18 @@ $primary-color: #0877F1;
left: 0;
right: 0;
background: #fff;
border-top: 1rpx solid #e0e0e0;
z-index: 200;
flex-shrink: 0;
transform: translateZ(0); /* 开启硬件加速,提升性能 */
transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
will-change: bottom;
display: flex;
flex-direction: column;
}
.ai-assistant-slot {
width: 100%;
background: #fff;
}
.input-toolbar {
@ -384,6 +390,8 @@ $primary-color: #0877F1;
padding: 12rpx 20rpx;
padding-bottom: env(safe-area-inset-bottom);
gap: 12rpx;
border-top: 1rpx solid #e0e0e0;
background: #fff;
}
.voice-toggle-btn {

View File

@ -383,7 +383,6 @@ defineExpose({
gap: 16rpx;
padding: 16rpx 24rpx;
background-color: #f8f9fa;
border-bottom: 1rpx solid #e5e5e5;
.ai-button {
display: flex;

View File

@ -1,7 +1,9 @@
<template>
<view class="input-section" :style="{ bottom: props.keyboardHeight + 'px' }">
<!-- AI助手按钮组 -->
<slot name="ai-assistant"></slot>
<view class="ai-assistant-slot">
<slot name="ai-assistant"></slot>
</view>
<view class="input-toolbar">
<view @click="toggleVoiceInput" class="voice-toggle-btn">

View File

@ -19,7 +19,7 @@
<!-- 聊天消息区域 -->
<scroll-view
class="chat-content"
:style="{ bottom: (keyboardHeight > 0 ? keyboardHeight + 60 : 60) + 'px' }"
:style="{ bottom: (keyboardHeight > 0 ? keyboardHeight + 120 : 120) + 'px' }"
scroll-y="true"
enhanced="true"
bounces="false"